3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Upstream blocked Player#remove so our patch needed to be refactored

Dieser Commit ist enthalten in:
Jake Potrebic 2023-12-06 09:54:52 -08:00
Ursprung 6c4efc92be
Commit 0dee538a62
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 27CC63F7CBC866C7
22 geänderte Dateien mit 73 neuen und 80 gelöschten Zeilen

Datei anzeigen

@ -1,33 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Mon, 4 Feb 2019 23:33:24 -0500
Subject: [PATCH] Block Entity#remove from being called on Players
This doesn't result in the same behavior as other entities and causes
several problems. Anyone ever complain about the "Cannot send chat
message" thing? That's one of the issues this causes, among others.
If a plugin developer can come up with a valid reason to call this on a
Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 268814e3de4ee19c9e248080d77b20a7c2773bb0..abbbd559ee0301e261419a4e1c2c082174a91881 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2909,6 +2909,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() {
getHandle().resetAttackStrengthTicker();
}
+
+ @Override
+ public void remove() {
+ if (this.getHandle().getClass().equals(ServerPlayer.class)) { // special case for NMS plugins inheriting
+ throw new UnsupportedOperationException("Calling Entity#remove on players produces undefined (bad) behavior");
+ } else {
+ super.remove();
+ }
+ }
// Paper end
// Spigot start
private final Player.Spigot spigot = new Player.Spigot()

Datei anzeigen

@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io>
Date: Mon, 4 Feb 2019 23:33:24 -0500
Subject: [PATCH] Dont block Player#remove if the handle is a custom player
Upstream throws UOE if you try to call remove on a Player.
We just add a check to ensure that the CraftPlayer's handle
is a ServerPlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 268814e3de4ee19c9e248080d77b20a7c2773bb0..629a3cdefd42c09bb2561a56a725357b40ef9ce2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -253,8 +253,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void remove() {
+ if (this.getHandle().getClass().equals(ServerPlayer.class)) { // special case for NMS plugins inheriting
// Will lead to an inconsistent player state if we remove the player as any other entity.
throw new UnsupportedOperationException(String.format("Cannot remove player %s, use Player#kickPlayer(String) instead.", this.getName()));
+ } else {
+ super.remove();
+ }
}
@Override

Datei anzeigen

@ -136,10 +136,10 @@ index 3a026f766e2d67e005ae8a06337d465f92c8d1f3..352fbab070ccdb683e9a7558292c86cc
this.adventure$locale = net.kyori.adventure.translation.Translator.parseLocale(this.language); // Paper
this.requestedViewDistance = clientOptions.viewDistance();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index abbbd559ee0301e261419a4e1c2c082174a91881..e00e595677ce0b4e9e1e12883b06f99f55af7d31 100644
index 629a3cdefd42c09bb2561a56a725357b40ef9ce2..706ff6991f36da3b7c55cc4aa88f3cceba2b3f2d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -611,6 +611,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -615,6 +615,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
}
}

Datei anzeigen

@ -57,10 +57,10 @@ index 6b53e65308fb4118ef2d78ec9d171722ba2301f5..2d0ce31011ce1dbbf3c86f09bbf9a41a
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e00e595677ce0b4e9e1e12883b06f99f55af7d31..16476b8d20619d8526658db24ed3de60a151ffcf 100644
index 706ff6991f36da3b7c55cc4aa88f3cceba2b3f2d..559878d9dad24e0c90c317ad9be593f7ccbc05ad 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3026,6 +3026,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3021,6 +3021,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 16476b8d20619d8526658db24ed3de60a151ffcf..3c0295db596da4fd743730fc5a74f1b4c5b60a98 100644
index 559878d9dad24e0c90c317ad9be593f7ccbc05ad..dc901d056051e6300d78a2949ca6b42169316c3e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2541,7 +2541,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2545,7 +2545,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null) {
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
}

Datei anzeigen

@ -32,10 +32,10 @@ index 0d6ee2bce8e4243912e9c90999002a7efd68ac71..c76245eccdfbfc22c8c5bc9c04471259
public boolean isWhiteListed(GameProfile profile) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3c0295db596da4fd743730fc5a74f1b4c5b60a98..5e502235fc72b7cacf1b460065bd0d0f68add5f3 100644
index dc901d056051e6300d78a2949ca6b42169316c3e..7fbe129062a36e6e41d564989901cdab272109df 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -635,6 +635,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -639,6 +639,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

Datei anzeigen

@ -144,10 +144,10 @@ index ba65b69e967ad933fec5e87da1ccfba25a42a372..eb04b74e2d71bf1842a19b346576f0ff
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 5e502235fc72b7cacf1b460065bd0d0f68add5f3..40553b12460b6f5b4db253134b09d4b3dcd0afb1 100644
index 7fbe129062a36e6e41d564989901cdab272109df..d962222765ebe277fd833e551f6a57a1601d6088 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1561,7 +1561,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1565,7 +1565,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(mode != null, "GameMode cannot be null");
if (this.getHandle().connection == null) return;

Datei anzeigen

