Fixed duplicate messages in console and telnet

This commit is contained in:
unknown 2014-04-04 13:37:45 +02:00
parent 9b66304f63
commit b89ccb2d55
2 changed files with 5 additions and 8 deletions

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit! #Build Number for ANT. Do not edit!
#Fri Mar 21 11:38:49 CET 2014 #Fri Apr 04 13:36:06 CEST 2014
build.number=705 build.number=706

View File

@ -454,10 +454,10 @@ public class TFM_PlayerListener implements Listener
final Player player = event.getPlayer(); final Player player = event.getPlayer();
String message = event.getMessage().trim(); String message = event.getMessage().trim();
TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player); final TFM_PlayerData playerdata = TFM_PlayerData.getPlayerData(player);
// Check for spam // Check for spam
Long lastRan = TFM_Heartbeat.getLastRan(); final Long lastRan = TFM_Heartbeat.getLastRan();
if (lastRan == null || lastRan + TotalFreedomMod.HEARTBEAT_RATE * 1000L < System.currentTimeMillis()) if (lastRan == null || lastRan + TotalFreedomMod.HEARTBEAT_RATE * 1000L < System.currentTimeMillis())
{ {
//TFM_Log.warning("Heartbeat service timeout - can't check block place/break rates."); //TFM_Log.warning("Heartbeat service timeout - can't check block place/break rates.");
@ -537,9 +537,6 @@ public class TFM_PlayerListener implements Listener
// Finally, set message // Finally, set message
event.setMessage(message); event.setMessage(message);
// Broadcast it to console (since 1.7 doesn't do that anymore)
TFM_Log.info(String.format(event.getFormat(), player.getDisplayName(), event.getMessage()), true);
// Set the tag // Set the tag
if (playerdata.getTag() != null) if (playerdata.getTag() != null)
{ {
@ -680,7 +677,7 @@ public class TFM_PlayerListener implements Listener
playerdata.regenerateHistory(); playerdata.regenerateHistory();
playerdata.clearHistory(); playerdata.clearHistory();
} }
// Log player quitting, because 1.7 doesn't do this // Log player quitting, because 1.7 doesn't do this
TFM_Log.info("[EXIT] " + player.getName() + " left the game.", true); TFM_Log.info("[EXIT] " + player.getName() + " left the game.", true);
} }