mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
46 lines
1001 B
Java
46 lines
1001 B
Java
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;
|
|
}
|
|
}
|