[SPIGOT-4178] BlockPhysicsEvent gets triggered, but cancelling doesn't work Created: 28/Jul/18  Updated: 28/Jul/18  Resolved: 28/Jul/18

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

Type: Bug Priority: Minor
Reporter: PlayFriik Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

Windows 10 64-bit

Java 8


Attachments: File Test.jar    
Version: This server is running CraftBukkit version git-Spigot-69774b3-ff9bab1 (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

The title pretty much sums up the problem.

When I cancel the event, then the torches, signs etc. still pop off, when I break the block they are attached to.

Video: https://www.youtube.com/watch?v=cq9isjwYf3o

Code:

public class Test extends JavaPlugin implements Listener {
  public void onEnable() {
    Bukkit.getLogger().info("[Test] Test v" + getDescription().getVersion() + " is enabled!");
    Bukkit.getPluginManager().registerEvents(this, this);
  }

  public void onDisable() {
    Bukkit.getLogger().info("[Test] Test v" + getDescription().getVersion() + " is disabled!");
  }

  @EventHandler(priority = EventPriority.HIGHEST)
  public void onBlockPhysics(BlockPhysicsEvent e) {
    e.setCancelled(true);
  }
}


 Comments   
Comment by PlayFriik [ 28/Jul/18 ]

This code on 1.12.2 Spigot works as expected (torches, signs etc. keep attached to air).

Comment by Black Hole [ 28/Jul/18 ]

I don't think there is a BlockPhysicsEvent called if a torch breaks.

Generated at Sat Dec 13 15:25:19 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.