9
0
mirror of https://github.com/Xiao-MoMi/Custom-Fishing.git synced 2025-12-30 20:39:18 +00:00
This commit is contained in:
XiaoMoMi
2023-09-23 22:28:55 +08:00
parent e359239c98
commit 2c69d7e2a5
9 changed files with 120 additions and 10 deletions

View File

@@ -0,0 +1,43 @@
package net.momirealms.customfishing.api.event;
import net.momirealms.customfishing.api.mechanic.competition.CompetitionConfig;
import net.momirealms.customfishing.api.mechanic.competition.FishingCompetition;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
public class CompetitionEvent extends Event {
private static final HandlerList handlerList = new HandlerList();
private final State state;
private final FishingCompetition competition;
public CompetitionEvent(State state, FishingCompetition competition) {
this.state = state;
this.competition = competition;
}
public State getState() {
return state;
}
public FishingCompetition getCompetition() {
return competition;
}
public static HandlerList getHandlerList() {
return handlerList;
}
@NotNull
@Override
public HandlerList getHandlers() {
return getHandlerList();
}
public static enum State {
END,
STOP,
START
}
}