Allow cancelling expansion registration

This commit is contained in:
extendedclip 2019-09-19 14:16:35 -04:00
parent 6b9f22c7ec
commit 9871efbadb

View File

@ -21,13 +21,15 @@
package me.clip.placeholderapi.events;
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
public class ExpansionRegisterEvent extends Event {
public class ExpansionRegisterEvent extends Event implements Cancellable {
private static final HandlerList HANDLERS = new HandlerList();
private PlaceholderExpansion expansion;
private boolean isCancelled;
public ExpansionRegisterEvent(PlaceholderExpansion expansion) {
this.expansion = expansion;
@ -45,4 +47,14 @@ public class ExpansionRegisterEvent extends Event {
public PlaceholderExpansion getExpansion() {
return expansion;
}
@Override
public boolean isCancelled() {
return isCancelled;
}
@Override
public void setCancelled(boolean b) {
this.isCancelled = b;
}
}