Drop old packs in setResourcePack

This commit is contained in:
Nassim Jahnke 2023-12-06 20:46:49 +01:00
parent c2b70338fc
commit 03541446b2
35 changed files with 98 additions and 97 deletions

View File

@ -24896,18 +24896,10 @@ index e534dac9d69147174f6b9e8ce7f27fde536351ce..270fd52ec733c89bd91155c8222936fa
}
diff --git a/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java b/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java
index 836bcea1c6a9de29b4a248220331f3a8c697204d..423405e34fc052e6c068d616c1aaedd8ab72ba94 100644
index 836bcea1c6a9de29b4a248220331f3a8c697204d..399da9d43aefbb95897df4697860d5bce5317152 100644
--- a/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java
+++ b/src/main/java/net/minecraft/world/level/storage/LevelStorageSource.java
@@ -5,6 +5,7 @@ import com.mojang.datafixers.DataFixer;
import com.mojang.logging.LogUtils;
import com.mojang.serialization.DataResult;
import com.mojang.serialization.Dynamic;
+import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
@@ -290,10 +291,10 @@ public class LevelStorageSource {
@@ -290,10 +290,10 @@ public class LevelStorageSource {
static Dynamic<?> readLevelDataTagFixed(Path path, DataFixer dataFixer) throws IOException {
CompoundTag nbttagcompound = LevelStorageSource.readLevelDataTagRaw(path);
CompoundTag nbttagcompound1 = nbttagcompound.getCompound("Data");
@ -24920,7 +24912,7 @@ index 836bcea1c6a9de29b4a248220331f3a8c697204d..423405e34fc052e6c068d616c1aaedd8
dynamic = dynamic.set("Player", dynamic2);
Dynamic<?> dynamic3 = dynamic.get("WorldGenSettings").orElseEmptyMap();
@@ -303,6 +304,12 @@ public class LevelStorageSource {
@@ -303,6 +303,12 @@ public class LevelStorageSource {
return dynamic;
}

View File

@ -22,10 +22,18 @@ index 0a6feccc657e62d7bad5e1461d5538a4c3a16b76..53833e155cf0d2328f2c2b3670297092
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a58b0d10d73310587a05e40e072029ee258063e1..00b1f8c60aa2021bfae42fd7bfab3d5edb55a098 100644
index a58b0d10d73310587a05e40e072029ee258063e1..6da1b2f54317ddc84a1fbff037560e402b02f771 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -192,6 +192,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -44,6 +44,7 @@ import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.PlayerChatMessage;
import net.minecraft.network.protocol.Packet;
import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket;
+import net.minecraft.network.protocol.common.ClientboundResourcePackPopPacket;
import net.minecraft.network.protocol.common.ClientboundResourcePackPushPacket;
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.network.protocol.game.ClientboundBlockDestructionPacket;
@@ -192,6 +193,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private double healthScale = 20;
private CraftWorldBorder clientWorldBorder = null;
private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
@ -36,7 +44,7 @@ index a58b0d10d73310587a05e40e072029ee258063e1..00b1f8c60aa2021bfae42fd7bfab3d5e
public CraftPlayer(CraftServer server, ServerPlayer entity) {
super(server, entity);
@@ -2387,6 +2391,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2387,6 +2392,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public boolean getAffectsSpawning() {
return this.getHandle().affectsSpawning;
}
@ -58,6 +66,7 @@ index a58b0d10d73310587a05e40e072029ee258063e1..00b1f8c60aa2021bfae42fd7bfab3d5e
+ net.minecraft.network.chat.Component promptComponent = resourcePackPrompt != null ?
+ io.papermc.paper.adventure.PaperAdventure.asVanilla(resourcePackPrompt) :
+ null;
+ this.getHandle().connection.send(new ClientboundResourcePackPopPacket(Optional.empty()));
+ this.getHandle().connection.send(new ClientboundResourcePackPushPacket(UUID.randomUUID(), url, hash, required, promptComponent));
+ }
+

View File

@ -44,10 +44,10 @@ index b76ac10fe0d4b860a4b30fae365cf38400afb456..1e2d3040bb3e8b1901fbc933caa5ad3b
protected void internalSetAbsorptionAmount(float absorptionAmount) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 06c0f72a83de5866f4c734c0809d60446a736af6..07960b6ff0cd42622315a27beb1496d41950f9f4 100644
index 6da1b2f54317ddc84a1fbff037560e402b02f771..0599752a23363405b6af1e89521badf3bf6643f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2182,6 +2182,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2183,6 +2183,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setRealHealth(double health) {

View File

@ -26,10 +26,10 @@ index cb88a3a4e4c87a6d6c838183c1640b13d82c9344..0b391b0dc6262ef482c4a253a074b593
// Paper end
buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 07960b6ff0cd42622315a27beb1496d41950f9f4..6b8734cda9d1384d929795f69de36887acafd698 100644
index 0599752a23363405b6af1e89521badf3bf6643f3..ab0b31a41b9a35f3ff19c73a99d0392a303c2b53 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -349,6 +349,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -350,6 +350,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper start

View File

@ -90,10 +90,10 @@ index 0d9658b1c6b5912a34058c0ce53b8e7f8c28afac..203fc53142bb0c9b6e2d1876fe8dfbe3
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 28f71ea4234e122e28d65ffa66c3684f3a2857b4..2c31e9052e3b18177660ad9befc6fcd24085da88 100644
index ab0b31a41b9a35f3ff19c73a99d0392a303c2b53..7115d71cfd514a4cdc2b0d2b17b87fb6fff21ee7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -295,6 +295,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -296,6 +296,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}

View File

@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2c31e9052e3b18177660ad9befc6fcd24085da88..a5014c7a0cb6329edd919c7fafed8ec396b23c36 100644
index 7115d71cfd514a4cdc2b0d2b17b87fb6fff21ee7..352c16b89f0e33aefef141fea0bf8067208cffcf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1549,7 +1549,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1550,7 +1550,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override

View File

@ -55,10 +55,10 @@ index 477d3245facb5ae59c786d4f696f64226cb540a6..e8490a58dd4d9bc39a5bb2f9fc109526
public Server getServer() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a5014c7a0cb6329edd919c7fafed8ec396b23c36..4e72258af26918dc9a9ab5afcb70acfaae4691a2 100644
index 352c16b89f0e33aefef141fea0bf8067208cffcf..f4a6a3f9c6c8972f482a53ee434dc8631d32632d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -278,11 +278,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -279,11 +279,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.server.getPlayer(this.getUniqueId()) != null;
}
@ -70,7 +70,7 @@ index a5014c7a0cb6329edd919c7fafed8ec396b23c36..4e72258af26918dc9a9ab5afcb70acfa
@Override
public InetSocketAddress getAddress() {
if (this.getHandle().connection == null) return null;
@@ -1699,8 +1694,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1700,8 +1695,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
// Remove this entity from the hidden player's EntityTrackerEntry
@ -87,7 +87,7 @@ index a5014c7a0cb6329edd919c7fafed8ec396b23c36..4e72258af26918dc9a9ab5afcb70acfa
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) {
entry.removePlayer(this.getHandle());
@@ -1713,8 +1715,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1714,8 +1716,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
}
}
@ -96,7 +96,7 @@ index a5014c7a0cb6329edd919c7fafed8ec396b23c36..4e72258af26918dc9a9ab5afcb70acfa
}
void resetAndHideEntity(org.bukkit.entity.Entity entity) {
@@ -1779,12 +1779,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1780,12 +1780,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
private void trackAndShowEntity(org.bukkit.entity.Entity entity) {
@ -122,7 +122,7 @@ index a5014c7a0cb6329edd919c7fafed8ec396b23c36..4e72258af26918dc9a9ab5afcb70acfa
}
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
@@ -1794,6 +1807,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1795,6 +1808,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
}
@ -162,7 +162,7 @@ index a5014c7a0cb6329edd919c7fafed8ec396b23c36..4e72258af26918dc9a9ab5afcb70acfa
void resetAndShowEntity(org.bukkit.entity.Entity entity) {
// SPIGOT-7312: Can't show/hide self
@@ -1805,6 +1851,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1806,6 +1852,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.trackAndShowEntity(entity);
}
}

