13
0
geforkt von Mirrors/Paper

Fix players are invisible after using setPlayerProfile (#9143)

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Dieser Commit ist enthalten in:
montlikadani 2023-08-12 16:10:09 +02:00 committet von GitHub
Ursprung 3c41f8f0b3
Commit 3b4839ee32
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
36 geänderte Dateien mit 127 neuen und 105 gelöschten Zeilen

Datei anzeigen

@ -93,10 +93,10 @@ index 016cee903c7179baf711984503d1d0793d40c5c5..064edd612885b2ea4b35001a864503b5
/** /**
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 2257a1808d19775607e60c155d9e5508e7825811..af7af85887e9463c561ddb0c47862b27b5de5d43 100644 index 2257a1808d19775607e60c155d9e5508e7825811..21952b30559cafb00ddcef54557caea5e4dbb36e 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2676,6 +2676,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2676,6 +2676,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED} * was {@link org.bukkit.event.player.PlayerResourcePackStatusEvent.Status#SUCCESSFULLY_LOADED}
*/ */
boolean hasResourcePack(); boolean hasResourcePack();
@ -110,7 +110,11 @@ index 2257a1808d19775607e60c155d9e5508e7825811..af7af85887e9463c561ddb0c47862b27
+ +
+ /** + /**
+ * Changes the PlayerProfile for this player. This will cause this player + * Changes the PlayerProfile for this player. This will cause this player
+ * to be reregistered to all clients that can currently see this player + * to be reregistered to all clients that can currently see this player.
+ *
+ * After executing this method, the player {@link java.util.UUID} won't
+ * be swapped, only their name and gameprofile properties.
+ *
+ * @param profile The new profile to use + * @param profile The new profile to use
+ */ + */
+ void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile); + void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6cbb64d4555a3741d0f4938c1850f64d055a3ac4..1b4f70e44bd6cfb8fce17461b90eebb32c5bea73 100644 index 87bc9d5e966d91b2786c89290a5609f94c59dd70..5cabbe3aec83f76cefe34fd3e34be467fe5e59c8 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2848,6 +2848,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2852,6 +2852,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param profile The new profile to use * @param profile The new profile to use
*/ */
void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile); void setPlayerProfile(@NotNull com.destroystokyo.paper.profile.PlayerProfile profile);

Datei anzeigen

@ -229,10 +229,10 @@ index 0000000000000000000000000000000000000000..cf67dc7d465223710adbf2b798109f52
+ } + }
+} +}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 1b4f70e44bd6cfb8fce17461b90eebb32c5bea73..7a5dda4f2d6b7e9b225c3abd4f2d7fe87ac9e18e 100644 index 5cabbe3aec83f76cefe34fd3e34be467fe5e59c8..45cd9cf3bfa7a64fca463f76a9e29d5f9abdfd58 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2868,6 +2868,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2872,6 +2872,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* Reset the cooldown counter to 0, effectively starting the cooldown period. * Reset the cooldown counter to 0, effectively starting the cooldown period.
*/ */
void resetCooldown(); void resetCooldown();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 7a5dda4f2d6b7e9b225c3abd4f2d7fe87ac9e18e..6b55dce268a9a14d5cb943c08a6287c7f15b3ba3 100644 index 45cd9cf3bfa7a64fca463f76a9e29d5f9abdfd58..785655dbb660f6b65d9ff2b498600efca6a89144 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2977,6 +2977,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2981,6 +2981,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
// Paper end // Paper end
} }

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 6b55dce268a9a14d5cb943c08a6287c7f15b3ba3..acd49fc890aaf1f34bb3f8524ab4b071f3711b93 100644 index 785655dbb660f6b65d9ff2b498600efca6a89144..19358a956f14053ff5c57a4909ebf82f42a22043 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2874,6 +2874,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2878,6 +2878,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
@NotNull @NotNull
<T> T getClientOption(@NotNull com.destroystokyo.paper.ClientOption<T> option); <T> T getClientOption(@NotNull com.destroystokyo.paper.ClientOption<T> option);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index acd49fc890aaf1f34bb3f8524ab4b071f3711b93..d4e60896fe6a181f2bbf9b874407c6a1ccc666df 100644 index 19358a956f14053ff5c57a4909ebf82f42a22043..e7bc6db5f802ef9b776fea5f5df6df20b2529258 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2887,6 +2887,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2891,6 +2891,17 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/ */
@Nullable @Nullable
Firework boostElytra(@NotNull ItemStack firework); Firework boostElytra(@NotNull ItemStack firework);

