[SPIGOT-6895] Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent Created: 09/Jan/22  Updated: 12/Mar/22  Resolved: 12/Mar/22

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

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

Attachments: File TestPlugin-1.11.2-SNAPSHOT-LOCAL.jar    
Version: This server is running CraftBukkit version 3397-Spigot-f4ff00f-f3828bb (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   
public class TestPlugin extends JavaPlugin implements Listener {


    @Override
    public void onEnable() {
        getLogger().info("Test plugin loaded");
        Bukkit.getPluginManager().registerEvents(this, this);


    }


    @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
    public void onSaplingPlace(BlockPlaceEvent e) {
        Block b = e.getBlock();
        if (Tag.SAPLINGS.isTagged(b.getType())) {
            for (int i = 0; i < 100; i++) {
                b.applyBoneMeal(BlockFace.UP); // Just do it enough to induce growth
            }
        }
    }


    @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
    public void onTreeGrow(StructureGrowEvent e) {
        getLogger().info("This never gets called as a result of the growth even though the bonemeal works");
    }
} 

It'd be useful to have structures grown using the applyBoneMeal() method fire the StructureGrowthEvent.

 



 Comments   
Comment by Marvin Rieple [ 12/Mar/22 ]

Made a PR for this: craftbukkit#1030

Generated at Sat Dec 13 20:45:55 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.