mirror of
https://github.com/PaperMC/Folia.git
synced 2024-11-21 11:55:11 +01:00
Make Player#kickPlayer function asynchronously
We have made disconnect() mt-safe, so there is no need for this check anymore.
This commit is contained in:
parent
7af86e656d
commit
0e4358fb7e
@ -22155,9 +22155,18 @@ index 78f53ee557276de85f0431ebcb146445b1f4fb92..91a11cfa430c63455e2d54125d6e1bd4
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0351eb67bac6ce257f820af60aa3bba9f45da687..88006751825515966dcea1f779ac5452c8ddd964 100644
|
||||
index 0351eb67bac6ce257f820af60aa3bba9f45da687..7b29843302d7aba8e64a2533a4b2203e9f30ecca 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -563,7 +563,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void kickPlayer(String message) {
|
||||
- org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot
|
||||
+ //org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot // Folia - thread-safe now, as it will simply delay the kick
|
||||
if (this.getHandle().connection == null) return;
|
||||
|
||||
this.getHandle().connection.disconnect(message == null ? "" : message, org.bukkit.event.player.PlayerKickEvent.Cause.PLUGIN); // Paper - kick event cause
|
||||
@@ -1702,7 +1702,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
private void unregisterEntity(Entity other) {
|
||||
// Paper end
|
||||
|
Loading…
Reference in New Issue
Block a user