mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2024-11-18 00:46:55 +01:00
Allow cancelling expansion registration
This commit is contained in:
parent
6b9f22c7ec
commit
9871efbadb
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user