Added back a FactionsBlockListener.playerCanBuildDestroyBlock() method which references Location instead of Block, mainly for backwards compatibility

This commit is contained in:
Brettflan 2012-05-16 11:52:47 -05:00
parent 58bec9d6dc
commit a0909ddb5c

View File

@ -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);