mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
[ci skip] Fix diff
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Do not place player if the server is full
|
||||
Fix https://github.com/PaperMC/Paper/issues/10668
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index fae3c65d7411cd2c279dde27f8b8eafd45b657cf..34c5c2e3d6b0706cb91ec0171969cf81e94741a4 100644
|
||||
index fae3c65d7411cd2c279dde27f8b8eafd45b657cf..e11bc2fb26d259f0b35cbd94b4a3aed1a33ca0bc 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -342,6 +342,13 @@ public abstract class PlayerList {
|
||||
@@ -14,7 +14,7 @@ index fae3c65d7411cd2c279dde27f8b8eafd45b657cf..34c5c2e3d6b0706cb91ec0171969cf81
|
||||
}
|
||||
// Gale end - MultiPaper - do not place player in world if kicked before being spawned in
|
||||
+ // Leaf start - Do not place player if the server is full - copied from canPlayerLogin
|
||||
+ if (org.dreeam.leaf.config.modules.fixes.DontPlacePlayerIfFull.enabled && this.realPlayers.size() >= this.maxPlayers && !(player.getBukkitEntity().hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission
|
||||
+ if (org.dreeam.leaf.config.modules.fixes.DontPlacePlayerIfFull.enabled && this.realPlayers.size() >= this.maxPlayers && !(player.getBukkitEntity().hasPermission("purpur.joinfullserver") || this.canBypassPlayerLimit(gameProfile))) { // Purpur - Allow player join full server by permission // Leaves - only real player
|
||||
+ connection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)));
|
||||
+ //playerconnection.disconnect(io.papermc.paper.adventure.PaperAdventure.asVanilla(net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.serverFullMessage)), org.bukkit.event.player.PlayerKickEvent.Cause.TIMEOUT);
|
||||
+ return;
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] PlayerInventoryOverflowEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
index 19180c08f41db939c1a9f0caeb62e5beb1117f69..9b5c8c4c39657c18e67ad654bd0e5a30c09232c6 100644
|
||||
index 19180c08f41db939c1a9f0caeb62e5beb1117f69..aff8d16b17992f3228eb9fe8f2bd01d2d7aeea54 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
|
||||
@@ -340,9 +340,49 @@ public class CraftInventory implements Inventory {
|
||||
@@ -340,9 +340,48 @@ public class CraftInventory implements Inventory {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,6 @@ index 19180c08f41db939c1a9f0caeb62e5beb1117f69..9b5c8c4c39657c18e67ad654bd0e5a30
|
||||
+ org.dreeam.leaf.event.player.PlayerInventoryOverflowEvent.isListeningInvOverflowCached = 1;
|
||||
+ return true;
|
||||
+ }
|
||||
+ ;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user