View File

@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4e72258af26918dc9a9ab5afcb70acfaae4691a2..43e577dc39db6e9b373db0e67dc72e770150339b 100644
index f4a6a3f9c6c8972f482a53ee434dc8631d32632d..90de9ce49cf067335ce881a2806fa18ef9e5d556 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -195,6 +195,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -196,6 +196,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
@ -20,7 +20,7 @@ index 4e72258af26918dc9a9ab5afcb70acfaae4691a2..43e577dc39db6e9b373db0e67dc72e77
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -2111,7 +2112,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2112,7 +2113,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
public void addChannel(String channel) {

View File

@ -173,10 +173,10 @@ index 7d6301ae9ee2added007b0c68ffabe5d79f7be62..801dca6bbafd6e1825a1291fc128efc1
@Override
public boolean isBlocking() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 43e577dc39db6e9b373db0e67dc72e770150339b..2f3365c2cc45ebc4cc27a04f2383d7e102637722 100644
index 90de9ce49cf067335ce881a2806fa18ef9e5d556..9718d1f36db4f41140e3b7b2ff008038ca4f9cb8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1200,7 +1200,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1201,7 +1201,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2f3365c2cc45ebc4cc27a04f2383d7e102637722..193a2634344f06fcdad47aea9e6924f0b839cfba 100644
index 9718d1f36db4f41140e3b7b2ff008038ca4f9cb8..c7aed877d5e1976da8407075e69a75eb2837bff3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2862,6 +2862,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2864,6 +2864,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers;
}