Datei anzeigen

@ -165,10 +165,10 @@ index ab0ceaba9ddcbe20a8b8a1fc3ed19cb3c64ecd3d..97f0bc6573c8ba09de77061b6312b91c
* Teleports this entity to the given location. If this entity is riding a * Teleports this entity to the given location. If this entity is riding a
* vehicle, it will be dismounted prior to teleportation. * vehicle, it will be dismounted prior to teleportation.
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 203ba784306d6aae10db9d1b5d9cbe9d797058f3..5c265bf9207d235c9d03ad7a23ad005871c81948 100644 index 71bddfd5980452e5f55ea1c6eaa70bad3345739f..b063aba9439f1f32f0716c636d28b2821eeb4fcf 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3042,6 +3042,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3046,6 +3046,49 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
String getClientBrandName(); String getClientBrandName();
// Paper end // Paper end

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 5c265bf9207d235c9d03ad7a23ad005871c81948..fbe858323fbabc15ac8533df2018cf5c95f442fa 100644 index b063aba9439f1f32f0716c636d28b2821eeb4fcf..847d9723acf141351b4f88a7a70143fa9d684efc 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -2929,6 +2929,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -2933,6 +2933,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @throws IllegalArgumentException If the level is negative or greater than {@code 4} (i.e. not within {@code [0, 4]}). * @throws IllegalArgumentException If the level is negative or greater than {@code 4} (i.e. not within {@code [0, 4]}).
*/ */
void sendOpLevel(byte level); void sendOpLevel(byte level);

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index fbe858323fbabc15ac8533df2018cf5c95f442fa..73c989b03bb6da238300bdd0f1e634e6edce5bcd 100644 index 847d9723acf141351b4f88a7a70143fa9d684efc..e0fc66a028bffa4e335610c8cf52c6dde7d49584 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3108,6 +3108,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3112,6 +3112,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor); void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor);
// Paper end - Teleport API // Paper end - Teleport API

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Add Player Warden Warning API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 73c989b03bb6da238300bdd0f1e634e6edce5bcd..3740f4773795e345c0c61076d2473e67b49b6c65 100644 index e0fc66a028bffa4e335610c8cf52c6dde7d49584..6200dddfd7bd99c17ec8749aca3d387820dbc24b 100644
--- a/src/main/java/org/bukkit/entity/Player.java --- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3124,6 +3124,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM @@ -3128,6 +3128,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
* @param silent whether sound should be silenced * @param silent whether sound should be silenced
*/ */
void showElderGuardian(boolean silent); void showElderGuardian(boolean silent);

Datei anzeigen

