"~onSpawn" triggered skill doesn't get cancelled when mob spawning is denied.
"~onSpawn" triggered skills don't get cancelled when mob spawning is denied via WorldGuard "mobspawning deny" or other plugins that deny mob spawning like GriefDefender.
Steps to reproduce
- Install the following plugins
- EssentialsX (126.96.36.199)
- LuckPerms (5.3.3)
- MythicMobs (4.12.0)
- WorldEdit (7.2.5)
- WorldGuard (7.0.5)
- Edit the "skeletalknight" example mob as follows to add and ~onSpawn skill. https://paste.helpch.at/pojekujope.coffeescript
- Create a region in game (//pos1, //pos2, //expand vert, /region create test...)
- Add the mobspawning deny flag to the region (/region flag test mobspawning deny)
- Stand within the region.
- Summon a SkeletalKnight
The mob is NOT spawned but the sound is still played. This also occurs with most effects, skills, mechanics, including mechanics from third part plugins like ModelEngine where the model is spawned even though the mob spawning was denied.
Intended correct behavior
The "~onSpawn" triggered skills should not be executed when the mob spawning event is denied or cancelled.
Server log file
Debug log snippet
I didn't run it with debug on... I can later and edit this issue.
The "~onSpawn" trigger should check if the mob spawning event was cancelled before executing.