-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
Tested on Windows 10 Pro 1909 and Linux 5.5.3-arch1-1 openjdk version "13.0.2" 2020-01-14 OpenJDK Runtime Environment Zulu13.29+9-CA (build 13.0.2+6-MTS) OpenJDK 64-Bit Server VM Zulu13.29+9-CA (build 13.0.2+6-MTS, mixed mode, sharing) CraftBukkit version git-Spigot-6de3d4b-fc24934 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
Tested on Windows 10 Pro 1909 and Linux 5.5.3-arch1-1 openjdk version "13.0.2" 2020-01-14 OpenJDK Runtime Environment Zulu13.29+9-CA (build 13.0.2+6-MTS) OpenJDK 64-Bit Server VM Zulu13.29+9-CA (build 13.0.2+6-MTS, mixed mode, sharing) CraftBukkit version git-Spigot-6de3d4b-fc24934 (MC: 1.15.2) (Implementing API version 1.15.2-R0.1-SNAPSHOT)
-
git-Spigot-6de3d4b-fc24934 (1.15.2)
-
Yes
https://www.youtube.com/watch?v=2YZR8s9i2Ik
Test source: https://github.com/toriato/TestNoteBlockEvent
Thread: https://www.spigotmc.org/threads/cant-change-the-instrument-of-the-noteblock.421743/
Title: Can't change the instrument of the NoteBlock
Below code will works only for the manual change but not on redstone update
I tested update the noteblock after the NoteBlock#setInstrument but it didn't works either
@EventHandler(priority = EventPriority.HIGHEST) public void onNotePlay (NotePlayEvent event) { Block block = event.getBlock(); NoteBlock blockData = (NoteBlock) block.getBlockData(); blockData.setInstrument(Instrument.BANJO); // Block will not be updated when the event called by redstone block.setBlockData(blockData); // Some of method I tried to update the block self and relative blocks block.getState().update(); // not works block.getState().update(true); // nah block.getRelative(BlockFace.DOWN).setType(Material.AIR); // no chance }