From a0909ddb5c409975c301ea27a1d5e3a08970fd5b Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 16 May 2012 11:52:47 -0500 Subject: [PATCH] Added back a FactionsBlockListener.playerCanBuildDestroyBlock() method which references Location instead of Block, mainly for backwards compatibility --- .../factions/listeners/FactionsBlockListener.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsBlockListener.java b/src/com/massivecraft/factions/listeners/FactionsBlockListener.java index 836ef7c9..c7963954 100644 --- a/src/com/massivecraft/factions/listeners/FactionsBlockListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsBlockListener.java @@ -55,8 +55,13 @@ public class FactionsBlockListener implements Listener event.setCancelled(true); } } - + public static boolean playerCanBuildDestroyBlock(Player player, Block block, String action, boolean justCheck) + { + return playerCanBuildDestroyBlock(player, block.getLocation(), action, justCheck); + } + + public static boolean playerCanBuildDestroyBlock(Player player, Location location, String action, boolean justCheck) { String name = player.getName(); if (Conf.playersWhoBypassAllProtection.contains(name)) return true; @@ -64,7 +69,6 @@ public class FactionsBlockListener implements Listener FPlayer me = FPlayers.i.get(name); if (me.hasAdminMode()) return true; - Location location = block.getLocation(); FLocation loc = new FLocation(location); Faction factionHere = Board.getFactionAt(loc);