mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Add APIv3 and API events
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user