[SPIGOT-8040] SpawnChangeEvent not fired when using /setworldspawn Created: 10/Apr/25  Updated: 13/Apr/25  Resolved: 13/Apr/25

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

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

Java version

java 21.0.3 2024-04-16 LTS
Java(TM) SE Runtime Environment (build 21.0.3+7-LTS-152)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)

OS

Windows 11 24h2

Installed plugins

The only plugin installed is the one used for reproducing this bug.


Attachments: Zip Archive TestPlugin.zip    
Version: CraftBukkit version 4480-Spigot-e339edc-a6012a1 (MC: 1.21.5) (Implementing API version 1.21.5-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

When listening for SpawnChangeEvent in a plugin, the listener method is not called when the command /setworldspawn is executed, and I couldn't find any version of Spigot where this worked.
After a bit of research, a similar issue was opened on PaperMC/Paper repository (https://github.com/PaperMC/Paper/issues/1913).
It appears it is due to the fact that the Event was created before the vanilla command was created.
There's also a PR on Paper's repository fixing this issue (https://github.com/PaperMC/Paper/pull/4177/files), I'm guessing this wouldn't be very different for Spigot.

I've added a .zip containing the plugin I used for testing.

Let me know if you need any more information

Thank you in advance


Generated at Sat Dec 13 13:37:08 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.