PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.74k stars 2.27k forks source link

1.21 - ChunkUnloadEvent stackoverflow #10900

Closed TauCubed closed 2 months ago

TauCubed commented 3 months ago

Stack trace

https://paste.gg/p/anonymous/cefc6a21b93646e5a1c684c1fd92012b

Plugin and Datapack List

LuckPerms, spark, SystemChat, testplugin

Actions to reproduce (if known)

call a method that requires the chunk to be loaded in ChunkUnloadEvent. I used getTileEntities.

public final class TestPlugin extends JavaPlugin implements Listener {

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

    @Override
    public void onDisable() {

    }

    @EventHandler
    public void onChunkUnload(ChunkUnloadEvent e) {
        for (org.bukkit.block.BlockState state : e.getChunk().getTileEntities()) {
            //weeeeeee
        }
    }

}

Paper version

[09:34:03 INFO]: Checking version, please wait...
[09:34:03 INFO]: This server is running Paper version 1.21-1-master@21c9a7c (2024-06-17T19:43:38Z) (Implementing API version 1.21-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21-DEV-a7f6633 (MC: 1.21)

Other

No response

Machine-Maker commented 3 months ago

Should be fixes as of https://github.com/PaperMC/Paper/commit/38428c0d6cf9aeea31fffe8f63b8a92c982c8a4f

codebycam commented 2 months ago

This should be fixed as of https://github.com/PaperMC/Paper/commit/f7124df56b0c71b567b67dcffc66dae1cac181ad, @TauCubed.