Fixed NullPointer clicking air with flint and steel

This commit is contained in:
Fabrizio La Rosa 2020-07-03 05:38:36 +02:00
parent d7c668d1c4
commit b091c065a8

View File

@ -31,7 +31,8 @@ public class FirePermission extends ListeningPermission {
Player player = event.getPlayer();
if (CompatibleMaterial.getMaterial(player.getTargetBlock(null, 5)).equals(CompatibleMaterial.FIRE))
CompatibleMaterial targetMaterial = CompatibleMaterial.getMaterial(player.getTargetBlock(null, 5));
if (targetMaterial != null && targetMaterial.equals(CompatibleMaterial.FIRE))
cancelAndMessage(event, player, plugin, messageManager);
}