-
Type:
Bug
-
Resolution: Cannot Reproduce
-
None
-
Affects Version/s: None
-
Environment:
spigot-1.8.3 and craftbukkit-1.8.3. Run on laptop (windows 7). Intel i5 4GB ram. Running Java 8 update 25. Started with "java -jar xxx-1.8.3.jar".
When I try to change the material of a block, blocks with Material.STONE_PLATE do not get updated. Other blocks work just fine, however I can't get the pressure plates replaced.
The code I used (in PlayerInteractEvent: p=player):
Block b = e.getClickedBlock(); Location blockLocation = b.getLocation(); for (int x = -1; x <= 1; x++) { for (int z = -1; z <= 1; z++) { Location loc = new Location(b.getWorld(), b.getX() + x, p.getLocation().getY(), p.getLocation().getZ() + z); //if (loc.getBlock().getType() == Material.STONE_PLATE) { loc.getBlock().setType(Material.GLOWING_REDSTONE_ORE); //} } }
(Complete source of CrystalQuest: https://github.com/MrSugarCaney/CrystalQuest
ItemListener class: https://github.com/MrSugarCaney/CrystalQuest/blob/master/src/nl/SugCube/CrystalQuest/Items/ItemListener.java)