diff --git a/src/main/java/fun/ogre/ogredupealias/utils/ServerUtils.java b/src/main/java/fun/ogre/ogredupealias/utils/ServerUtils.java index 09df27c..0fb8387 100644 --- a/src/main/java/fun/ogre/ogredupealias/utils/ServerUtils.java +++ b/src/main/java/fun/ogre/ogredupealias/utils/ServerUtils.java @@ -3,6 +3,7 @@ package fun.ogre.ogredupealias.utils; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.TextComponent; import org.bukkit.Bukkit; +import org.bukkit.Material; import org.bukkit.entity.Player; import java.util.ArrayList; @@ -58,4 +59,8 @@ public class ServerUtils { } }); } + + public static boolean hasBlockBelow(Player p, Material type) { + return p.getLocation().clone().subtract(0, 1, 0).getBlock().getType() == type; + } }