[SPIGOT-4190] ChunkLoadEvent order fire difference in 1.13 Created: 30/Jul/18  Updated: 30/Jul/18  Resolved: 30/Jul/18

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

Type: Bug Priority: Minor
Reporter: Hunter Miner Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.13

Version: This server is running CraftBukkit version git-Spigot-69774b3-3b8f5be (MC: 1.13) (Implementing API version 1.13-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

I randomly get errors using the Citizens plugin about Entity already tracked.

 I traced it down to when a plugin spawns an entity in the ChunkLoadEvent (Citizens does this)

This causes entities to be added to the chunk, but during a stage that the server hasn't called .addEntities() yet.

Then when the server does call it, the entity is re-added to the world a 2nd time and triggers lots of warnings and errors.

This is different from previous versions where ChunkLoadEvent was called after entities were added to the world.

Entities need to be added from the chunk before ChunkLoadEvent fires, so that ChunkLoadEvent can also (properly) see the entities in the chunk.



 Comments   
Comment by md_5 [ 30/Jul/18 ]

I've moved the call.
Please follow instructions in future.

Comment by md_5 [ 30/Jul/18 ]

Please read the bug report instructions

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