mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-27 01:45:44 -05:00
Handle full server kicks separately from other join restrictions (#315)
* Handle full server kicks separately from other join restrictions (closes #312) * Add missing condition * Add bracket back * Remove extra bracket Co-authored-by: Kaboom <58372747+kaboombot@users.noreply.github.com>
This commit is contained in:
parent
6936749213
commit
69ef06fc32
1 changed files with 8 additions and 1 deletions
|
@ -94,7 +94,14 @@ public final class PlayerConnection implements Listener {
|
|||
|
||||
@EventHandler
|
||||
void onPlayerLogin(final PlayerLoginEvent event) {
|
||||
if (!ENABLE_JOIN_RESTRICTIONS) {
|
||||
// #312 - If allow join on full server is off,
|
||||
// but join restrictions are disabled,
|
||||
// player can still join on full server
|
||||
|
||||
// Full server kicks should be handled differently from other join restrictions
|
||||
// since we have a separate configuration value for it
|
||||
|
||||
if (!ENABLE_JOIN_RESTRICTIONS && !Result.KICK_FULL.equals(event.getResult())) {
|
||||
event.allow();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue