ohowe1 / SpectatorModeRewrite

Minecraft plugin that allows players to go into spectator mode but enables admins to prevent features of it.
https://www.spigotmc.org/resources/smp-spectator-mode-1-16-support.77267/
MIT License
17 stars 9 forks source link

plugin is not removing persistence from mobs when player leaves spectator #49

Closed sxphirus closed 2 years ago

sxphirus commented 2 years ago

Describe the bug After using /s to deactivate spectator mode persistence is not being removed from entities

To Reproduce Steps to reproduce the behavior:

  1. Use /s while mobs are around the user
  2. Leave /s
  3. More mobs will spawn in as persistence has been added and not removed correctly ?

Minecraft version 1.17.1

Expected behavior Persistence is removed

Additional context Possibly adding a config option for adding persistence to mobs or removing the feature altogether (https://github.com/carelesshippo/SpectatorModeRewrite/blob/b34be58a849992dc06f72d402c2cdfba374c23e6/src/main/java/me/ohowe12/spectatormode/state/State.java#L164) I understand this is added so /s users can see mobs around them, however, it can cause huge groups of mobs to never despawn, making the plugin not very practical when in use on a public server.

ohowe1 commented 2 years ago

There is a config option for this currently. It is the mobs config value.