Correction spam nothing

This commit is contained in:
Michel Roux 2012-05-18 22:44:04 +02:00
parent c43340ee15
commit a92b82e5da

View File

@ -71,9 +71,11 @@ public abstract class SimplyPrevents implements Listener {
long current = System.currentTimeMillis();
if (next.longValue() < current) {
player.sendMessage(plugin.config.getMessage(node));
plugin.debug("Event '" + node + "' cancelled for " + player.getName());
throttleTimestamps.put(player, Long.valueOf(current + 3000));
if (!plugin.config.getMessage(node).isEmpty()) {
player.sendMessage(plugin.config.getMessage(node));
plugin.debug("Event '" + node + "' cancelled for " + player.getName());
throttleTimestamps.put(player, Long.valueOf(current + 3000));
}
}
}