commit
b06e6e0f04
@ -805,7 +805,9 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
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) return; // clicked in air, apparently
|
if (block == null) return; // clicked in air, apparently
|
||||||
if (Conf.territoryBypassProtectedMaterials.contains(event.getItem().getType())) return;
|
if(event.getItem() != null) {
|
||||||
|
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