-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
Windows 10 x64
openjdk version "22.0.1" 2024-04-16
OpenJDK Runtime Environment (build 22.0.1+8-16)
OpenJDK 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)
-
CraftBukkit version 4251-Spigot-491f367-f672c35 (MC: 1.21) (Implementing API version 1.21-R0.1-SNAPSHOT)
-
Yes
When using Material#isInteractable(), uninteractable and interactable blocks return the same value.
I made a simple function to test this.
@EventHandler public static void debug(PlayerInteractEvent e){ Player player = e.getPlayer(); player.sendMessage("Hand: " + e.getHand()); Block block = e.getClickedBlock(); player.sendMessage("Block: " + block); if (block == null)return; Material material = block.getType(); player.sendMessage("Intractable: " + material.isInteractable()); player.sendMessage("_"); }
Right-Clicking on Buttons, Doors, Hatches, Chests, and Redstone Repeaters all returned False.
Right-Clicking on a Grass Block also returned False, which is good.