Another small refactor

This commit is contained in:
Shevchik 2013-09-03 21:53:08 +04:00
parent b88af8e96f
commit 8da5322de5
2 changed files with 10 additions and 5 deletions

View File

@ -163,11 +163,16 @@ public class EventListener implements Listener {
continue;
}
}
if (blockOkay
|| (player.hasPermission("chairs.sit." + block.getTypeId() + ":" + block.getData()) && plugin.perItemPerms)
|| (player.hasPermission("chairs.sit." + block.getType().toString() + ":" + block.getData()) && plugin.perItemPerms)
|| (player.hasPermission("chairs.sit." + block.getTypeId()) && plugin.perItemPerms)
|| (player.hasPermission("chairs.sit." + block.getType().toString()) && plugin.perItemPerms)) {
if (blockOkay ||
(plugin.perItemPerms &&
(
player.hasPermission("chairs.sit." + block.getTypeId() + ":" + block.getData()) ||
player.hasPermission("chairs.sit." + block.getType().toString() + ":" + block.getData()) ||
player.hasPermission("chairs.sit." + block.getTypeId()) ||
player.hasPermission("chairs.sit." + block.getType().toString())
)
)
) {
if (block.getState().getData() instanceof Stairs) {
stairs = (Stairs) block.getState().getData();

Binary file not shown.