@ -55,18 +55,10 @@ index b17fe83bcd7bde44ee8c1f872fffa8bf40707c50..aac78c13361b19efa7b43a0c95458390
public Server getServer() { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 063150563e35a3eeb6999f1b5b34de3f60318f66..f0c07965f129c17a3258964b7bf73f9f9b6fc63e 100644 index 063150563e35a3eeb6999f1b5b34de3f60318f66..699413ec5f26f3ff175f8032357e334b97bb8f94 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -88,6 +88,7 @@ import net.minecraft.world.food.FoodData; @@ -269,11 +269,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
import net.minecraft.world.inventory.AbstractContainerMenu;
import net.minecraft.world.level.GameType;
import net.minecraft.world.level.block.Blocks;
+import net.minecraft.world.level.biome.BiomeManager;
import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.block.entity.SignText;
import net.minecraft.world.level.border.BorderChangeListener;
@@ -269,11 +270,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return server.getPlayer(getUniqueId()) != null; return server.getPlayer(getUniqueId()) != null;
} }
@ -78,7 +70,7 @@ index 063150563e35a3eeb6999f1b5b34de3f60318f66..f0c07965f129c17a3258964b7bf73f9f
@Override @Override
public InetSocketAddress getAddress() { public InetSocketAddress getAddress() {
if (this.getHandle().connection == null) return null; if (this.getHandle().connection == null) return null;
@@ -1688,8 +1684,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1688,8 +1683,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private void untrackAndHideEntity(org.bukkit.entity.Entity entity) { private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
// Remove this entity from the hidden player's EntityTrackerEntry // Remove this entity from the hidden player's EntityTrackerEntry
@ -95,7 +87,7 @@ index 063150563e35a3eeb6999f1b5b34de3f60318f66..f0c07965f129c17a3258964b7bf73f9f
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId()); ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
if (entry != null) { if (entry != null) {
entry.removePlayer(this.getHandle()); entry.removePlayer(this.getHandle());
@@ -1702,8 +1705,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1702,8 +1704,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID()))); this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
} }
} }
@ -104,12 +96,36 @@ index 063150563e35a3eeb6999f1b5b34de3f60318f66..f0c07965f129c17a3258964b7bf73f9f
} }
void resetAndHideEntity(org.bukkit.entity.Entity entity) { void resetAndHideEntity(org.bukkit.entity.Entity entity) {
@@ -1780,8 +1781,38 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1768,12 +1768,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) {
entry.updatePlayer(this.getHandle());
} }
+ server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity)); // Paper
private void trackAndShowEntity(org.bukkit.entity.Entity entity) {
+ // Paper start - uuid override
+ this.trackAndShowEntity(entity, null);
+ } + }
+ private void trackAndShowEntity(org.bukkit.entity.Entity entity, final @Nullable UUID uuidOverride) {
+ // Paper end
ChunkMap tracker = ((ServerLevel) this.getHandle().level()).getChunkSource().chunkMap;
Entity other = ((CraftEntity) entity).getHandle();
if (other instanceof ServerPlayer) {
ServerPlayer otherPlayer = (ServerPlayer) other;
+ // Paper start - uuid override
+ UUID original = null;
+ if (uuidOverride != null) {
+ original = otherPlayer.getUUID();
+ otherPlayer.setUUID(uuidOverride);
+ }
+ // Paper end
this.getHandle().connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(otherPlayer)));
+ if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
}
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
@@ -1783,6 +1796,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
}
+ // Paper start + // Paper start
+ @Override + @Override
+ public void setPlayerProfile(com.destroystokyo.paper.profile.PlayerProfile profile) { + public void setPlayerProfile(com.destroystokyo.paper.profile.PlayerProfile profile) {
@ -130,21 +146,23 @@ index 063150563e35a3eeb6999f1b5b34de3f60318f66..f0c07965f129c17a3258964b7bf73f9f
+ +
+ // Set the game profile here, we should have unregistered the entity via iterating all player entities above. + // Set the game profile here, we should have unregistered the entity via iterating all player entities above.
+ self.gameProfile = gameProfile; + self.gameProfile = gameProfile;
+
- server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
+ // Re-register the game profile for all players + // Re-register the game profile for all players
+ for (ServerPlayer player : players) { + for (ServerPlayer player : players) {
+ CraftPlayer bukkitPlayer = player.getBukkitEntity(); + CraftPlayer bukkitPlayer = player.getBukkitEntity();
+ if (bukkitPlayer.canSee(this)) { + if (bukkitPlayer.canSee(this)) {
+ bukkitPlayer.trackAndShowEntity(self.getBukkitEntity()); + bukkitPlayer.trackAndShowEntity(self.getBukkitEntity(), gameProfile.getId());
+ } + }
+ } + }
+
+ // Refresh misc player things AFTER sending game profile + // Refresh misc player things AFTER sending game profile
+ this.refreshPlayer(); + this.refreshPlayer();
} + }
+ // Paper end
void resetAndShowEntity(org.bukkit.entity.Entity entity) { void resetAndShowEntity(org.bukkit.entity.Entity entity) {
@@ -1794,6 +1825,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // SPIGOT-7312: Can't show/hide self
@@ -1794,6 +1840,36 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.trackAndShowEntity(entity); this.trackAndShowEntity(entity);
} }
} }

