Switch isAir() to .equals(Material.AIR) to support 1.13

This commit is contained in:
Lesley Dom committed 2020-09-17 14:41:24 +02:00
1 parent 2ad5284a6d
commit 2299896998
1 file changed
+3 -2
@@ -27,6 +27,7 @@ package net.arcaniax.buildersutilities.listeners;
import net.arcaniax.buildersutilities.Settings;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPhysicsEvent;
@@ -39,8 +40,8 @@ public class BlockPhysicsListener implements Listener {
@EventHandler
public void onPhysics(BlockPhysicsEvent e) {
if (e.getSourceBlock().getType().isAir()){
if (e.getChangedType().isAir()){
if (e.getSourceBlock().getType().equals(Material.AIR)){
if (e.getChangedType().equals(Material.AIR)){
if (e.getBlock().getLocation().getBlockY()>0){
if (e.getBlock().getLocation().add(0, -1, 0).getBlock().getType().name().toLowerCase().contains("grass_block")){
return;