mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-23 18:55:25 +01:00
Added back a FactionsBlockListener.playerCanBuildDestroyBlock() method which references Location instead of Block, mainly for backwards compatibility
This commit is contained in:
parent
58bec9d6dc
commit
a0909ddb5c
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user