Skip to content

Throw an error when attempting to remove worldspawn in RemoveEntity/RemoveEdict#2104

Merged
peace-maker merged 2 commits intoalliedmodders:masterfrom
CookieCat45:master
Feb 20, 2024
Merged

Throw an error when attempting to remove worldspawn in RemoveEntity/RemoveEdict#2104
peace-maker merged 2 commits intoalliedmodders:masterfrom
CookieCat45:master

Conversation

@CookieCat45
Copy link
Contributor

It's probably common knowledge at this point that calling RemoveEntity on the worldspawn will instantly crash the server. Since it can be agreed that there is no real reason to ever do this, I've changed it so that it throws an error instead. This way, if a plugin ends up accidentally removing the worldspawn, it will be much easier for the plugin author to fix the issue.

Copy link
Member

@peace-maker peace-maker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, an error message is indeed easier to debug than a crash.

@peace-maker peace-maker merged commit 8dcbe14 into alliedmodders:master Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants