aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0180-Player.setPlayerProfile-API.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2024-01-14 01:46:04 -0800
committerGitHub <[email protected]>2024-01-14 10:46:04 +0100
commit8657cd91d7f4741959e2f35b155cde76f08b51d5 (patch)
tree6959e2ca3fdd11ca62df29859ed47cb0dfbf01b3 /patches/server/0180-Player.setPlayerProfile-API.patch
parent78fcb8e7663307931f932ad0087ee42d65a203de (diff)
downloadPaper-8657cd91d7f4741959e2f35b155cde76f08b51d5.tar.gz
Paper-8657cd91d7f4741959e2f35b155cde76f08b51d5.zip
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10164)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 63c208dd Remove no longer used import 70be76c7 PR-958: Further clarify deprecation of TAG_CONTAINER_ARRAY ae21f4ac PR-955: Add methods to place structures with block/entity transformers e3d960f2 SPIGOT-7547: Remark that Damageable#setAbsorptionAmount() is capped to a specific value b125516c Fix typo in RecipeChoice.ExactChoice docs 309497c1 Add EntityMountEvent and EntityDismount Event 2fd45ae3 Improve ItemFactory#enchantItem consistency 2b198268 PR-933: Define native persistent data types for lists CraftBukkit Changes: 771182f70 PR-1327: Add methods to place structures with block/entity transformers e41ad4c82 SPIGOT-7567: SpawnReason for SNOWMAN is reported as BUILD_IRONGOLEM 76931e8bd Add EntityMountEvent and EntityDismount Event 9b29b21c7 PR-1183: Better handle lambda expression and renaming of classes in Commodore 1462ebe85 Reformat Commodore.java 9fde4c037 PR-1324: Improve ItemFactory#enchantItem consistency 4e419c774 PR-1295: Define native persistent data types for lists dd8cca388 SPIGOT-7562: Fix Score#getScore and Score#isScoreSet 690278200 Only fetch an online UUID in online mode 1da8d9a53 Fire PreLogin events even in offline mode 2e88514ad PR-1325: Use CraftBlockType and CraftItemType instead of CraftMagicNumbers to convert between minecraft and bukkit block / item representation Spigot Changes: 864e4acc Restore accidentally removed package-info.java f91a10d5 Remove obsolete EntityMountEvent and EntityDismountEvent 828f0593 SPIGOT-7558: Deprecate silenceable lightning API as sound is now client-side and cannot be removed cdc4e035 Remove obsolete patch fetching correct mode UUIDs 49e36b8e Merge related BungeeCord patches 6e87b9ab Remove obsolete firing of PreLogin events in offline mode 5c76b183 Remove redundant patch dealing with exceptions in the crash reporter 3a2219d1 Remove redundant patch logging cause of unexpected exception
Diffstat (limited to 'patches/server/0180-Player.setPlayerProfile-API.patch')
-rw-r--r--patches/server/0180-Player.setPlayerProfile-API.patch43
1 files changed, 22 insertions, 21 deletions
diff --git a/patches/server/0180-Player.setPlayerProfile-API.patch b/patches/server/0180-Player.setPlayerProfile-API.patch
index b8fe8842da..7608558483 100644
--- a/patches/server/0180-Player.setPlayerProfile-API.patch
+++ b/patches/server/0180-Player.setPlayerProfile-API.patch
@@ -9,7 +9,7 @@ This can be useful for changing name or skins after a player has logged in.
public-f net.minecraft.world.entity.player.Player gameProfile
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index a128040002fd9f297b9ea501af357c598cbe7af2..1e7d74df49712a3c3e107026406718c16bc3d166 100644
+index 9c0440a6e3768ca6300e128da7f1b11a96f10f91..c1c9076be05cd4b0b19d16aabbf0320c2531cca1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1468,7 +1468,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -22,23 +22,23 @@ index a128040002fd9f297b9ea501af357c598cbe7af2..1e7d74df49712a3c3e107026406718c1
if (Float.isNaN(f)) {
f = 0;
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
-index 827774b02136ec1862bc9ffabc76ba3a4eb87716..96ae1fd95956f5e5a1542dcce3fbd9d4b83d49ba 100644
+index 08a40d2418dc7e3f481a0a45e0c1845d68a74f07..3a250865ed364cdcd6f75e874c218b259b1aaad5 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
-@@ -289,11 +289,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
- final org.bukkit.craftbukkit.CraftServer server = ServerLoginPacketListenerImpl.this.server.server;
-
- // Paper start
-- com.destroystokyo.paper.profile.PlayerProfile profile = org.bukkit.Bukkit.createProfile(uniqueId, playerName);
-+ com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(gameprofile);
- AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, profile);
- server.getPluginManager().callEvent(asyncEvent);
- profile = asyncEvent.getPlayerProfile();
-- profile.complete();
-+ profile.complete(true); // Paper - setPlayerProfileAPI
- gameprofile = com.destroystokyo.paper.profile.CraftPlayerProfile.asAuthlibCopy(profile);
- playerName = gameprofile.getName();
- uniqueId = gameprofile.getId();
+@@ -294,11 +294,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
+ final org.bukkit.craftbukkit.CraftServer server = ServerLoginPacketListenerImpl.this.server.server;
+
+ // Paper start
+- com.destroystokyo.paper.profile.PlayerProfile profile = org.bukkit.Bukkit.createProfile(uniqueId, playerName);
++ com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(gameprofile);
+ AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, profile);
+ server.getPluginManager().callEvent(asyncEvent);
+ profile = asyncEvent.getPlayerProfile();
+- profile.complete();
++ profile.complete(true); // Paper - setPlayerProfileAPI
+ gameprofile = com.destroystokyo.paper.profile.CraftPlayerProfile.asAuthlibCopy(profile);
+ playerName = gameprofile.getName();
+ uniqueId = gameprofile.getId();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 6e0a21935f9d5f35cbce72b32e0a89bb636804e2..782cc6d910efe5bc5498d0083afab42fad6c4fa2 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -220,10 +220,10 @@ index 8dd7e875d0e2ac3c10cce9b7045b5dbc742e9fb7..d296e1687fd596d6674e18b316603d08
public void onEntityRemove(Entity entity) {
this.invertedVisibilityEntities.remove(entity.getUUID());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 3720fa451cfd82d1df6461b88d12d2f53b364c92..afa93af41bf9b45dd7e49378b7fea088087993d5 100644
+index 457860fa9babe542347608a3fc11ad5d75e5d135..6a661bbae8bc35a4c3b4bb7e86dd77a7575fdd97 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -341,6 +341,12 @@ public class Commodore
+@@ -277,6 +277,13 @@ public class Commodore {
return;
}
@@ -233,6 +233,7 @@ index 3720fa451cfd82d1df6461b88d12d2f53b364c92..afa93af41bf9b45dd7e49378b7fea088
+ return;
+ }
+ // Paper end
- if ( modern )
- {
- if ( owner.equals( "org/bukkit/Material" ) )
++
+ if (modern) {
+ if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
+ switch (name) {