Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
Add missing registerPlayer in CraftPlayer.showPlayer0 (#1051)
Dieser Commit ist enthalten in:
Ursprung
b4b649122a
Commit
056e5d5953
@ -1,4 +1,4 @@
|
|||||||
From 8e31a909319ac13bcacf35a8cc6c89c05b69c246 Mon Sep 17 00:00:00 2001
|
From e19049ea23be5301ab117ae996d6f1a13d9d8528 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 18 Mar 2018 12:29:48 -0400
|
Date: Sun, 18 Mar 2018 12:29:48 -0400
|
||||||
Subject: [PATCH] Player.setPlayerProfile API
|
Subject: [PATCH] Player.setPlayerProfile API
|
||||||
@ -6,7 +6,7 @@ Subject: [PATCH] Player.setPlayerProfile API
|
|||||||
This can be useful for changing name or skins after a player has logged in.
|
This can be useful for changing name or skins after a player has logged in.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
index 4b82e43a8..35fde8b23 100644
|
index 4b82e43a..35fde8b2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
@@ -59,7 +59,7 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -59,7 +59,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
@ -19,7 +19,7 @@ index 4b82e43a8..35fde8b23 100644
|
|||||||
private final ItemCooldown bW;
|
private final ItemCooldown bW;
|
||||||
@Nullable
|
@Nullable
|
||||||
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 21631c588..f0e3c2cff 100644
|
index 21631c58..87e31cf0 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
|
||||||
@@ -1,6 +1,8 @@
|
@@ -1,6 +1,8 @@
|
||||||
@ -47,13 +47,14 @@ index 21631c588..f0e3c2cff 100644
|
|||||||
EntityTrackerEntry entry = tracker.trackedEntities.get(other.getId());
|
EntityTrackerEntry entry = tracker.trackedEntities.get(other.getId());
|
||||||
if (entry != null) {
|
if (entry != null) {
|
||||||
entry.clear(getHandle());
|
entry.clear(getHandle());
|
||||||
@@ -1134,8 +1142,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1134,8 +1142,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
}
|
}
|
||||||
hiddenPlayers.remove(player.getUniqueId());
|
hiddenPlayers.remove(player.getUniqueId());
|
||||||
|
|
||||||
- EntityTracker tracker = ((WorldServer) entity.world).tracker;
|
- EntityTracker tracker = ((WorldServer) entity.world).tracker;
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
EntityPlayer other = ((CraftPlayer) player).getHandle();
|
EntityPlayer other = ((CraftPlayer) player).getHandle();
|
||||||
|
+ registerPlayer(other);
|
||||||
+ }
|
+ }
|
||||||
+ private void registerPlayer(EntityPlayer other) {
|
+ private void registerPlayer(EntityPlayer other) {
|
||||||
+ EntityTracker tracker = ((WorldServer) entity.world).tracker;
|
+ EntityTracker tracker = ((WorldServer) entity.world).tracker;
|
||||||
@ -61,7 +62,7 @@ index 21631c588..f0e3c2cff 100644
|
|||||||
|
|
||||||
getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other));
|
getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other));
|
||||||
|
|
||||||
@@ -1144,6 +1156,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1144,6 +1157,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
entry.updatePlayer(getHandle());
|
entry.updatePlayer(getHandle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -88,5 +89,5 @@ index 21631c588..f0e3c2cff 100644
|
|||||||
public void removeDisconnectingPlayer(Player player) {
|
public void removeDisconnectingPlayer(Player player) {
|
||||||
hiddenPlayers.remove(player.getUniqueId());
|
hiddenPlayers.remove(player.getUniqueId());
|
||||||
--
|
--
|
||||||
2.16.2
|
2.16.1.windows.1
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren