So I’m just writing a plugin with Spigot 1.21.4 where I need to check if the Player clicked on a Lectern. In earlier version you could just do this:
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if (event.getClickedBlock() != null && event.getClickedBlock().getType() == Material.STONE) {
// Actions to take here
}
}
But in the newest version of Spigot this doesnt work since I can’t import org.bukkit.Material anymore:
Cannot resolve symbol "Material"
Can anyone help me out how I can do this check in the newest version?
New contributor
Adrian Buder is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.