Update block usage player lookups

This commit is contained in:
gravitylow 2014-04-16 18:35:55 -04:00
parent 91e7b1587f
commit 43d5c32bad
2 changed files with 1 additions and 16 deletions

View File

@ -304,19 +304,4 @@ public class P extends MPlugin {
}
return players;
}
// check if player is allowed to build/destroy in a particular location
public boolean isPlayerAllowedToBuildHere(Player player, Location location) {
return FactionsBlockListener.playerCanBuildDestroyBlock(player, location, "", true);
}
// check if player is allowed to interact with the specified block (doors/chests/whatever)
public boolean isPlayerAllowedToInteractWith(Player player, Block block) {
return FactionsPlayerListener.canPlayerUseBlock(player, block, true);
}
// check if player is allowed to use a specified item (flint&steel, buckets, etc) in a particular location
public boolean isPlayerAllowedToUseThisHere(Player player, Location location, Material material) {
return FactionsPlayerListener.playerCanUseItemHere(player, location, material, true);
}
}

View File

@ -220,7 +220,7 @@ public class FactionsPlayerListener implements Listener {
String name = player.getName();
if (Conf.playersWhoBypassAllProtection.contains(name)) return true;
FPlayer me = FPlayers.i.get(name);
FPlayer me = FPlayers.i.get(player.getUniqueId().toString());
if (me.isAdminBypassing()) return true;
FLocation loc = new FLocation(location);