Add APIv3 and API events

This commit is contained in:
William committed 2022-08-26 22:19:15 +01:00
1 parent 0fc56dc758
commit 59249f285a
25 files changed
+985 -100

No files matched your search

@@ -0,0 +1,45 @@
package net.william278.huskhomes.event;
import net.william278.huskhomes.position.Home;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.jetbrains.annotations.NotNull;
public class HomeSaveEvent extends Event implements IHomeSaveEvent, Cancellable {
private static final HandlerList HANDLER_LIST = new HandlerList();
@NotNull
private final Home home;
private boolean cancelled;
public HomeSaveEvent(@NotNull Home home) {
this.home = home;
}
@NotNull
@Override
public HandlerList getHandlers() {
return HANDLER_LIST;
}
public static HandlerList getHandlerList() {
return HANDLER_LIST;
}
@Override
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
@Override
public boolean isCancelled() {
return cancelled;
}
@Override
public @NotNull Home getHome() {
return home;
}
}