View File

@ -392,10 +392,10 @@ index 948ba97e318506dad96e59121297b5bf8340d2e6..810bead2f19de70786027b190137f743
this.gameEvent(GameEvent.ENTITY_DIE);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 193a2634344f06fcdad47aea9e6924f0b839cfba..22b96810ad263112ddbc01d5081d56b5bd3fff2a 100644
index c7aed877d5e1976da8407075e69a75eb2837bff3..e7c81627e8e9a959b2db521a30e16dcda98ef145 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2360,7 +2360,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2361,7 +2361,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void sendHealthUpdate() {
FoodData foodData = this.getHandle().getFoodData();

View File

@ -106,10 +106,10 @@ index e8490a58dd4d9bc39a5bb2f9fc109526e031b971..5f590575f95eff8bf0cdcafde7dee0e3
public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 22b96810ad263112ddbc01d5081d56b5bd3fff2a..3acd32648f85e71f456ed9ae5e384b504aff01c8 100644
index e7c81627e8e9a959b2db521a30e16dcda98ef145..00a5e27fc3e2e566642c5f5c730c3c4c97abe2cb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -196,6 +196,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -197,6 +197,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
@ -117,7 +117,7 @@ index 22b96810ad263112ddbc01d5081d56b5bd3fff2a..3acd32648f85e71f456ed9ae5e384b50
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1961,6 +1962,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1962,6 +1963,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed;
}
@ -136,7 +136,7 @@ index 22b96810ad263112ddbc01d5081d56b5bd3fff2a..3acd32648f85e71f456ed9ae5e384b50
public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) {
@@ -1983,6 +1996,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1984,6 +1997,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setExtraData(CompoundTag nbttagcompound) {
@ -145,7 +145,7 @@ index 22b96810ad263112ddbc01d5081d56b5bd3fff2a..3acd32648f85e71f456ed9ae5e384b50
if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag());
}
@@ -1997,6 +2012,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1998,6 +2013,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName());