Datei anzeigen

@ -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. 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f0c07965f129c17a3258964b7bf73f9f9b6fc63e..8dee7e74434356885b81e2a36664f8324ceacf57 100644 index 699413ec5f26f3ff175f8032357e334b97bb8f94..d8ec0ee64f0d322caa2fc9bf0c3680e6e6481a18 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -193,6 +193,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -192,6 +192,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start // Paper start
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash; private String resourcePackHash;
@ -20,7 +20,7 @@ index f0c07965f129c17a3258964b7bf73f9f9b6fc63e..8dee7e74434356885b81e2a36664f832
// Paper end // Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) { public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -2063,7 +2064,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2078,7 +2079,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end // Paper end
public void addChannel(String channel) { public void addChannel(String channel) {

Datei anzeigen

@ -144,7 +144,7 @@ index 734d00e84ec0bcef91a12546873de64e33e14d0c..c7bcbc3f0542a74c30e29bded3bfc0e9
this.containerMenu = this.inventoryMenu; this.containerMenu = this.inventoryMenu;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index f59733b6918dcbbb2190f76d8b8841a2d8818cdf..ba6105a970381d642cd7955754cc47135207027a 100644 index 74f1af3dccddf52965e5c91277be3592649e8cfa..552fb0be2f31bd52a5ae43526d55aa29828f786e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -376,7 +376,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -376,7 +376,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@ -173,10 +173,10 @@ index f59733b6918dcbbb2190f76d8b8841a2d8818cdf..ba6105a970381d642cd7955754cc4713
@Override @Override
public boolean isBlocking() { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8dee7e74434356885b81e2a36664f8324ceacf57..10493d2cced7603f1d3910ff6e428d23abc45c24 100644 index d8ec0ee64f0d322caa2fc9bf0c3680e6e6481a18..f9fc3b1dc6a134a22393e90de242aca0eb2e8dff 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1190,7 +1190,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1189,7 +1189,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Close any foreign inventory // Close any foreign inventory
if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) { if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {

Datei anzeigen

@ -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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 10493d2cced7603f1d3910ff6e428d23abc45c24..cd52349a272f4e0b440f6e1bc96e072687117e9f 100644 index 8fdeca08259f9da144ff3c7dd0a9d1335f8d3fbe..977fa9972f72f803363238dd2aeb26aaa02e7972 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2817,6 +2817,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2832,6 +2832,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers; return this.adventure$pointers;
} }

Datei anzeigen

@ -392,10 +392,10 @@ index 719f68f96e58ddcdd3592131c691d21263c81915..a35a0952ce8e1fc42e92734786d531c7
this.gameEvent(GameEvent.ENTITY_DIE); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cd52349a272f4e0b440f6e1bc96e072687117e9f..2a4dff1b9bf64b5fc073bbc943def71b289f7730 100644 index 977fa9972f72f803363238dd2aeb26aaa02e7972..aeed267256671627eb121f9d062cd99ba34bc81c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2317,7 +2317,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2332,7 +2332,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void sendHealthUpdate() { public void sendHealthUpdate() {
FoodData foodData = this.getHandle().getFoodData(); FoodData foodData = this.getHandle().getFoodData();

Datei anzeigen

@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose. documented as to their purpose.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 56a9cfdb9dc24bd5bda2818b9f59d1a31dfe9265..7cb4f05a8d23a60a89dd4934ccb99bb89bb44141 100644 index 715314de7a92a8e06f82c6bff5fe74e3b23044f8..b59ad5f0cc12082db0c885b29d88c526a4029e22 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -243,6 +243,7 @@ public class ServerPlayer extends Player { @@ -243,6 +243,7 @@ public class ServerPlayer extends Player {
@ -106,10 +106,10 @@ index aac78c13361b19efa7b43a0c95458390f1ba8340..f572a74b85df36a6da76b78ec29d8072
public Location getLastDeathLocation() { public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2a4dff1b9bf64b5fc073bbc943def71b289f7730..22b8b61f260f91d7c79b3772af3134a81db304ac 100644 index b07c040649ff249d1c49d94e466121a32df94dd0..ccf0902ef1770fc2d2cdd5f6c4316fd3fe7746e5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -194,6 +194,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -193,6 +193,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash; private String resourcePackHash;
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit 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 2a4dff1b9bf64b5fc073bbc943def71b289f7730..22b8b61f260f91d7c79b3772af3134a8
// Paper end // Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) { public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1935,6 +1936,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1950,6 +1951,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed; this.firstPlayed = firstPlayed;
} }
@ -136,7 +136,7 @@ index 2a4dff1b9bf64b5fc073bbc943def71b289f7730..22b8b61f260f91d7c79b3772af3134a8
public void readExtraData(CompoundTag nbttagcompound) { public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true; this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) { if (nbttagcompound.contains("bukkit")) {
@@ -1957,6 +1970,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1972,6 +1985,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void setExtraData(CompoundTag nbttagcompound) { public void setExtraData(CompoundTag nbttagcompound) {
@ -145,7 +145,7 @@ index 2a4dff1b9bf64b5fc073bbc943def71b289f7730..22b8b61f260f91d7c79b3772af3134a8
if (!nbttagcompound.contains("bukkit")) { if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag()); nbttagcompound.put("bukkit", new CompoundTag());
} }
@@ -1971,6 +1986,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1986,6 +2001,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed()); data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis()); data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName()); data.putString("lastKnownName", handle.getScoreboardName());

Datei anzeigen

@ -12,10 +12,10 @@ 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. 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 22b8b61f260f91d7c79b3772af3134a81db304ac..4714d063f18806187fbd39315467ce467e30c6a2 100644 index 1c87cfe7deca4d0d5ef834d92d553082ccfb4697..9d6a37092022db1fd53531d1670ab5b46903e93f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2864,6 +2864,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2879,6 +2879,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() { public void resetCooldown() {
getHandle().resetAttackStrengthTicker(); getHandle().resetAttackStrengthTicker();
} }

Datei anzeigen

@ -87,7 +87,7 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 65d17836785774d0f196321ba741ffd05a9db36e..fd34a2ace2efc819b06674ceab44ff78ec11f805 100644 index 0e7f5d780d8c17a68a6d3cf98febad94f63e3f81..f4a8491d6b6333030cecee3920da060d6b96a309 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1949,9 +1949,24 @@ public class ServerPlayer extends Player { @@ -1949,9 +1949,24 @@ public class ServerPlayer extends Player {
@ -116,10 +116,10 @@ index 65d17836785774d0f196321ba741ffd05a9db36e..fd34a2ace2efc819b06674ceab44ff78
if (getMainArm() != packet.mainHand()) { if (getMainArm() != packet.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4714d063f18806187fbd39315467ce467e30c6a2..8094fbb1aa84c93cf6660e2c7a32772bfc3ec62f 100644 index ad042121278294665ae6659538a12dc84126e2ad..e0096be4b6df931912704c48bf5b99f1d45bb12c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -603,6 +603,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -602,6 +602,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message); connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
} }
} }

Datei anzeigen

@ -56,10 +56,10 @@ index a3d7f9cc074ce83815938a77c6119af95790d7e7..6f43de26f3d757dc14572c2d42dd8b66
return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper return (!this.player.joining && !this.connection.isConnected()) || this.processedDisconnect; // Paper
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 8094fbb1aa84c93cf6660e2c7a32772bfc3ec62f..82229144f798eab2aacadb71250765c4e956b701 100644 index 9ad4a64420a49a13549d7c2ab414bfa08fa84b75..3daaaff22ce54fa84c999d81ff6138ab50144d54 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2981,6 +2981,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2996,6 +2996,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end // Paper end
}; };

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 82229144f798eab2aacadb71250765c4e956b701..800c6da91f6a2bdb932cc7192bde7b974fce83f9 100644 index a407bb7854f8a100fbf52f2268c3f1e5531c9bf5..09c1fc712e6913c338132770e616bb00f2c291d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -625,6 +625,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -624,6 +624,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
throw new RuntimeException("Unknown settings type"); throw new RuntimeException("Unknown settings type");
} }

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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 800c6da91f6a2bdb932cc7192bde7b974fce83f9..7d64f73867f76ecd61cb14dfd8b15ddce918574d 100644 index 3100aab6abf3a973b2e37efc7c1a86d9fdbe7b3c..85a341d99c90d4d4f4ce09d4e1b407c6575309f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2510,7 +2510,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2525,7 +2525,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null) { if (data != null) {
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType()); Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
} }

