mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 09:27:43 +01:00
Fix join full server permission
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Allow player join full server by permission
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index d6413977a87613a88a155630fa3be9ee9a99d47e..d23d178ff161b8f3d645b7776295bdb0808d12a5 100644
|
index a088205b5c56595e37ad2e725dcfe31849fe1d96..ebddd006afe4960ac90642d4683c5cc8ef0ac33e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -766,7 +766,7 @@ public abstract class PlayerList {
|
@@ -766,7 +766,7 @@ public abstract class PlayerList {
|
||||||
@@ -13,7 +13,7 @@ index d6413977a87613a88a155630fa3be9ee9a99d47e..d23d178ff161b8f3d645b7776295bdb0
|
|||||||
} else {
|
} else {
|
||||||
// return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile) ? new ChatMessage("multiplayer.disconnect.server_full") : null;
|
// return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile) ? new ChatMessage("multiplayer.disconnect.server_full") : null;
|
||||||
- if (this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile)) {
|
- if (this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile)) {
|
||||||
+ if (this.players.size() >= this.maxPlayers && (!player.hasPermission("purpur.joinfullserver") || !this.canBypassPlayerLimit(gameprofile))) { // Purpur
|
+ if (this.players.size() >= this.maxPlayers && !(player.hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameprofile))) { // Purpur
|
||||||
event.disallow(PlayerLoginEvent.Result.KICK_FULL, PaperAdventure.LEGACY_SECTION_UXRC.deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure
|
event.disallow(PlayerLoginEvent.Result.KICK_FULL, PaperAdventure.LEGACY_SECTION_UXRC.deserialize(org.spigotmc.SpigotConfig.serverFullMessage)); // Spigot // Paper - Adventure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user