Closed kit8379 closed 3 years ago
@EventHandler(priority = EventPriority.HIGHEST)
public void onDisconnect(PlayerDisconnectEvent event) {
ProxiedPlayer player = event.getPlayer();
PlayerLocker.unlock(player);
ServerAssignRegistry.clearAsssignedServers(player);
}
I saw this event. Is it means that all assigned server for reiterative section will be cleared after players disconnect from the server?
@EventHandler(priority = EventPriority.HIGHEST) public void onDisconnect(PlayerDisconnectEvent event) { ProxiedPlayer player = event.getPlayer(); PlayerLocker.unlock(player); ServerAssignRegistry.clearAsssignedServers(player); }
I saw this event. Is it means that all assigned server for reiterative section will be cleared after players disconnect from the server?
Yeah, exactly. The assigned server is only meant to be kept as long as the player is online. It's working as intended, but I see the point of your use case.
I'm not actively developing this plugin anymore, but you can remove this event handler limit somehow the amount of entries in the ServerAssignRegistry
map (taking care of memory leaks).
I can't make it work. Any example on it? I want players to connect to the last server they are online within a section. When the player connect to that section. It will redirect to it.