From ea0efad12cc2196d25f0645fad3ffc5dbf5a7ae8 Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Mon, 13 Oct 2014 19:16:51 -0700 Subject: [PATCH] Tweaks: Build outside claims warning. --- src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java | 4 +++- src/me/ryanhamshire/GriefPrevention/DataStore.java | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java index f00b5e1..8ae3333 100644 --- a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java @@ -201,6 +201,8 @@ public class BlockEventHandler implements Listener Claim claim = this.dataStore.getClaimAt(block.getLocation(), true, playerData.lastClaim); if(claim != null) { + playerData.lastClaim = claim; + //FEATURE: prevent theft from container using a hopper when the container is at the very bottom of a land claim if(block.getType() == Material.HOPPER) @@ -325,7 +327,7 @@ public class BlockEventHandler implements Listener } //FEATURE: warn players when they're placing non-trash blocks outside of their claimed areas - else if(!this.trashBlocks.contains(block.getType()) && GriefPrevention.instance.claimsEnabledForWorld(block.getWorld()) && playerData.claims.size() > 0) + else if(!this.trashBlocks.contains(block.getType()) && GriefPrevention.instance.claimsEnabledForWorld(block.getWorld())) { if(!playerData.warnedAboutBuildingOutsideClaims && (playerData.lastClaim == null diff --git a/src/me/ryanhamshire/GriefPrevention/DataStore.java b/src/me/ryanhamshire/GriefPrevention/DataStore.java index 34ecfe7..2fc6d0a 100644 --- a/src/me/ryanhamshire/GriefPrevention/DataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DataStore.java @@ -1033,7 +1033,7 @@ public abstract class DataStore this.addDefault(defaults, Messages.HowToClaimRegex, "(^|.*\\W)how\\W.*\\W(claim|protect|lock)(\\W.*|$)", "This is a Java Regular Expression. Look it up before editing! It's used to tell players about the demo video when they ask how to claim land."); this.addDefault(defaults, Messages.NoBuildOutsideClaims, "You can't build here unless you claim some land first.", null); this.addDefault(defaults, Messages.PlayerOfflineTime, " Last login: {0} days ago.", "0: number of full days since last login"); - this.addDefault(defaults, Messages.BuildingOutsideClaims, "Other players can undo your work here! Consider using a golden shovel to claim this area so that your work will be protected.", null); + this.addDefault(defaults, Messages.BuildingOutsideClaims, "Other players can build here, too. Consider creating a land claim to protect your work!", null); this.addDefault(defaults, Messages.TrappedWontWorkHere, "Sorry, unable to find a safe location to teleport you to. Contact an admin, or consider /kill if you don't want to wait.", null); this.addDefault(defaults, Messages.CommandBannedInPvP, "You can't use that command while in PvP combat.", null); this.addDefault(defaults, Messages.UnclaimCleanupWarning, "The land you've unclaimed may be changed by other players or cleaned up by administrators. If you've built something there you want to keep, you should reclaim it.", null);