Datei anzeigen

@ -32,10 +32,10 @@ index 13e2fb9e48ed8722b68b2ce2994d9d84bb22cee4..600bb44d97b477960108ea8cd84a8e73
public boolean isWhiteListed(GameProfile profile) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7d64f73867f76ecd61cb14dfd8b15ddce918574d..2ab0c6561fc79eee25538d6ffcb3a14eb6442373 100644 index b21e27a3b3f8907a8239ccc071c291479c7fa027..d27c4b7a9db3b3970858eeacecabcc7926ff3ed8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -639,6 +639,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -638,6 +638,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
? (org.bukkit.entity.Firework) entity.getBukkitEntity() ? (org.bukkit.entity.Firework) entity.getBukkitEntity()
: null; : null;
} }

Datei anzeigen

@ -144,10 +144,10 @@ index e95574ecd4cee2515920f1445d8812b0fba7dc5e..363e16f3d8069d2828cd7437c7aed4cc
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 2ab0c6561fc79eee25538d6ffcb3a14eb6442373..e446bfc7e61889df964643e9928771fd4b2c2fdd 100644 index d27c4b7a9db3b3970858eeacecabcc7926ff3ed8..155e39b55efeb72e8b92b68bc1183d8e842cf1e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1563,7 +1563,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1562,7 +1562,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(mode != null, "GameMode cannot be null"); Preconditions.checkArgument(mode != null, "GameMode cannot be null");
if (this.getHandle().connection == null) return; if (this.getHandle().connection == null) return;

Datei anzeigen

@ -491,10 +491,10 @@ index 984c288abf94d9fe47fada33722fea035b832f3b..addd20237b87c9a87bb09fd7addb101a
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e446bfc7e61889df964643e9928771fd4b2c2fdd..0177065e849d25954737712cb0156fdb79a89156 100644 index 155e39b55efeb72e8b92b68bc1183d8e842cf1e8..f94fa71039ebd0e638745a0cd7ca86b98ecb9b5e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -585,7 +585,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -584,7 +584,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot
if (this.getHandle().connection == null) return; if (this.getHandle().connection == null) return;
@ -503,7 +503,7 @@ index e446bfc7e61889df964643e9928771fd4b2c2fdd..0177065e849d25954737712cb0156fdb
} }
// Paper start // Paper start
@@ -597,10 +597,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -596,10 +596,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void kick(final net.kyori.adventure.text.Component message) { public void kick(final net.kyori.adventure.text.Component message) {
@ -520,7 +520,7 @@ index e446bfc7e61889df964643e9928771fd4b2c2fdd..0177065e849d25954737712cb0156fdb
} }
} }
@@ -671,7 +676,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -670,7 +675,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start - improve chat handling // Paper start - improve chat handling
if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) {

Datei anzeigen

@ -49,7 +49,7 @@ index a2d0699e8427b2262a2396495111125eccafbb66..d797637f61bdf8a424f56fbb48e28b7c
} }
} }
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index deaf1fcb189ba1382f2b52d12afa12463874f7ec..c06e81d5448364154d9fb4fb68c1867d04daeb97 100644 index eaa1b300870f3bbf5a34cb99e6af116b7c244628..59e02bd5b49e0c900d049a1f1927316d45910768 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1349,7 +1349,7 @@ public class ServerPlayer extends Player { @@ -1349,7 +1349,7 @@ public class ServerPlayer extends Player {
@ -187,10 +187,10 @@ index 1a27b7faa22e6b3dc5fce329ed06425de56c4315..b9903c29bdea8d1e3b6fce0e97be6bd9
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0177065e849d25954737712cb0156fdb79a89156..a8da7ff2f8e2cf0195731f5034afa94fcd248340 100644 index f94fa71039ebd0e638745a0cd7ca86b98ecb9b5e..56418e69c8872f99efced7ca504274697db65eaa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1322,9 +1322,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1321,9 +1321,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setBedSpawnLocation(Location location, boolean override) { public void setBedSpawnLocation(Location location, boolean override) {
if (location == null) { if (location == null) {

Datei anzeigen

@ -24,10 +24,10 @@ index f96d61bdeb556665d6e6e5023f9d77fd82204e89..e3f355c85eb7cc8c1683e3009502c10a
public void write(FriendlyByteBuf buf) { public void write(FriendlyByteBuf buf) {
buf.writeLong(this.sectionPos.asLong()); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a8da7ff2f8e2cf0195731f5034afa94fcd248340..22bb914d65bec1a324f14a44a0fb946fd64cd4ab 100644 index 56418e69c8872f99efced7ca504274697db65eaa..aca87ca2bb08716ab9c5e00f8735b10e33a36373 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -890,6 +890,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -889,6 +889,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet); this.getHandle().connection.send(packet);
} }

Datei anzeigen

@ -74,10 +74,10 @@ index cc72d960d9a5f9481ec2214b1549a344907a68da..94b41e9e3abe9cfbe09af67b03bc841f
// Let the server handle cross world teleports // Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 22bb914d65bec1a324f14a44a0fb946fd64cd4ab..38ffa052f3d900c518c6689bae93e8e34ee52cb9 100644 index aca87ca2bb08716ab9c5e00f8735b10e33a36373..d93cb65e623d52f403d181f83ae950badb7bf810 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1211,13 +1211,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1210,13 +1210,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override @Override
public void setRotation(float yaw, float pitch) { public void setRotation(float yaw, float pitch) {
@ -180,7 +180,7 @@ index 22bb914d65bec1a324f14a44a0fb946fd64cd4ab..38ffa052f3d900c518c6689bae93e8e3
location.checkFinite(); location.checkFinite();
ServerPlayer entity = this.getHandle(); ServerPlayer entity = this.getHandle();
@@ -1230,7 +1318,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1229,7 +1317,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return false; return false;
} }
@ -189,7 +189,7 @@ index 22bb914d65bec1a324f14a44a0fb946fd64cd4ab..38ffa052f3d900c518c6689bae93e8e3
return false; return false;
} }
@@ -1248,7 +1336,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1247,7 +1335,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// If this player is riding another entity, we must dismount before teleporting. // If this player is riding another entity, we must dismount before teleporting.
@ -198,7 +198,7 @@ index 22bb914d65bec1a324f14a44a0fb946fd64cd4ab..38ffa052f3d900c518c6689bae93e8e3
// SPIGOT-5509: Wakeup, similar to riding // SPIGOT-5509: Wakeup, similar to riding
if (this.isSleeping()) { if (this.isSleeping()) {
@@ -1264,13 +1352,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1263,13 +1351,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle(); ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
// Close any foreign inventory // 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 38ffa052f3d900c518c6689bae93e8e34ee52cb9..689a4b5768f57b3705d72a345a64b9c0094197b6 100644 index d93cb65e623d52f403d181f83ae950badb7bf810..d8d440a73cf9173a94ddfeb332f4829b0ce6f44a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -651,6 +651,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -650,6 +650,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false); this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false);
} }

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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 689a4b5768f57b3705d72a345a64b9c0094197b6..fc9f386c07a0e99b6424420a13aba712070eeca6 100644 index 343ceadda0571a38723e83a24b04a657e46d3b6f..c0ff678f8f0f2a3db056907ccd4cbde19c2c9e0d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3144,6 +3144,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -3159,6 +3159,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// Paper end // 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 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index fc9f386c07a0e99b6424420a13aba712070eeca6..84e8a147db89bf2f962aeb9b9cddf3abbf67a2b4 100644 index c0ff678f8f0f2a3db056907ccd4cbde19c2c9e0d..bb4084e96a31492cf090ecda28ebd88f2af44623 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3149,6 +3149,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -3164,6 +3164,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void showElderGuardian(boolean silent) { public void showElderGuardian(boolean silent) {
if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F)); 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 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 84e8a147db89bf2f962aeb9b9cddf3abbf67a2b4..3f1ac596a4f20245e6a128451e9811bfbcd111f8 100644 index f471c76ec8f3b421d7b0a699099919d6d28b8ccd..2b31486304a919eeaaff9bc0056d5551854c8b5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -725,29 +725,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -724,29 +724,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (this.getHandle().connection == null) return; if (this.getHandle().connection == null) return;

Datei anzeigen

@ -26,10 +26,10 @@ index 53487f0a4fe672298c3b83d24a2a603641afcde8..58152160d609d0e9d105153aeb166a56
} else { } else {
if (fallDistance >= 2.0F) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3f1ac596a4f20245e6a128451e9811bfbcd111f8..0464b29dbad466f0e80a8b42284731a6798eab02 100644 index 7cb90ec9ae50ab6bbf4da1d37513f6b2e38d320a..a3eccebfd65f8450280aee31afc1203bcb4d978d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2366,6 +2366,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -2381,6 +2381,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().onUpdateAbilities(); this.getHandle().onUpdateAbilities();
} }

Datei anzeigen

@ -7,10 +7,10 @@ Subject: [PATCH] Win Screen API
public net.minecraft.server.level.ServerPlayer seenCredits 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 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0464b29dbad466f0e80a8b42284731a6798eab02..9e9d810c934c0d33c2903077fb0870f2273ef85b 100644 index 23cd31aae3845b6aea632fcef1a238a7bb63a028..be0e519188d401499e3d7a416146fd516b074b77 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1214,6 +1214,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1213,6 +1213,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(packet); this.getHandle().connection.send(packet);
} }

Datei anzeigen

@ -33,10 +33,10 @@ index 8d8fe55a05eea237a8af99ed15ab16d6167daa77..eca634792d2a7cc649675e3394e84dba
return k > 0 ? this.repairPlayerItems(player, k) : 0; return k > 0 ? this.repairPlayerItems(player, k) : 0;
} else { } else {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9e9d810c934c0d33c2903077fb0870f2273ef85b..25a35d7273fdb1f472b4ea92cebf93ff8e39c79a 100644 index be0e519188d401499e3d7a416146fd516b074b77..fe77d0c9c11e585a7c6258fbf8fbe63c42d3a10e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1736,11 +1736,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1735,11 +1735,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ()); orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue()); int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());

Datei anzeigen

@ -208,10 +208,10 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57
return null; return null;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 25a35d7273fdb1f472b4ea92cebf93ff8e39c79a..5bbded65095dccfadaf7576fc41b5f62974878b4 100644 index fe77d0c9c11e585a7c6258fbf8fbe63c42d3a10e..94dd03ccd95b497987117244eb9f008fe4b01a09 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1634,23 +1634,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1633,23 +1633,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
@Override @Override
@ -240,7 +240,7 @@ index 25a35d7273fdb1f472b4ea92cebf93ff8e39c79a..5bbded65095dccfadaf7576fc41b5f62
if (kickPlayer) { if (kickPlayer) {
this.kickPlayer(reason); this.kickPlayer(reason);
} }
@@ -1658,12 +1658,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1657,12 +1657,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
@Override @Override