Skip to content

Commit

Permalink
let playerhead module enable/disable
Browse files Browse the repository at this point in the history
  • Loading branch information
xGinko committed Mar 7, 2024
1 parent d131112 commit bf588f2
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import me.moomoo.anarchyexploitfixes.enums.ItemLegality;
import me.moomoo.anarchyexploitfixes.utils.ItemUtil;
import org.bukkit.Material;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;

public class PlayerHeadItems implements IllegalItemModule {
Expand Down Expand Up @@ -33,15 +34,20 @@ public String category() {
}

@Override
public void enable() {}
public void enable() {
AnarchyExploitFixes plugin = AnarchyExploitFixes.getInstance();
plugin.getServer().getPluginManager().registerEvents(this, plugin);
}

@Override
public boolean shouldEnable() {
return AnarchyExploitFixes.getConfiguration().getBoolean("illegals.ban-player-heads.enable", false);
}

@Override
public void disable() {}
public void disable() {
HandlerList.unregisterAll(this);
}

@Override
public AEFPermission bypassPermission() {
Expand Down

0 comments on commit bf588f2

Please sign in to comment.