mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Allow player join full server by permission
This commit is contained in:
@@ -16,6 +16,15 @@
|
||||
ServerLevel serverLevel = player.serverLevel();
|
||||
player.awardStat(Stats.LEAVE_GAME);
|
||||
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
|
||||
@@ -665,7 +_,7 @@
|
||||
// return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile)
|
||||
// ? Component.translatable("multiplayer.disconnect.server_full")
|
||||
// : null;
|
||||
- if (this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile)) {
|
||||
+ if (this.players.size() >= this.maxPlayers && !(player.hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission
|
||||
event.disallow(org.bukkit.event.player.PlayerLoginEvent.Result.KICK_FULL, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure
|
||||
}
|
||||
}
|
||||
@@ -919,6 +_,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user