From 1d9b5ed1f46ac35433018290f1d569b7781bac38 Mon Sep 17 00:00:00 2001 From: destro174 <40720638+destro174@users.noreply.github.com> Date: Sat, 19 Feb 2022 20:31:16 +0100 Subject: [PATCH] remove ClaimsMode.SurvivalRequiringClaims --- .../java/me/ryanhamshire/GriefPrevention/ClaimsMode.java | 3 +-- .../ryanhamshire/GriefPrevention/EntityEventHandler.java | 2 +- .../me/ryanhamshire/GriefPrevention/GriefPrevention.java | 8 ++------ 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/ClaimsMode.java b/src/main/java/me/ryanhamshire/GriefPrevention/ClaimsMode.java index 2049e46..7764e88 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/ClaimsMode.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/ClaimsMode.java @@ -4,6 +4,5 @@ public enum ClaimsMode { Survival, Creative, - Disabled, - SurvivalRequiringClaims + Disabled } \ No newline at end of file diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/EntityEventHandler.java b/src/main/java/me/ryanhamshire/GriefPrevention/EntityEventHandler.java index b3f3b5e..8069bff 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/EntityEventHandler.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/EntityEventHandler.java @@ -281,7 +281,7 @@ public class EntityEventHandler implements Listener } // No modification in the wilderness in creative mode. - if (instance.creativeRulesApply(block.getLocation()) || instance.config_claims_worldModes.get(block.getWorld()) == ClaimsMode.SurvivalRequiringClaims) + if (instance.creativeRulesApply(block.getLocation())) { event.setCancelled(true); return; diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java index e0ff800..5ae2ee7 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -889,10 +889,6 @@ public class GriefPrevention extends JavaPlugin { return ClaimsMode.Disabled; } - else if (configSetting.equalsIgnoreCase("SurvivalRequiringClaims")) - { - return ClaimsMode.SurvivalRequiringClaims; - } else { return null; @@ -3280,7 +3276,7 @@ public class GriefPrevention extends JavaPlugin if (claim == null) { //no building in the wilderness in creative mode - if (this.creativeRulesApply(location) || this.config_claims_worldModes.get(location.getWorld()) == ClaimsMode.SurvivalRequiringClaims) + if (this.creativeRulesApply(location)) { //exception: when chest claims are enabled, players who have zero land claims and are placing a chest if (material != Material.CHEST || playerData.getClaims().size() > 0 || GriefPrevention.instance.config_claims_automaticClaimsForNewPlayersRadius == -1) @@ -3343,7 +3339,7 @@ public class GriefPrevention extends JavaPlugin if (claim == null) { //no building in the wilderness in creative mode - if (this.creativeRulesApply(location) || this.config_claims_worldModes.get(location.getWorld()) == ClaimsMode.SurvivalRequiringClaims) + if (this.creativeRulesApply(location)) { String reason = this.dataStore.getMessage(Messages.NoBuildOutsideClaims); if (player.hasPermission("griefprevention.ignoreclaims"))