[SPIGOT-5965] BlockRedstoneEvent.setNewCurrent(0) crashes server Created: 08/Jul/20  Updated: 08/Jul/20  Resolved: 08/Jul/20

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: SirYwell Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.16.1, redstone

Version: git-Spigot-c3a49df-2f18108 (MC: 1.16.1)
Guidelines Read: Yes

 Description   

I wrote an example plugin:

public class TestPlugin extends JavaPlugin implements Listener {

    @Override
    public void onEnable() {
        Bukkit.getPluginManager().registerEvents(this, this);
    }

    @EventHandler
    public void onRedstone(BlockRedstoneEvent event) {
        event.setNewCurrent(0);
    }
}

With this plugin installed, placing a line of redstone and triggering it with a torch will cause a crash (https://bytebin.lucko.me/GNJxOgLCCQ).
In some cases, the server didn't crash but lagged a while and the torch and the block it was attached to were removed, but I wasn't able to properly reproduce that.



 Comments   
Comment by md_5 [ 08/Jul/20 ]

1.15.2?

Generated at Tue Apr 08 02:45:46 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.