From 70ece72332855fcd8f825400e948c86b8f5029d5 Mon Sep 17 00:00:00 2001 From: RoboMWM Date: Thu, 15 Sep 2016 17:10:18 -0700 Subject: [PATCH] Remove unnecessary check for logging signs Since we're also checking if location is the same, this really doesn't make much sense to store in the first place, unless of course we do some more string manipulation to store just the message and not the location. --- .../ryanhamshire/GriefPrevention/BlockEventHandler.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java index c9c890b..cfd800c 100644 --- a/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java +++ b/src/me/ryanhamshire/GriefPrevention/BlockEventHandler.java @@ -129,13 +129,15 @@ public class BlockEventHandler implements Listener return; } - //if not empty and wasn't the same as the last sign, log it and remember it for later PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId()); - if(notEmpty && (playerData.lastSignMessage == null || !playerData.lastSignMessage.equals(signMessage))) + //if not empty and wasn't the same as the last sign, log it and remember it for later + //This has been temporarily removed since `signMessage` includes location, not just the message. Waste of memory IMO + //if(notEmpty && (playerData.lastSignMessage == null || !playerData.lastSignMessage.equals(signMessage))) + if (notEmpty) { GriefPrevention.AddLogEntry(player.getName() + lines.toString().replace("\n ", ";"), null); PlayerEventHandler.makeSocialLogEntry(player.getName(), signMessage); - playerData.lastSignMessage = signMessage; + //playerData.lastSignMessage = signMessage; if(!player.hasPermission("griefprevention.eavesdropsigns")) {