diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/ClaimsMode.java b/src/main/java/me/ryanhamshire/GriefPrevention/ClaimsMode.java index 7764e88..3d3ad14 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/ClaimsMode.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/ClaimsMode.java @@ -3,6 +3,5 @@ package me.ryanhamshire.GriefPrevention; public enum ClaimsMode { Survival, - Creative, Disabled } \ No newline at end of file diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/DataStore.java b/src/main/java/me/ryanhamshire/GriefPrevention/DataStore.java index c329cb6..3450190 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/DataStore.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/DataStore.java @@ -928,12 +928,6 @@ public abstract class DataStore smally = sanitizeClaimDepth(parent, smally); } - //creative mode claims always go to bedrock - if (GriefPrevention.instance.config_claims_worldModes.get(world) == ClaimsMode.Creative) - { - smally = world.getMinHeight(); - } - //create a new claim instance (but don't save it, yet) Claim newClaim = new Claim( new Location(world, smallx, smally, smallz), diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/EntityCleanupTask.java b/src/main/java/me/ryanhamshire/GriefPrevention/EntityCleanupTask.java index 07d61ee..3b8bb5b 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/EntityCleanupTask.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/EntityCleanupTask.java @@ -48,10 +48,7 @@ class EntityCleanupTask implements Runnable ArrayList worlds = new ArrayList<>(); for (World world : GriefPrevention.instance.getServer().getWorlds()) { - if (GriefPrevention.instance.config_claims_worldModes.get(world) == ClaimsMode.Creative) - { - worlds.add(world); - } + } for (World world : worlds) diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/EntityEventHandler.java b/src/main/java/me/ryanhamshire/GriefPrevention/EntityEventHandler.java index 8069bff..0a277d4 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/EntityEventHandler.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/EntityEventHandler.java @@ -232,13 +232,6 @@ public class EntityEventHandler implements Listener //if did not fall straight down if (originalLocation.getBlockX() != newLocation.getBlockX() || originalLocation.getBlockZ() != newLocation.getBlockZ()) { - //in creative mode worlds, never form the block - if (GriefPrevention.instance.config_claims_worldModes.get(newLocation.getWorld()) == ClaimsMode.Creative) - { - event.setCancelled(true); - entity.remove(); - return; - } //in other worlds, if landing in land claim, only allow if source was also in the land claim Claim claim = this.dataStore.getClaimAt(newLocation, false, null); diff --git a/src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java b/src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java index 5ae2ee7..b42a679 100644 --- a/src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java +++ b/src/main/java/me/ryanhamshire/GriefPrevention/GriefPrevention.java @@ -460,24 +460,18 @@ public class GriefPrevention extends JavaPlugin if (claimsMode != null) { this.config_claims_worldModes.put(world, claimsMode); - if (claimsMode == ClaimsMode.Creative) this.config_creativeWorldsExist = true; continue; } else { - GriefPrevention.AddLogEntry("Error: Invalid claim mode \"" + configSetting + "\". Options are Survival, Creative, and Disabled."); - this.config_claims_worldModes.put(world, ClaimsMode.Creative); + GriefPrevention.AddLogEntry("Error: Invalid claim mode \"" + configSetting + "\". Options are Survival and Disabled."); + this.config_claims_worldModes.put(world, ClaimsMode.Disabled); this.config_creativeWorldsExist = true; } } //was it specified in a deprecated config node? - if (deprecated_creativeClaimsEnabledWorldNames.contains(world.getName())) - { - this.config_claims_worldModes.put(world, ClaimsMode.Creative); - this.config_creativeWorldsExist = true; - } - else if (deprecated_claimsEnabledWorldNames.contains(world.getName())) + if (deprecated_claimsEnabledWorldNames.contains(world.getName())) { this.config_claims_worldModes.put(world, ClaimsMode.Survival); } @@ -487,18 +481,6 @@ public class GriefPrevention extends JavaPlugin { this.config_claims_worldModes.put(world, ClaimsMode.Survival); } - else if (world.getName().toLowerCase().contains("creative")) - { - this.config_claims_worldModes.put(world, ClaimsMode.Creative); - this.config_creativeWorldsExist = true; - } - - //decide a default based on server type and world type - else if (this.getServer().getDefaultGameMode() == GameMode.CREATIVE) - { - this.config_claims_worldModes.put(world, ClaimsMode.Creative); - this.config_creativeWorldsExist = true; - } else if (world.getEnvironment() == Environment.NORMAL) { this.config_claims_worldModes.put(world, ClaimsMode.Survival); @@ -881,10 +863,6 @@ public class GriefPrevention extends JavaPlugin { return ClaimsMode.Survival; } - else if (configSetting.equalsIgnoreCase("Creative")) - { - return ClaimsMode.Creative; - } else if (configSetting.equalsIgnoreCase("Disabled")) { return ClaimsMode.Disabled; @@ -3253,7 +3231,7 @@ public class GriefPrevention extends JavaPlugin { if (!this.config_creativeWorldsExist) return false; - return this.config_claims_worldModes.get((location.getWorld())) == ClaimsMode.Creative; + return false; } public String allowBuild(Player player, Location location)