diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index e0bce620..9a1060dd 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -140,7 +140,6 @@ public class MConf extends Entity public boolean handleExploitObsidianGenerators = true; public boolean handleExploitEnderPearlClipping = true; - public boolean handleExploitInteractionSpam = true; public boolean handleExploitTNTWaterlog = false; // -------------------------------------------- // diff --git a/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java b/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java index aab2d8dd..bd3742fa 100644 --- a/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java +++ b/src/com/massivecraft/factions/listeners/FactionsListenerExploit.java @@ -37,57 +37,6 @@ public class FactionsListenerExploit implements Listener Bukkit.getPluginManager().registerEvents(this, Factions.get()); } - // -------------------------------------------- // - // INTERACT SPAM - // -------------------------------------------- // - // TODO: Now that I decoupled this one it may be to sensitive. - // TODO: Yeah it's faaaaaaaaaar to sensitive. Let's just comment it out for now. - - /* - @EventHandler(priority = EventPriority.LOW, ignoreCancelled = true) - public void interactSpam(PlayerInteractEvent event) - { - if (!MConf.get().handleExploitInteractionSpam) return; - - Player player = event.getPlayer(); - String playerId = SenderUtil.getSenderId(player); - - InteractAttemptSpam attempt = interactSpammers.get(playerId); - if (attempt == null) - { - attempt = new InteractAttemptSpam(); - interactSpammers.put(playerId, attempt); - } - - int count = attempt.increment(); - if (count >= 10) - { - player.sendMessage(Txt.parse("Ouch, that is starting to hurt. You should give it a rest.")); - player.damage(NumberConversions.floor((double)count / 10)); - } - } - - // for handling people who repeatedly spam attempts to open a door (or similar) in another faction's territory - private Map interactSpammers = new HashMap(); - private static class InteractAttemptSpam - { - private int attempts = 0; - private long lastAttempt = System.currentTimeMillis(); - - // returns the current attempt count - public int increment() - { - long Now = System.currentTimeMillis(); - if (Now > lastAttempt + 2000) - attempts = 1; - else - attempts++; - lastAttempt = Now; - return attempts; - } - } - */ - // -------------------------------------------- // // OBSIDIAN GENERATORS // -------------------------------------------- //