mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Do not send PlayerProfile info before initial server send
This commit is contained in:
parent
4e0ed1f812
commit
e5e4e9f717
7 changed files with 35 additions and 32 deletions
|
@ -1,4 +1,4 @@
|
|||
From e7b7e68bd9f3c6cfea4dbc2ed611f317971fa462 Mon Sep 17 00:00:00 2001
|
||||
From ff874f87d6b3546677bdb32fb6bd9b894e53bf97 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 18 Mar 2018 12:29:48 -0400
|
||||
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.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index ef9eabb83..0f12f8386 100644
|
||||
index 3fe13fe489..60dd8672b1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -66,7 +66,7 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
@ -19,7 +19,7 @@ index ef9eabb83..0f12f8386 100644
|
|||
private final ItemCooldown bW;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
index 1b43f9216..1c4ac7bf7 100644
|
||||
index 1b43f92164..1c4ac7bf7a 100644
|
||||
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
@@ -37,7 +37,7 @@ public class LoginListener implements PacketLoginInListener {
|
||||
|
@ -48,7 +48,7 @@ index 1b43f9216..1c4ac7bf7 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 6f47768c9..c3f8f3f4c 100644
|
||||
index 6f47768c9d..15e33d7627 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1,6 +1,8 @@
|
||||
|
@ -90,7 +90,7 @@ index 6f47768c9..c3f8f3f4c 100644
|
|||
|
||||
getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other));
|
||||
|
||||
@@ -1263,6 +1275,46 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1263,6 +1275,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
entry.updatePlayer(getHandle());
|
||||
}
|
||||
}
|
||||
|
@ -104,6 +104,9 @@ index 6f47768c9..c3f8f3f4c 100644
|
|||
+ public void setPlayerProfile(PlayerProfile profile) {
|
||||
+ EntityPlayer self = getHandle();
|
||||
+ self.setProfile(CraftPlayerProfile.asAuthlibCopy(profile));
|
||||
+ if (!self.sentListPacket) {
|
||||
+ return;
|
||||
+ }
|
||||
+ List<EntityPlayer> players = server.getServer().getPlayerList().players;
|
||||
+ for (EntityPlayer player : players) {
|
||||
+ player.getBukkitEntity().reregisterPlayer(self);
|
||||
|
@ -138,5 +141,5 @@ index 6f47768c9..c3f8f3f4c 100644
|
|||
public void removeDisconnectingPlayer(Player player) {
|
||||
hiddenPlayers.remove(player.getUniqueId());
|
||||
--
|
||||
2.25.0.windows.1
|
||||
2.25.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From ed65177c90b9a615bd215ae490fd2c8c1d77bf60 Mon Sep 17 00:00:00 2001
|
||||
From ad3f3b50762b459a49bbcf32daad5a5c2aaf1157 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 31 Mar 2018 17:04:26 +0100
|
||||
Subject: [PATCH] Flag to disable the channel limit
|
||||
|
@ -9,7 +9,7 @@ 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 c3f8f3f4c..f4affa693 100644
|
||||
index 15e33d7627..52640237ae 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -139,6 +139,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -20,7 +20,7 @@ index c3f8f3f4c..f4affa693 100644
|
|||
// Paper end
|
||||
|
||||
public CraftPlayer(CraftServer server, EntityPlayer entity) {
|
||||
@@ -1477,7 +1478,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1480,7 +1481,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void addChannel(String channel) {
|
||||
|
@ -30,5 +30,5 @@ index c3f8f3f4c..f4affa693 100644
|
|||
if (channels.add(channel)) {
|
||||
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
|
||||
--
|
||||
2.25.0.windows.1
|
||||
2.25.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 198291c913a117bd81a0494db8761ec597bccd4f Mon Sep 17 00:00:00 2001
|
||||
From a257773366babc48f6a1c3230cee3b7d68852384 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Tue, 4 Sep 2018 15:02:00 -0500
|
||||
Subject: [PATCH] Expose attack cooldown methods for Player
|
||||
|
@ -27,10 +27,10 @@ index 36748ccb73..308ac18f7e 100644
|
|||
this.aB = 0;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c1f3927164..352ef3669d 100644
|
||||
index d7d86a8b24..d584c76ecd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1937,6 +1937,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1940,6 +1940,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
getInventory().setItemInMainHand(hand);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 62639edfe6a049398609911a06275206555c92ef Mon Sep 17 00:00:00 2001
|
||||
From 781a971c7b159e43a4fb78b68a80793106047332 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Tue, 21 Aug 2018 01:39:35 +0100
|
||||
Subject: [PATCH] Improve death events
|
||||
|
@ -357,10 +357,10 @@ index 90fdf89c81..b761a41dcd 100644
|
|||
this.minecraftKey = minecraftKey;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 352ef3669d..a2bda708cd 100644
|
||||
index d584c76ecd..878287cf0d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1730,7 +1730,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1733,7 +1733,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void sendHealthUpdate() {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From b7b5a52cd71c7cdbc1f5efe09f6f0162a6b81bd0 Mon Sep 17 00:00:00 2001
|
||||
From 98fd5c7326cfb9649b535e7368af730e6c319055 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Wed, 2 Jan 2019 00:35:43 -0600
|
||||
Subject: [PATCH] Add APIs to replace OfflinePlayer#getLastPlayed
|
||||
|
@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and
|
|||
documented as to their purpose.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 68e12cf98..d3bfb72e3 100644
|
||||
index 68e12cf987..d3bfb72e39 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -75,6 +75,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
@ -28,7 +28,7 @@ index 68e12cf98..d3bfb72e3 100644
|
|||
public boolean queueHealthUpdatePacket = false;
|
||||
public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index e46436623..659ce2181 100644
|
||||
index e46436623c..659ce21818 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -94,6 +94,7 @@ public abstract class PlayerList {
|
||||
|
@ -40,7 +40,7 @@ index e46436623..659ce2181 100644
|
|||
UserCache usercache = this.server.getUserCache();
|
||||
GameProfile gameprofile1 = usercache.getProfile(gameprofile.getId());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
index c1ef1c950..3824180ee 100644
|
||||
index c1ef1c950d..3824180ee5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
@@ -256,6 +256,61 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
|
||||
|
@ -106,7 +106,7 @@ index c1ef1c950..3824180ee 100644
|
|||
public Location getBedSpawnLocation() {
|
||||
NBTTagCompound data = getData();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index a2bda708c..37fce38df 100644
|
||||
index 878287cf0d..2de233df35 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -140,6 +140,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -117,7 +117,7 @@ index a2bda708c..37fce38df 100644
|
|||
// Paper end
|
||||
|
||||
public CraftPlayer(CraftServer server, EntityPlayer entity) {
|
||||
@@ -1381,6 +1382,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1384,6 +1385,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.firstPlayed = firstPlayed;
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ index a2bda708c..37fce38df 100644
|
|||
public void readExtraData(NBTTagCompound nbttagcompound) {
|
||||
hasPlayedBefore = true;
|
||||
if (nbttagcompound.hasKey("bukkit")) {
|
||||
@@ -1403,6 +1416,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1406,6 +1419,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void setExtraData(NBTTagCompound nbttagcompound) {
|
||||
|
@ -145,7 +145,7 @@ index a2bda708c..37fce38df 100644
|
|||
if (!nbttagcompound.hasKey("bukkit")) {
|
||||
nbttagcompound.set("bukkit", new NBTTagCompound());
|
||||
}
|
||||
@@ -1417,6 +1432,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1420,6 +1435,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
data.setLong("firstPlayed", getFirstPlayed());
|
||||
data.setLong("lastPlayed", System.currentTimeMillis());
|
||||
data.setString("lastKnownName", handle.getName());
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 10eeb187755c706820e20adce87370123cf0d928 Mon Sep 17 00:00:00 2001
|
||||
From b2a9a02d35fec7ec28ab7cf95df8d10bcf92f993 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Mon, 4 Feb 2019 23:33:24 -0500
|
||||
Subject: [PATCH] Block Entity#remove from being called on Players
|
||||
|
@ -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.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 37fce38df..90c251c90 100644
|
||||
index 2de233df35..74a9e8f22e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1982,6 +1982,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1985,6 +1985,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void resetCooldown() {
|
||||
getHandle().resetCooldown();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 629400beb0c8a6bbfe7b1f0e9e6407b92c08b82a Mon Sep 17 00:00:00 2001
|
||||
From 51a39af4446218c38576ee01e3cf457636d4e786 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Mon, 6 May 2019 01:29:25 -0400
|
||||
Subject: [PATCH] Per-Player View Distance API placeholders
|
||||
|
@ -7,7 +7,7 @@ I hope to look at this more in-depth soon. It appears doable.
|
|||
However this should not block the update.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
index 6a4ccaeb0..af10fc36e 100644
|
||||
index 6a4ccaeb0f..af10fc36e0 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
@@ -579,9 +579,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||
|
@ -23,7 +23,7 @@ index 6a4ccaeb0..af10fc36e 100644
|
|||
double deltaX = this.locX() - player.locX();
|
||||
double deltaZ = this.locZ() - player.locZ();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
index 2e95069c1..8977c3516 100644
|
||||
index 2e95069c19..8977c3516b 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
@@ -208,9 +208,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
|
@ -39,10 +39,10 @@ index 2e95069c1..8977c3516 100644
|
|||
double deltaX = this.locX() - player.locX();
|
||||
double deltaZ = this.locZ() - player.locZ();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 90c251c90..c1acec87f 100644
|
||||
index 74a9e8f22e..60f62f19cb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1991,6 +1991,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1994,6 +1994,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
super.remove();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue