diff options
Diffstat (limited to 'nms-patches/PlayerList.patch')
-rw-r--r-- | nms-patches/PlayerList.patch | 59 |
1 files changed, 31 insertions, 28 deletions
diff --git a/nms-patches/PlayerList.patch b/nms-patches/PlayerList.patch index 207bdf0c..24d35178 100644 --- a/nms-patches/PlayerList.patch +++ b/nms-patches/PlayerList.patch @@ -74,19 +74,19 @@ + // PlayerList.f.info("{}[{}] logged in with entity id {} at ({}, {}, {})", new Object[] { entityplayer.getName(), s1, Integer.valueOf(entityplayer.getId()), Double.valueOf(entityplayer.locX), Double.valueOf(entityplayer.locY), Double.valueOf(entityplayer.locZ)}); WorldServer worldserver = this.server.getWorldServer(entityplayer.dimension); WorldData worlddata = worldserver.getWorldData(); - BlockPosition blockposition = worldserver.getSpawn(); -@@ -81,6 +116,7 @@ + +@@ -80,6 +115,7 @@ PlayerConnection playerconnection = new PlayerConnection(this.server, networkmanager, entityplayer); playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), worlddata.isHardcore(), worldserver.worldProvider.getDimensionManager().getDimensionID(), worldserver.getDifficulty(), this.getMaxPlayers(), worlddata.getType(), worldserver.getGameRules().getBoolean("reducedDebugInfo"))); + entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.sendPacket(new PacketPlayOutCustomPayload("MC|Brand", (new PacketDataSerializer(Unpooled.buffer())).a(this.getServer().getServerModName()))); playerconnection.sendPacket(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); - playerconnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition)); -@@ -91,17 +127,23 @@ + playerconnection.sendPacket(new PacketPlayOutAbilities(entityplayer.abilities)); +@@ -89,17 +125,23 @@ entityplayer.getStatisticManager().updateStatistics(entityplayer); this.sendScoreboard((ScoreboardServer) worldserver.getScoreboard(), entityplayer); - this.server.aC(); + this.server.aD(); - ChatMessage chatmessage; + // CraftBukkit start - login message is handled in the event + // ChatMessage chatmessage; @@ -113,7 +113,7 @@ playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch); this.b(entityplayer, worldserver); if (!this.server.getResourcePack().isEmpty()) { -@@ -161,6 +203,8 @@ +@@ -159,6 +201,8 @@ } entityplayer.syncInventory(); @@ -122,7 +122,7 @@ } public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) { -@@ -193,26 +237,27 @@ +@@ -191,26 +235,27 @@ } public void setPlayerFileData(WorldServer[] aworldserver) { @@ -155,7 +155,7 @@ } public void b(WorldBorder worldborder, double d0) {} -@@ -237,7 +282,7 @@ +@@ -235,7 +280,7 @@ } public NBTTagCompound a(EntityPlayer entityplayer) { @@ -164,7 +164,7 @@ NBTTagCompound nbttagcompound1; if (entityplayer.getName().equals(this.server.Q()) && nbttagcompound != null) { -@@ -261,28 +306,72 @@ +@@ -259,28 +304,72 @@ } @@ -237,13 +237,13 @@ + cserver.getPluginManager().callEvent(playerQuitEvent); + entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); + -+ entityplayer.k_();// SPIGOT-924 // PAIL: rename - playerTick ++ entityplayer.playerTick();// SPIGOT-924 + // CraftBukkit end + this.savePlayerFile(entityplayer); if (entityplayer.isPassenger()) { Entity entity = entityplayer.getVehicle(); -@@ -314,13 +403,61 @@ +@@ -312,13 +401,61 @@ this.o.remove(uuid); } @@ -308,7 +308,7 @@ GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile); s = "You are banned from this server!\nReason: " + gameprofilebanentry.getReason(); -@@ -328,10 +465,12 @@ +@@ -326,10 +463,12 @@ s = s + "\nYour ban will be removed on " + PlayerList.g.format(gameprofilebanentry.getExpires()); } @@ -324,7 +324,7 @@ IpBanEntry ipbanentry = this.l.get(socketaddress); s = "Your IP address is banned from this server!\nReason: " + ipbanentry.getReason(); -@@ -339,13 +478,25 @@ +@@ -337,13 +476,25 @@ s = s + "\nYour ban will be removed on " + PlayerList.g.format(ipbanentry.getExpires()); } @@ -353,7 +353,7 @@ UUID uuid = EntityHuman.a(gameprofile); ArrayList arraylist = Lists.newArrayList(); -@@ -380,17 +531,26 @@ +@@ -378,17 +529,26 @@ } return new EntityPlayer(this.server, this.server.getWorldServer(0), gameprofile, (PlayerInteractManager) object); @@ -381,7 +381,7 @@ entityplayer.dimension = i; Object object; -@@ -401,6 +561,11 @@ +@@ -399,6 +559,11 @@ } EntityPlayer entityplayer1 = new EntityPlayer(this.server, this.server.getWorldServer(entityplayer.dimension), entityplayer.getProfile(), (PlayerInteractManager) object); @@ -393,7 +393,7 @@ entityplayer1.playerConnection = entityplayer.playerConnection; entityplayer1.copyTo(entityplayer, flag); -@@ -415,43 +580,157 @@ +@@ -413,43 +578,157 @@ entityplayer1.a(s); } @@ -568,7 +568,7 @@ public void f(EntityPlayer entityplayer) { GameProfile gameprofile = entityplayer.getProfile(); int i = this.isOp(gameprofile) ? this.operators.a(gameprofile) : 0; -@@ -490,12 +769,111 @@ +@@ -488,12 +767,111 @@ } public void changeWorld(Entity entity, int i, WorldServer worldserver, WorldServer worldserver1) { @@ -680,7 +680,7 @@ if (entity.dimension == -1) { d0 = MathHelper.a(d0 / 8.0D, worldserver1.getWorldBorder().b() + 16.0D, worldserver1.getWorldBorder().d() - 16.0D); d1 = MathHelper.a(d1 / 8.0D, worldserver1.getWorldBorder().c() + 16.0D, worldserver1.getWorldBorder().e() - 16.0D); -@@ -514,6 +892,8 @@ +@@ -512,6 +890,8 @@ BlockPosition blockposition; if (i == 1) { @@ -689,7 +689,7 @@ blockposition = worldserver1.getSpawn(); } else { blockposition = worldserver1.getDimensionSpawn(); -@@ -527,16 +907,27 @@ +@@ -525,16 +905,27 @@ worldserver.entityJoinedWorld(entity, false); } } @@ -720,7 +720,7 @@ worldserver1.entityJoinedWorld(entity, false); } -@@ -544,6 +935,7 @@ +@@ -542,6 +933,7 @@ } entity.spawnIn(worldserver1); @@ -728,7 +728,7 @@ } public void tick() { -@@ -561,6 +953,25 @@ +@@ -559,6 +951,25 @@ } @@ -754,7 +754,7 @@ public void a(Packet<?> packet, int i) { for (int j = 0; j < this.players.size(); ++j) { EntityPlayer entityplayer = (EntityPlayer) this.players.get(j); -@@ -659,11 +1070,23 @@ +@@ -657,11 +1068,23 @@ this.operators.add(new OpListEntry(gameprofile, this.server.q(), this.operators.b(gameprofile))); this.b(this.a(gameprofile.getId()), i); @@ -778,7 +778,7 @@ } private void b(EntityPlayer entityplayer, int i) { -@@ -688,7 +1111,7 @@ +@@ -686,7 +1109,7 @@ } public boolean isOp(GameProfile gameprofile) { @@ -787,7 +787,7 @@ } @Nullable -@@ -712,6 +1135,12 @@ +@@ -710,6 +1133,12 @@ for (int j = 0; j < this.players.size(); ++j) { EntityPlayer entityplayer = (EntityPlayer) this.players.get(j); @@ -800,7 +800,7 @@ if (entityplayer != entityhuman && entityplayer.dimension == i) { double d4 = d0 - entityplayer.locX; double d5 = d1 - entityplayer.locY; -@@ -759,21 +1188,26 @@ +@@ -757,7 +1186,7 @@ public void reloadWhitelist() {} public void b(EntityPlayer entityplayer, WorldServer worldserver) { @@ -809,6 +809,9 @@ entityplayer.playerConnection.sendPacket(new PacketPlayOutWorldBorder(worldborder, PacketPlayOutWorldBorder.EnumWorldBorderAction.INITIALIZE)); entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(worldserver.getTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean("doDaylightCycle"))); +@@ -765,16 +1194,21 @@ + + entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition)); if (worldserver.W()) { - entityplayer.playerConnection.sendPacket(new PacketPlayOutGameStateChange(1, 0.0F)); - entityplayer.playerConnection.sendPacket(new PacketPlayOutGameStateChange(7, worldserver.j(1.0F))); @@ -832,7 +835,7 @@ entityplayer.playerConnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex)); } -@@ -786,7 +1220,7 @@ +@@ -787,7 +1221,7 @@ } public String[] getSeenPlayers() { @@ -841,7 +844,7 @@ } public boolean getHasWhitelist() { -@@ -835,17 +1269,29 @@ +@@ -836,17 +1270,29 @@ } public void u() { @@ -874,7 +877,7 @@ } public void sendMessage(IChatBaseComponent ichatbasecomponent) { -@@ -882,8 +1328,10 @@ +@@ -883,8 +1329,10 @@ WorldServer[] aworldserver = this.server.worldServer; int j = aworldserver.length; |