@ -491,10 +491,10 @@ index 6724d0a1af13e97bc1d3bd94fd43fef742a0deab..20ba0a0c9eae28658888a77dd2170f62
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 40553b12460b6f5b4db253134b09d4b3dcd0afb1..b15ee4c8ac9e306742b0b394f0721e026f7f6f3a 100644
index d962222765ebe277fd833e551f6a57a1601d6088..1706ea0d94cb81f7db78df3fc3957a220abc6e89 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -593,7 +593,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -597,7 +597,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot
if (this.getHandle().connection == null) return;
@ -503,7 +503,7 @@ index 40553b12460b6f5b4db253134b09d4b3dcd0afb1..b15ee4c8ac9e306742b0b394f0721e02
}
// Paper start
@@ -605,10 +605,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -609,10 +609,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void kick(final net.kyori.adventure.text.Component message) {
@ -520,7 +520,7 @@ index 40553b12460b6f5b4db253134b09d4b3dcd0afb1..b15ee4c8ac9e306742b0b394f0721e02
}
}
@@ -667,7 +672,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -671,7 +676,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start - Improve chat handling
if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) {

Datei anzeigen

@ -187,10 +187,10 @@ index ecaa7f0b2bf795f16187f11fa27f6d5d435ccbfe..c83ffba568f33323b0f8b9a03fa0b7bb
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b15ee4c8ac9e306742b0b394f0721e026f7f6f3a..feb92e1e0a5688fdf2adcfebd6a80b5f772aff7d 100644
index 1706ea0d94cb81f7db78df3fc3957a220abc6e89..ca8f06538d140b22f8ed4418aaf544c853f7f8a8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1320,9 +1320,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1324,9 +1324,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setBedSpawnLocation(Location location, boolean override) {
if (location == null) {

Datei anzeigen

@ -24,10 +24,10 @@ index f96d61bdeb556665d6e6e5023f9d77fd82204e89..e3f355c85eb7cc8c1683e3009502c10a
public void write(FriendlyByteBuf buf) {
buf.writeLong(this.sectionPos.asLong());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index feb92e1e0a5688fdf2adcfebd6a80b5f772aff7d..d73f94b37472da28a8c3dda9574d95954033785b 100644
index ca8f06538d140b22f8ed4418aaf544c853f7f8a8..d2c836d747effbdc424787976eabbd1b1b30fd3c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -888,6 +888,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -892,6 +892,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}

Datei anzeigen

@ -72,10 +72,10 @@ index d4fffcc5bb746df8dc177780f15ff4dbca64c018..ed30e079c23f564cbd0a45b38586bd12
// Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d73f94b37472da28a8c3dda9574d95954033785b..ec18039f7a5577d290c2d5da23aa734ddde62332 100644
index d2c836d747effbdc424787976eabbd1b1b30fd3c..4310a5aa2661131751dd9e4e760dca1ece2c54c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1209,13 +1209,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1213,13 +1213,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setRotation(float yaw, float pitch) {
@ -178,7 +178,7 @@ index d73f94b37472da28a8c3dda9574d95954033785b..ec18039f7a5577d290c2d5da23aa734d
location.checkFinite();
ServerPlayer entity = this.getHandle();
@@ -1228,7 +1316,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1232,7 +1320,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false;
}
@ -187,7 +187,7 @@ index d73f94b37472da28a8c3dda9574d95954033785b..ec18039f7a5577d290c2d5da23aa734d
return false;
}
@@ -1246,7 +1334,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1250,7 +1338,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// If this player is riding another entity, we must dismount before teleporting.
@ -196,7 +196,7 @@ index d73f94b37472da28a8c3dda9574d95954033785b..ec18039f7a5577d290c2d5da23aa734d
// SPIGOT-5509: Wakeup, similar to riding
if (this.isSleeping()) {
@@ -1262,13 +1350,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1266,13 +1354,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
// Close any foreign inventory

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ec18039f7a5577d290c2d5da23aa734ddde62332..50d3de2bb715e7de8243174f66d92e45bae10683 100644
index 4310a5aa2661131751dd9e4e760dca1ece2c54c6..8b17cd24be2ce0d89ebe36cf83e89615b7590622 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -649,6 +649,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -653,6 +653,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end - sendOpLevel API

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 50d3de2bb715e7de8243174f66d92e45bae10683..6885b8995906e9fbb94316db5b1ba764f287d942 100644
index 8b17cd24be2ce0d89ebe36cf83e89615b7590622..ac2db507170797103bf15aabda2097ddb221b9fc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3179,6 +3179,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3174,6 +3174,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

Datei anzeigen

@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick
public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6885b8995906e9fbb94316db5b1ba764f287d942..003ff30116a6b91e244af12e51aa5dd0925c778e 100644
index ac2db507170797103bf15aabda2097ddb221b9fc..07fa6de6ec35cf0ea738629b48c2457488831a26 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3184,6 +3184,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3179,6 +3179,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void showElderGuardian(boolean silent) {
if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F));
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] fix Instruments
properly handle Player#playNote
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 003ff30116a6b91e244af12e51aa5dd0925c778e..a25cdcb4468d16a064ea290c0a397ea8cf0864ad 100644
index 07fa6de6ec35cf0ea738629b48c2457488831a26..4985580c4a59ae9b220cf718d7cc97c2b76f764e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -726,7 +726,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -730,7 +730,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Sound instrumentSound = instrument.getSound();
if (instrumentSound == null) return;

Datei anzeigen

@ -26,10 +26,10 @@ index 078dd3ccf046d3ee5ef41108e9db4736182778f1..82978c058c64563eb091fe9efbe42ade
} else {
if (fallDistance >= 2.0F) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a25cdcb4468d16a064ea290c0a397ea8cf0864ad..8bcb8e6aaeb245b118acad32d78e1c6704eb12f3 100644
index 4985580c4a59ae9b220cf718d7cc97c2b76f764e..2bcc2f8579d28dd13843f8e456c9725243381425 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2413,6 +2413,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2417,6 +2417,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().onUpdateAbilities();
}

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Win Screen API
public net.minecraft.server.level.ServerPlayer seenCredits
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8bcb8e6aaeb245b118acad32d78e1c6704eb12f3..79d83a194084ffda06a0bbc29354911ef3ea1b28 100644
index 2bcc2f8579d28dd13843f8e456c9725243381425..fc17e93c18e9c3adce8015332c2bebc68cd38267 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1228,6 +1228,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1232,6 +1232,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}

