mirror of
https://github.com/darksaid98/Builders-Utilities.git
synced 2026-12-03 14:38:48 +00:00
Switch isAir() to .equals(Material.AIR) to support 1.13
This commit is contained in:
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 net.arcaniax.buildersutilities.Settings;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||||
@@ -39,8 +40,8 @@ public class BlockPhysicsListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPhysics(BlockPhysicsEvent e) {
|
public void onPhysics(BlockPhysicsEvent e) {
|
||||||
if (e.getSourceBlock().getType().isAir()){
|
if (e.getSourceBlock().getType().equals(Material.AIR)){
|
||||||
if (e.getChangedType().isAir()){
|
if (e.getChangedType().equals(Material.AIR)){
|
||||||
if (e.getBlock().getLocation().getBlockY()>0){
|
if (e.getBlock().getLocation().getBlockY()>0){
|
||||||
if (e.getBlock().getLocation().add(0, -1, 0).getBlock().getType().name().toLowerCase().contains("grass_block")){
|
if (e.getBlock().getLocation().add(0, -1, 0).getBlock().getType().name().toLowerCase().contains("grass_block")){
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in new issue
Block a user