From 8bee74df89d28cebf1237e479843fe686253bbc1 Mon Sep 17 00:00:00 2001 From: Tobias Ottenweller Date: Sat, 1 Jun 2013 15:01:59 +0200 Subject: [PATCH] Code cleanup. --- src/de/craftinc/gates/commands/CommandClose.java | 2 -- src/de/craftinc/gates/listeners/PlayerMoveListener.java | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/de/craftinc/gates/commands/CommandClose.java b/src/de/craftinc/gates/commands/CommandClose.java index f0b73b3..3de8ba1 100644 --- a/src/de/craftinc/gates/commands/CommandClose.java +++ b/src/de/craftinc/gates/commands/CommandClose.java @@ -41,8 +41,6 @@ public class CommandClose extends BaseCommand Plugin.log(Level.WARNING, e.getMessage()); e.printStackTrace(); } - - } } diff --git a/src/de/craftinc/gates/listeners/PlayerMoveListener.java b/src/de/craftinc/gates/listeners/PlayerMoveListener.java index 4e4e356..6c66bef 100644 --- a/src/de/craftinc/gates/listeners/PlayerMoveListener.java +++ b/src/de/craftinc/gates/listeners/PlayerMoveListener.java @@ -18,7 +18,7 @@ import de.craftinc.gates.Plugin; public class PlayerMoveListener implements Listener { - protected HashMap lastBorderMessage = new HashMap(); + protected HashMap lastNoPermissionMessages = new HashMap(); @EventHandler(priority = EventPriority.NORMAL) public void onPlayerMove(PlayerMoveEvent event) @@ -52,9 +52,9 @@ public class PlayerMoveListener implements Listener Long now = Calendar.getInstance().getTimeInMillis(); // do not display messages more often than once per second - if (!this.lastBorderMessage.containsKey(playerName) || this.lastBorderMessage.get(playerName) < now - 10000L) { + if (!this.lastNoPermissionMessages.containsKey(playerName) || this.lastNoPermissionMessages.get(playerName) < now - 10000L) { event.getPlayer().sendMessage(ChatColor.RED + "You are not allowed to use this gate!"); - this.lastBorderMessage.put(playerName, now); + this.lastNoPermissionMessages.put(playerName, now); } } else {