change
This commit is contained in:
parent
ba86f28994
commit
0d8526372e
@ -804,8 +804,10 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
Block block = event.getClickedBlock();
|
Block block = event.getClickedBlock();
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
// Check if the material is bypassing protection
|
// Check if the material is bypassing protection
|
||||||
if (block == null || event.getItem() == null) return; // clicked in air, apparently
|
if (block == null) return; // clicked in air, apparently
|
||||||
|
if(event.getItem() != null) {
|
||||||
if (Conf.territoryBypassProtectedMaterials.contains(event.getItem().getType())) return;
|
if (Conf.territoryBypassProtectedMaterials.contains(event.getItem().getType())) return;
|
||||||
|
}
|
||||||
if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) != null) {
|
if (GetPermissionFromUsableBlock(event.getClickedBlock().getType()) != null) {
|
||||||
if (!canPlayerUseBlock(player, block, false)) {
|
if (!canPlayerUseBlock(player, block, false)) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user