Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5965

BlockRedstoneEvent.setNewCurrent(0) crashes server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • None
    • git-Spigot-c3a49df-2f18108 (MC: 1.16.1)
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            SirYwell SirYwell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: