mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Merge pull request #1250
Cleaned up some implementation notes to use existing Vanilla method for some things. merged into parent patch9526c764
Fixed more stuff (NickAcPT)8672424c
Remove unsed method (NickAcPT)a7f45fb1
Extend player profile API to support skin changes (NickAcPT)4cccd48a
Extend player profile API to support skin changes (NickAcPT) * pull/1250/head: Fixed more stuff Remove unsed method Extend player profile API to support skin changes Extend player profile API to support skin changes
This commit is contained in:
@@ -48,7 +48,7 @@ index 2842956bf..8aeded425 100644
|
||||
uniqueId = i.getId();
|
||||
// Paper end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 77c50ba14..598b210ce 100644
|
||||
index 77c50ba14..8b20509bc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -109,10 +109,31 @@ index 77c50ba14..598b210ce 100644
|
||||
+ for (EntityPlayer player : players) {
|
||||
+ player.getBukkitEntity().reregisterPlayer(self);
|
||||
+ }
|
||||
+ refreshPlayer();
|
||||
+ }
|
||||
+ public PlayerProfile getPlayerProfile() {
|
||||
+ return new CraftPlayerProfile(this).clone();
|
||||
+ }
|
||||
+
|
||||
+ private void refreshPlayer() {
|
||||
+ EntityPlayer handle = getHandle();
|
||||
+
|
||||
+ Location loc = getLocation();
|
||||
+
|
||||
+ PlayerConnection connection = handle.playerConnection;
|
||||
+ reregisterPlayer(handle);
|
||||
+
|
||||
+ //Respawn the player then update their position and selected slot
|
||||
+ connection.sendPacket(new PacketPlayOutRespawn(handle.dimension, handle.world.getDifficulty(), handle.world.getWorldData().getType(), handle.playerInteractManager.getGameMode()));
|
||||
+ handle.updateAbilities();
|
||||
+ connection.sendPacket(new PacketPlayOutPosition(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), new HashSet<>(), 0));
|
||||
+ MinecraftServer.getServer().getPlayerList().updateClient(handle);
|
||||
+
|
||||
+ if (this.isOp()) {
|
||||
+ this.setOp(false);
|
||||
+ this.setOp(true);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
public void removeDisconnectingPlayer(Player player) {
|
||||
|
Reference in New Issue
Block a user