View File

@ -8,10 +8,10 @@ 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 3acd32648f85e71f456ed9ae5e384b504aff01c8..54dbe08e2ed589ad6d67d1940467255e2d3d1978 100644
index 00a5e27fc3e2e566642c5f5c730c3c4c97abe2cb..553c5b65f4cc42e915196fa60a939f020b935e3a 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 {
@@ -254,8 +254,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void remove() {

View File

@ -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 54dbe08e2ed589ad6d67d1940467255e2d3d1978..20e1dfb1c5616b93b20139c2023fbac54348e0cd 100644
index 553c5b65f4cc42e915196fa60a939f020b935e3a..74b36a42971976c4205f0638dee5eb78e1014bcd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -615,6 +615,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -616,6 +616,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
}
}

View File

@ -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 20e1dfb1c5616b93b20139c2023fbac54348e0cd..b46bd98bd94f26227cecd2f2265e27df940fb2a5 100644
index 74b36a42971976c4205f0638dee5eb78e1014bcd..49994f8fc11c41052305dd8722c0abe51160ee64 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3021,6 +3021,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3023,6 +3023,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

View File

@ -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 b46bd98bd94f26227cecd2f2265e27df940fb2a5..d65b493e9ed4f9cd57f787185691d0511a5de854 100644
index 49994f8fc11c41052305dd8722c0abe51160ee64..37efca4dcd1504e3dab231f516cc9e455f70effb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2545,7 +2545,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2546,7 +2546,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());
}

View File

@ -32,10 +32,10 @@ index 1131ee88f35c3898f0119c414c8376b0d9130169..bf361396bc2ec5d5c7b45d425af990c0
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 d65b493e9ed4f9cd57f787185691d0511a5de854..a3557443f484e4046823e8b08f2fd55c6967bdea 100644
index 37efca4dcd1504e3dab231f516cc9e455f70effb..7134590b3ecef49dac5f9660f8870b1f2814ba5b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -639,6 +639,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -640,6 +640,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

View File

@ -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 a3557443f484e4046823e8b08f2fd55c6967bdea..7c66265f7e472add3b41ffb7044f3c8d45144ac8 100644
index 7134590b3ecef49dac5f9660f8870b1f2814ba5b..8c5aa99068b5f67e55fd3af9e9abea2612ee84d5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1565,7 +1565,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1566,7 +1566,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(mode != null, "GameMode cannot be null");
if (this.getHandle().connection == null) return;

View File

