Made this per someone's request. Added the trigger functionality because I noticed to right click a spawner, one must be OP oddly enough. Otherwise, the PlayerInteractEvent doesn't fire. Also the spawn event will tell you if a mob spawned due to a spawner, but sadly doesn't provide a conduit back to said spawner. So the only way I can correlate mobs to their spawners is to check if they are within 16 blocks of said spawner. I read that 16 is the distance on a wiki somewhere. However, in case I'm wrong, I made that adjustable in the configuration.
I designed this under 1.17 as that's what my test server is, but should work on any modern Spigot version.
Commands:
/SUR SET number
sur.set Enters selection mode to set a spawner as a user limited spawner. Number is the minimum amount of players that have to be on to allow the selected spawner to work.
/SUR DEL sur.del Removes the user requirement from a spawner.
/SUR LIST sur.list Lists all spawners that have user requirements.
/SUR TRIGGER trigger
sur.trigger Sets whether left or right click is the trigger to select a spawner during set or del.
/SUR RANGE number
sur.range Sets the distance from the spawner with which to correlate a mob spawn to said spawner.