-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
Ubuntu 16.04 - Intel i7
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
-
This server is running CraftBukkit version git-Spigot-eb21557-4a47be6 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT)
-
Yes
NullPointerException when calling setType(Material.ARMOR_STAND) on a BlockState object.
Example snippet:
Block block = getServer().getWorlds().get(0).getBlockAt(0, 200, 0);
BlockState blockState = block.getState();
try { blockState.setType(Material.ARMOR_STAND);}
catch(Exception e){ getLogger().severe("armor stand threw exception: "+e); }
Hint: Probable cause is that NMS does not have armor stand as a block, causing static constructor of org.bukkit.craftbukkit.util.CraftMagicNumbers to add null in the map. There is a todo comment that indicates that someone might already be aware of the issue.