Bug Closed · Resolved

SpawnReason changed from CUSTOM to PATROL

#6783 opened by Unknown 8 months ago

Unknownreported this bug

Summary

After upgrading from MythicMobs version 5.9.1 to 5.10.1, the API method MobExecutor.spawnMob(String type, Location location) has changed the Bukkit SpawnReason in the corresponding mob consistently from CUSTOM to PATROL.

Steps to reproduce

Use the MobExecutor.spawnMob(String type, Location location) method on version 5.10.1 to spawn a mob and inspect the spawn reason.

Current behavior

The mob's org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason is PATROL.

Intended correct behavior

The mob's org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason should be CUSTOM.

Proposed fixes

The spawn reason should be set back to CUSTOM (the semantically correct spawn reason for spawns from plugins), since other plugins potentially depend on the detection of CUSTOM reasons (e.g. Towny mob spawn filters). Alternatively, add an overload that will accept a org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason to set a desired reason (in addition to the overloads that take io.lumine.mythic.api.mobs.entities.SpawnReason)

Sign in to join the discussion.