Update block usage player lookups
This commit is contained in:
parent
91e7b1587f
commit
43d5c32bad
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user