Fix sign logging/spam detection

This commit is contained in:
RoboMWM 2016-08-28 13:30:01 -07:00 committed by GitHub
parent 0d4b7c5f04
commit 9afec8dfe8

View File

@ -131,7 +131,7 @@ public class BlockEventHandler implements Listener
//if not empty and wasn't the same as the last sign, log it and remember it for later //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()); PlayerData playerData = this.dataStore.getPlayerData(player.getUniqueId());
if(notEmpty && playerData.lastSignMessage != null && !playerData.lastSignMessage.equals(signMessage)) if(notEmpty && (playerData.lastSignMessage == null || !playerData.lastSignMessage.equals(signMessage)))
{ {
GriefPrevention.AddLogEntry(player.getName() + lines.toString().replace("\n ", ";"), null); GriefPrevention.AddLogEntry(player.getName() + lines.toString().replace("\n ", ";"), null);
PlayerEventHandler.makeSocialLogEntry(player.getName(), signMessage); PlayerEventHandler.makeSocialLogEntry(player.getName(), signMessage);