Stopped Referencing ItemStack by mistake

This commit is contained in:
Driftay 2019-09-28 03:05:03 -04:00
parent 6f20087ebe
commit 4ab3f3a465
1 changed files with 2 additions and 3 deletions

View File

@ -793,9 +793,8 @@ 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 (event.getItem() != null) { if (Conf.territoryBypassProtectedMaterials.contains(block.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);