From c8558f7bbba72cee82fd1d5b5551170e903bf37c Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sat, 4 Feb 2012 16:22:55 -0600 Subject: [PATCH] Release 1.7.2c: Most TNT explosions were being prevented due to a mistake on my part when I re-implemented our TNT+redstone exploit workaround fix, sorry about that. That's fixed, and the X/Z coordinates for such prevented attempts are no longer sent to players, only sent to the server console/log. --- plugin.yml | 2 +- .../factions/listeners/FactionsBlockListener.java | 12 ++++++------ .../factions/listeners/FactionsEntityListener.java | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugin.yml b/plugin.yml index 30b9688b..e646a23f 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,5 +1,5 @@ name: Factions -version: 1.7.2_dev +version: 1.7.2c_dev main: com.massivecraft.factions.P authors: [Olof Larsson, Brett Flannigan] softdepend: [PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, iChat, LocalAreaChat, LWC, nChat, ChatManager, CAPI, AuthMe, Vault, Spout, WorldEdit, WorldGuard, AuthDB, CaptureThePoints, CombatTag] diff --git a/src/com/massivecraft/factions/listeners/FactionsBlockListener.java b/src/com/massivecraft/factions/listeners/FactionsBlockListener.java index 92e95ccb..aa89f8f5 100644 --- a/src/com/massivecraft/factions/listeners/FactionsBlockListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsBlockListener.java @@ -96,13 +96,13 @@ public class FactionsBlockListener implements Listener if ( ! playerCanBuildDestroyBlock(event.getPlayer(), event.getBlock(), "build", false)) { event.setCancelled(true); - } - Material handItem = event.getPlayer().getItemInHand().getType(); - if (handItem == Material.TNT || handItem == Material.REDSTONE_TORCH_ON) - { - Faction targetFaction = Board.getFactionAt(new FLocation(event.getBlock())); - FactionsEntityListener.trackPotentialExplosionExploit(event.getPlayer().getName(), targetFaction, handItem, event.getBlock().getLocation()); + Material handItem = event.getPlayer().getItemInHand().getType(); + if (handItem == Material.TNT || handItem == Material.REDSTONE_TORCH_ON) + { + Faction targetFaction = Board.getFactionAt(new FLocation(event.getBlock())); + FactionsEntityListener.trackPotentialExplosionExploit(event.getPlayer().getName(), targetFaction, handItem, event.getBlock().getLocation()); + } } } diff --git a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java index 640d4ce2..b60eaa51 100644 --- a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java @@ -360,11 +360,11 @@ public class FactionsEntityListener implements Listener if (absX < 5 && absZ < 5) { // it sure looks like an exploit attempt // let's tattle on him to everyone - String msg = "NOTICE: Player \""+ex.playerName+"\" attempted to exploit a TNT bug in the territory of \""+ex.faction.getTag()+"\" at "+ex.X+","+ex.Z+" (X,Z) using a "+ex.item.name(); - P.p.log(Level.WARNING, msg); + String msg = "NOTICE: Player \""+ex.playerName+"\" attempted to exploit a TNT bug in the territory of \""+ex.faction.getTag()+"\""; + P.p.log(Level.WARNING, msg + " at "+ex.X+","+ex.Z+" (X,Z) using a "+ex.item.name()); for (FPlayer fplayer : FPlayers.i.getOnline()) { - fplayer.sendMessage(msg); + fplayer.sendMessage(msg+". Coordinates logged."); } event.setCancelled(true); exploitExplosions.remove(i);