diff --git a/api/src/main/java/fr/euphyllia/skyllia/api/skyblock/model/gamerule/GameRuleIsland.java b/api/src/main/java/fr/euphyllia/skyllia/api/skyblock/model/gamerule/GameRuleIsland.java index 6b0f074..3e2af2f 100644 --- a/api/src/main/java/fr/euphyllia/skyllia/api/skyblock/model/gamerule/GameRuleIsland.java +++ b/api/src/main/java/fr/euphyllia/skyllia/api/skyblock/model/gamerule/GameRuleIsland.java @@ -68,7 +68,12 @@ public enum GameRuleIsland { /** * Disables unknown mob griefing on the island. */ - DISABLE_UNKNOWN_MOB_GRIEFING(2_048); + DISABLE_UNKNOWN_MOB_GRIEFING(2_048), + + /** + * Disables player griefing on the island. + */ + DISABLE_PLAYER_GRIEFING(4_096); private final long permissionValue; diff --git a/plugin/src/main/java/fr/euphyllia/skyllia/listeners/bukkitevents/gamerule/entity/GriefingEvent.java b/plugin/src/main/java/fr/euphyllia/skyllia/listeners/bukkitevents/gamerule/entity/GriefingEvent.java index afc3004..916e0d0 100644 --- a/plugin/src/main/java/fr/euphyllia/skyllia/listeners/bukkitevents/gamerule/entity/GriefingEvent.java +++ b/plugin/src/main/java/fr/euphyllia/skyllia/listeners/bukkitevents/gamerule/entity/GriefingEvent.java @@ -32,6 +32,8 @@ public void onGriefingBlock(final EntityChangeBlockEvent event) { ListenersUtils.checkGameRuleIsland(location, GameRuleIsland.DISABLE_PASSIF_MOB_GRIEFING, event); } else if (entity instanceof Monster) { ListenersUtils.checkGameRuleIsland(location, GameRuleIsland.DISABLE_HOSTILE_MOB_GRIEFING, event); + } else if (entity instanceof Player) { + ListenersUtils.checkGameRuleIsland(location, GameRuleIsland.DISABLE_PLAYER_GRIEFING, event); } else { ListenersUtils.checkGameRuleIsland(location, GameRuleIsland.DISABLE_UNKNOWN_MOB_GRIEFING, event); }