@ -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 7c66265f7e472add3b41ffb7044f3c8d45144ac8..b22c386f46b59f7a8bad46e9ea2fa312b254cb60 100644
index 8c5aa99068b5f67e55fd3af9e9abea2612ee84d5..a777484bf2c625545e008eb1a22068e7a770b22c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -597,7 +597,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -598,7 +598,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 7c66265f7e472add3b41ffb7044f3c8d45144ac8..b22c386f46b59f7a8bad46e9ea2fa312
}
// Paper start
@@ -609,10 +609,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -610,10 +610,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void kick(final net.kyori.adventure.text.Component message) {
@ -520,7 +520,7 @@ index 7c66265f7e472add3b41ffb7044f3c8d45144ac8..b22c386f46b59f7a8bad46e9ea2fa312
}
}
@@ -671,7 +676,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -672,7 +677,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start - Improve chat handling
if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) {

View File

@ -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 b22c386f46b59f7a8bad46e9ea2fa312b254cb60..9652608958dc453cd259eb589f28ef0efbb11442 100644
index a777484bf2c625545e008eb1a22068e7a770b22c..41107ebfe9d517e04ef787f3fb9487ad6ac74314 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1324,9 +1324,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1325,9 +1325,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setBedSpawnLocation(Location location, boolean override) {
if (location == null) {

View File

@ -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 9652608958dc453cd259eb589f28ef0efbb11442..451f558c4904b5e67bad86305c9e058813f25126 100644
index 41107ebfe9d517e04ef787f3fb9487ad6ac74314..b0b5d0d7730f0150823dc4600775608fc6eb875b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -892,6 +892,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -893,6 +893,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}

View File

@ -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 451f558c4904b5e67bad86305c9e058813f25126..e29b53dcf0db8eda8ad7f494ce188cde28fc5fea 100644
index b0b5d0d7730f0150823dc4600775608fc6eb875b..75c277f3b5323d5d813c1bdfff3731d1b403b50a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1213,13 +1213,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1214,13 +1214,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setRotation(float yaw, float pitch) {
@ -178,7 +178,7 @@ index 451f558c4904b5e67bad86305c9e058813f25126..e29b53dcf0db8eda8ad7f494ce188cde
location.checkFinite();
ServerPlayer entity = this.getHandle();
@@ -1232,7 +1320,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1233,7 +1321,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false;
}
@ -187,7 +187,7 @@ index 451f558c4904b5e67bad86305c9e058813f25126..e29b53dcf0db8eda8ad7f494ce188cde
return false;
}
@@ -1250,7 +1338,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1251,7 +1339,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 451f558c4904b5e67bad86305c9e058813f25126..e29b53dcf0db8eda8ad7f494ce188cde
// SPIGOT-5509: Wakeup, similar to riding
if (this.isSleeping()) {
@@ -1266,13 +1354,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1267,13 +1355,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
// Close any foreign inventory

View File

@ -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 e29b53dcf0db8eda8ad7f494ce188cde28fc5fea..c874c4143945e8a46cf3cdd8af758700a62845ec 100644
index 75c277f3b5323d5d813c1bdfff3731d1b403b50a..ca3c35e486743cc0c2425a86836d398af25f5f89 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -653,6 +653,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -654,6 +654,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end - sendOpLevel API

View File

@ -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 c874c4143945e8a46cf3cdd8af758700a62845ec..ef96a54e1c6c002a6968df4f20695e5a82d42277 100644
index ca3c35e486743cc0c2425a86836d398af25f5f89..8a3213818fe57b08b730efb0b490c2ca2a8e60f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3174,6 +3174,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3176,6 +3176,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

View File

@ -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 ef96a54e1c6c002a6968df4f20695e5a82d42277..07fb5740cf99e79b229f00b9ebb7b886233f1e9a 100644
index 8a3213818fe57b08b730efb0b490c2ca2a8e60f7..ff8fdcd407238061104625dd780e5236f9f8c78b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3179,6 +3179,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3181,6 +3181,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));
}

View File

@ -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 07fb5740cf99e79b229f00b9ebb7b886233f1e9a..7b54aff9dbade8cfed1db09c1734a1a77610f2cf 100644
index ff8fdcd407238061104625dd780e5236f9f8c78b..d905ad840c049a8f95dbed8679626b6d45bf4aed 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -730,7 +730,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -731,7 +731,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Sound instrumentSound = instrument.getSound();
if (instrumentSound == null) return;

View File

@ -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 7b54aff9dbade8cfed1db09c1734a1a77610f2cf..b8c7058cb007161ce33baee4275014f389cf717b 100644
index d905ad840c049a8f95dbed8679626b6d45bf4aed..7d40c698ec2aff93c0ee7f211c74a3daab7c5ca2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2417,6 +2417,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2418,6 +2418,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().onUpdateAbilities();
}

View File

@ -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 b8c7058cb007161ce33baee4275014f389cf717b..423d91cec2442a7cd2f81145942dbe3a6b1ec7be 100644
index 7d40c698ec2aff93c0ee7f211c74a3daab7c5ca2..0a0eefdeead3dba7881b2bd21618de2173e46e81 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1232,6 +1232,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1233,6 +1233,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet);
}

View File

