[SPIGOT-779] Block#setType not working for pressure plate Created: 07/Apr/15 Updated: 09/Apr/15 Resolved: 09/Apr/15 |
|
Status: | Closed |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Mr Sugar Caney | Assignee: | Unassigned |
Resolution: | Cannot Reproduce | Votes: | 0 |
Labels: | 1.8, Craftbukkit, spigot | ||
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". |
Attachments: |
![]() |
Description |
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 |
Comments |
Comment by md_5 [ 09/Apr/15 ] |
Cannot reproduce. Code: |
Comment by SpigotMC [ 07/Apr/15 ] |
Your build is not the latest and therefore may be the reason you are having this issue. Spigot is 0 version(s) behind. CraftBukkit is 2942 version(s) behind. This message was automatically generated and is not guaranteed to be a solution to your issue. |