Datei anzeigen

@ -33,10 +33,10 @@ index cab5636fe6be9ee7f23ffbd5a399d2aeea1cd538..fb74f13ab2a977224e843a468ea8c72d
return k > 0 ? this.repairPlayerItems(player, k) : 0;
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 79d83a194084ffda06a0bbc29354911ef3ea1b28..4c4594e96c57ae374bcf2d70004bd12d1da1b758 100644
index fc17e93c18e9c3adce8015332c2bebc68cd38267..f06d3ad7b98a659755c0ca0659396a10726c2025 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1750,11 +1750,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1754,11 +1754,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());

Datei anzeigen

@ -208,10 +208,10 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4c4594e96c57ae374bcf2d70004bd12d1da1b758..d252f0313b1d73758782249060e7c57afb5c5418 100644
index f06d3ad7b98a659755c0ca0659396a10726c2025..c83dc24a5265443210b9609e1acd17b7a2e16724 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1648,23 +1648,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1652,23 +1652,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override
@ -240,7 +240,7 @@ index 4c4594e96c57ae374bcf2d70004bd12d1da1b758..d252f0313b1d73758782249060e7c57a
if (kickPlayer) {
this.kickPlayer(reason);
}
@@ -1672,12 +1672,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1676,12 +1676,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override

Datei anzeigen

@ -58,10 +58,10 @@ index c77fec78636805a496ecea3e56f26290dbcbffff..abb14719496971a780650782bdce17c6
// Special case: the axis is optional for ELECTRIC_SPARK
Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d252f0313b1d73758782249060e7c57afb5c5418..082350f866eaef5fc8f98ebc217aa02cdcab5a46 100644
index c83dc24a5265443210b9609e1acd17b7a2e16724..74e906364aa8f2f9754d5d1b90f95e286bd0d544 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -875,7 +875,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -879,7 +879,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(effect != null, "Effect cannot be null");
if (data != null) {
Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect);

Datei anzeigen

@ -113,7 +113,7 @@ index c1790d8f13af1ff7059dfe952cbdcdcca22d8df4..e1bd408336a80d819e760b76d9636de0
// Paper end
player.sentListPacket = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 082350f866eaef5fc8f98ebc217aa02cdcab5a46..ad602abca07e3a0d6e2889843c5849616f2c23a7 100644
index 74e906364aa8f2f9754d5d1b90f95e286bd0d544..21d419d2dfb28f0dbc818f328d599b32f37a8ac2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -185,6 +185,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -124,7 +124,7 @@ index 082350f866eaef5fc8f98ebc217aa02cdcab5a46..ad602abca07e3a0d6e2889843c584961
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0;
private double health = 20;
@@ -1988,7 +1989,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1992,7 +1993,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
otherPlayer.setUUID(uuidOverride);
}
// Paper end
@ -133,7 +133,7 @@ index 082350f866eaef5fc8f98ebc217aa02cdcab5a46..ad602abca07e3a0d6e2889843c584961
if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
}
@@ -2097,6 +2098,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2101,6 +2102,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it
}

Datei anzeigen

@ -23,10 +23,10 @@ index 9daec0782774ab51ea8091cb8ed9d0a106e34cfa..2bbc39c257965ad91ee360cdfcd3538a
public String getName() {
Player player = this.getPlayer();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ad602abca07e3a0d6e2889843c5849616f2c23a7..7b81dd72bc107648f2c0df19adeaa8ca7de7b204 100644
index 21d419d2dfb28f0dbc818f328d599b32f37a8ac2..cc7a5dac19faad801bf759cbf7aebd9c92d8be16 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -281,6 +281,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -285,6 +285,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.server.getPlayer(this.getUniqueId()) != null;
}