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

BlockRedstoneEvent not called for fence gates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Windows 10, Oracle Java 13 (preview features enabled)

       

       

    • git-Spigot-8faa8b4-13ed05d
    • Yes

      The BlockRedstoneEvent is not called when fence gates are opened/closed by redstone power. This goes against the expectation because for doors blocks this event is called (albeit for only the half that received power)

       

      Steps to reproduce:

      1. Put the following plugin your server (now included in the attachments):
        package com.example;
        
        import org.bukkit.event.EventHandler;
        import org.bukkit.event.Listener;
        import org.bukkit.event.block.BlockRedstoneEvent;
        import org.bukkit.plugin.java.JavaPlugin;
        
        public class TestPlugin extends JavaPlugin implements Listener {
        
            @Override
            public void onEnable() {
                getServer().getPluginManager().registerEvents(this, this);
            }
        
            @EventHandler
            public void onBlockRedstoneEvent(BlockRedstoneEvent event) {
                getLogger().info(event.getBlock().getType().name());
            }
        
        }
        

         

      1. Start the server and build a setup such as in my attachment.
      1. Flick the lever and verify through the console/logs that the only materials for which the event is called are LEVER, REDSTONE_WIRE and OAK_DOOR. The OAK_FENCE_GATE is missing.

            Unassigned Unassigned
            Jannyboy11 Jan Boerman
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: