chiralpenguin / MatsuQueue

Fork of MatsuQueue specifically adapted and updated for Purity Vanilla.
https://www.purityvanilla.com
MIT License
8 stars 0 forks source link

Event Handlers for ServerSwitchEvent #3

Closed chiralpenguin closed 4 years ago

chiralpenguin commented 4 years ago

Description

The plugin will listen for this event and remove players from the queue/slot cluster if they use /server to switch server. This will remove the need to rely on the PurgeQueues() and PurgeSlots() methods to account for players switching to other servers on the network, and will allow the UpdateQueues to be run less often (a separate, more frequent schedule will broadcast the queue position to players in thise case).

How it will work

There will be an event handler for ServerSwitchEvent to check if a player has left the queue or destination server using the '/server' command. If they have, they will be removed from their slot or from the queue they were in.

chiralpenguin commented 4 years ago

Implemented in 6ca8de5a7f186827626b79fb7979132ece66cdf2