mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-01 14:38:55 +00:00
39 lines
1.1 KiB
Java
39 lines
1.1 KiB
Java
package com.github.alathra.AlathranWars.events;
|
|
|
|
import org.bukkit.event.Cancellable;
|
|
import org.bukkit.event.Event;
|
|
import org.bukkit.event.HandlerList;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public class PreWarDeleteEvent extends Event implements Cancellable {
|
|
private static final HandlerList HANDLER_LIST = new HandlerList();
|
|
private boolean cancelled;
|
|
|
|
/**
|
|
* Gets the cancellation state of this event. A cancelled event will not
|
|
* be executed in the server, but will still pass to other plugins
|
|
*
|
|
* @return true if this event is cancelled
|
|
*/
|
|
@Override
|
|
public boolean isCancelled() {
|
|
return this.cancelled;
|
|
}
|
|
|
|
/**
|
|
* Sets the cancellation state of this event. A cancelled event will not
|
|
* be executed in the server, but will still pass to other plugins.
|
|
*
|
|
* @param cancelled true if you wish to cancel this event
|
|
*/
|
|
@Override
|
|
public void setCancelled(boolean cancelled) {
|
|
this.cancelled = cancelled;
|
|
}
|
|
|
|
@Override
|
|
public @NotNull HandlerList getHandlers() {
|
|
return HANDLER_LIST;
|
|
}
|
|
}
|