@ -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 423d91cec2442a7cd2f81145942dbe3a6b1ec7be..f341c329970a7d8738735186380144d617d96121 100644
index 0a0eefdeead3dba7881b2bd21618de2173e46e81..2b20ddfbd599d157f3a3658957407040c992e68d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1754,11 +1754,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1755,11 +1755,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());

View File

@ -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 f341c329970a7d8738735186380144d617d96121..41ed3b57756ed0837d4d2ea8fbec6d03c0705b47 100644
index 2b20ddfbd599d157f3a3658957407040c992e68d..c1cc6f615e90a6dcb071b3e731cfaa76d2d2ae23 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1652,23 +1652,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1653,23 +1653,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override
@ -240,7 +240,7 @@ index f341c329970a7d8738735186380144d617d96121..41ed3b57756ed0837d4d2ea8fbec6d03
if (kickPlayer) {
this.kickPlayer(reason);
}
@@ -1676,12 +1676,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1677,12 +1677,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override

View File

@ -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 41ed3b57756ed0837d4d2ea8fbec6d03c0705b47..c05635559fe1241d363c06755dc1fdd1a0701c5c 100644
index c1cc6f615e90a6dcb071b3e731cfaa76d2d2ae23..712cc70a536d8a332c3c1f8573ccbd4e0ff8f640 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -879,7 +879,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -880,7 +880,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);

View File

@ -113,10 +113,10 @@ index 098bb36a66e022da30302936aba10d296587ac88..a35638a92479b90afa89cf201fc45b49
// 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 c05635559fe1241d363c06755dc1fdd1a0701c5c..50df2725e5e3dd595567c8233b4aac5f022ef1d0 100644
index 712cc70a536d8a332c3c1f8573ccbd4e0ff8f640..22470d74ea644bac933e94fcf08b13066793f02c 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 {
@@ -186,6 +186,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private final ConversationTracker conversationTracker = new ConversationTracker();
private final Set<String> channels = new HashSet<String>();
private final Map<UUID, Set<WeakReference<Plugin>>> invertedVisibilityEntities = new HashMap<>();
@ -124,7 +124,7 @@ index c05635559fe1241d363c06755dc1fdd1a0701c5c..50df2725e5e3dd595567c8233b4aac5f
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0;
private double health = 20;
@@ -1992,7 +1993,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1993,7 +1994,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
otherPlayer.setUUID(uuidOverride);
}
// Paper end
@ -133,7 +133,7 @@ index c05635559fe1241d363c06755dc1fdd1a0701c5c..50df2725e5e3dd595567c8233b4aac5f
if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
}
@@ -2101,6 +2102,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2102,6 +2103,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
}

View File

@ -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 50df2725e5e3dd595567c8233b4aac5f022ef1d0..cf73b2c20f7cb65613cade7353c8a6a1063a61f2 100644
index 22470d74ea644bac933e94fcf08b13066793f02c..e075baed83a4ab3142ee41cbb49de7ceb004ac56 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -285,6 +285,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -286,6 +286,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.server.getPlayer(this.getUniqueId()) != null;
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add player idle duration API
Implements API for getting and resetting a player's idle duration.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cf73b2c20f7cb65613cade7353c8a6a1063a61f2..206f3d7b29c0b5261091ee98be60068a3e062e82 100644
index e075baed83a4ab3142ee41cbb49de7ceb004ac56..b0e2f0a9155e43c113142840bb8198fb84a31cb6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3296,6 +3296,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3298,6 +3298,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Allow null itemstack for Player#sendEquipmentChange
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 206f3d7b29c0b5261091ee98be60068a3e062e82..f4065a4269c2da542664f41c67299c53bc8480c4 100644
index b0e2f0a9155e43c113142840bb8198fb84a31cb6..ed41decbf0522c516b3608569d5719687105e25b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1089,7 +1089,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1090,7 +1090,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void sendEquipmentChange(LivingEntity entity, EquipmentSlot slot, ItemStack item) {