Putting the addListener() call into spawn() was a bad idea.
When the entity was spawned multiple times (for example if it gets dropped or
setTerritory() was called inbetween, there were multiple listeners.
(Also, the SpawnEvent wasn't handled properly.)
The easiest thing for now is not to try to unregister the listeners.
Supersedes #27.
Putting the
addListener()
call intospawn()
was a bad idea. When the entity was spawned multiple times (for example if it gets dropped orsetTerritory()
was called inbetween, there were multiple listeners. (Also, theSpawnEvent
wasn't handled properly.) The easiest thing for now is not to try to unregister the listeners.