BlockPistonRetractEvent not firing (only BlockPistonExtendEvent) for sticky pistons #445

Closed
opened 2026-02-21 01:54:46 +01:00 by Ivan8or · 1 comment
Ivan8or commented 2026-02-21 01:54:46 +01:00 (Migrated from github.com)

Expected behavior

When a sticky piston extends and retracts in-game, both BlockPistonExtendEvent and BlockPistonRetractEvent should fire respectively.

Observed/Actual behavior

When a sticky piston extends and retracts in-game, only BlockPistonExtendEvent fires; BlockPistonRetractEvent never fires.

Steps/models to reproduce

minimal demo plugin:


import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPistonExtendEvent;
import org.bukkit.event.block.BlockPistonRetractEvent;
import org.bukkit.plugin.java.JavaPlugin;


public final class PistonPlugin extends JavaPlugin implements Listener {

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

    @EventHandler
    public void onPistonExtendEvent(final BlockPistonExtendEvent e) {
        System.out.println("a piston extend event occurred!");
    }

    @EventHandler
    public void onPistonRetractEvent(final BlockPistonRetractEvent e) {
        System.out.println("a piston retract event occurred!");
    }
}

in-game:

  1. Place down a sticky piston.
  2. Place a lever next to the sticky piston.
  3. Yank That Lever!

Plugin and Datapack List

> /plugins
[19:51:51 INFO]: ℹ Server Plugins (1):
[19:51:51 INFO]: Bukkit Plugins:
[19:51:51 INFO]:  - PistonPlugin
> /datapack list
[19:51:53 INFO]: Unknown or incomplete command. See below for error
datapack list<--[HERE]

Folia version

[19:51:11 INFO]: This server is running Folia version 1.21.11-13-ver/1.21.11@e9e85fd (2026-02-15T20:15:31Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.11-4-7b7a7ef (MC: 1.21.11)

Other

Regular pistons fire both events as expected, this is an issue specific to sticky pistons.

### Expected behavior When a sticky piston extends and retracts in-game, both BlockPistonExtendEvent and BlockPistonRetractEvent should fire respectively. ### Observed/Actual behavior When a sticky piston extends and retracts in-game, only BlockPistonExtendEvent fires; BlockPistonRetractEvent never fires. ### Steps/models to reproduce minimal demo plugin: ``` import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.BlockPistonExtendEvent; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.plugin.java.JavaPlugin; public final class PistonPlugin extends JavaPlugin implements Listener { @Override public void onEnable() { getServer().getPluginManager().registerEvents(this, this); } @EventHandler public void onPistonExtendEvent(final BlockPistonExtendEvent e) { System.out.println("a piston extend event occurred!"); } @EventHandler public void onPistonRetractEvent(final BlockPistonRetractEvent e) { System.out.println("a piston retract event occurred!"); } } ``` in-game: 1. Place down a sticky piston. 2. Place a lever next to the sticky piston. 3. Yank That Lever! ### Plugin and Datapack List ``` > /plugins [19:51:51 INFO]: ℹ Server Plugins (1): [19:51:51 INFO]: Bukkit Plugins: [19:51:51 INFO]: - PistonPlugin > /datapack list [19:51:53 INFO]: Unknown or incomplete command. See below for error datapack list<--[HERE] ``` ### Folia version ``` [19:51:11 INFO]: This server is running Folia version 1.21.11-13-ver/1.21.11@e9e85fd (2026-02-15T20:15:31Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT) You are running the latest version Previous version: 1.21.11-4-7b7a7ef (MC: 1.21.11) ``` ### Other Regular pistons fire both events as expected, this is an issue specific to sticky pistons.
Lulu13022002 commented 2026-02-24 23:17:21 +01:00 (Migrated from github.com)

That's a paper issue which will be fixed in https://github.com/PaperMC/Paper/pull/12985

That's a paper issue which will be fixed in https://github.com/PaperMC/Paper/pull/12985
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia#445
No description provided.