[SPIGOT-5606] BlockRedstoneEvent not called for fence gates Created: 03/Mar/20  Updated: 15/Mar/20  Resolved: 15/Mar/20

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

Type: Bug Priority: Minor
Reporter: Jan Boerman Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: event, fence-gate, redstone
Environment:

Windows 10, Oracle Java 13 (preview features enabled)

 

 


Attachments: PNG File 2020-03-03_18.18.31.png     File RedstoneTestPlugin-1.0.jar    
Version: git-Spigot-8faa8b4-13ed05d
Guidelines Read: Yes

 Description   

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.


 Comments   
Comment by Jan Boerman [ 03/Mar/20 ]

Pull Request: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/641

Generated at Sat Mar 29 00:43:17 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.