mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 07:32:03 -07:00
@@ -1,4 +1,4 @@
|
||||
From 634e80d14c3e6eac422e23b0b94402fbb8add174 Mon Sep 17 00:00:00 2001
|
||||
From fe37c8f84144ee7226e7e5f44a3e8a4f826af8c8 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <git@md-5.net>
|
||||
Date: Sat, 15 Mar 2014 14:34:03 +1100
|
||||
Subject: [PATCH] Optimize Player Lookup
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Optimize Player Lookup
|
||||
Optimize player lookup and various player operations. We mainly do this by keeping a map instead of iterating through all players. We also speed up the duplicate login check and a few other checks by simply checking for one matching player.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 2afea17..aef80bd 100644
|
||||
index a2599ec..77b6193 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -56,6 +56,25 @@ public abstract class PlayerList {
|
||||
@@ -35,7 +35,7 @@ index 2afea17..aef80bd 100644
|
||||
// CraftBukkit start
|
||||
private CraftServer cserver;
|
||||
|
||||
@@ -218,6 +237,7 @@ public abstract class PlayerList {
|
||||
@@ -222,6 +241,7 @@ public abstract class PlayerList {
|
||||
cserver.detectListNameConflict(entityplayer); // CraftBukkit
|
||||
// this.sendAll(new PacketPlayOutPlayerInfo(entityplayer.getName(), true, 1000)); // CraftBukkit - replaced with loop below
|
||||
this.players.add(entityplayer);
|
||||
@@ -43,7 +43,7 @@ index 2afea17..aef80bd 100644
|
||||
WorldServer worldserver = this.server.getWorldServer(entityplayer.dimension);
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -292,6 +312,7 @@ public abstract class PlayerList {
|
||||
@@ -296,6 +316,7 @@ public abstract class PlayerList {
|
||||
worldserver.kill(entityplayer);
|
||||
worldserver.getPlayerChunkMap().removePlayer(entityplayer);
|
||||
this.players.remove(entityplayer);
|
||||
@@ -51,7 +51,7 @@ index 2afea17..aef80bd 100644
|
||||
this.j.remove(entityplayer.getName());
|
||||
ChunkIOExecutor.adjustPoolSize(this.getPlayerCount()); // CraftBukkit
|
||||
|
||||
@@ -370,23 +391,14 @@ public abstract class PlayerList {
|
||||
@@ -374,23 +395,14 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public EntityPlayer processLogin(GameProfile gameprofile, EntityPlayer player) { // CraftBukkit - added EntityPlayer
|
||||
@@ -81,7 +81,7 @@ index 2afea17..aef80bd 100644
|
||||
|
||||
/* CraftBukkit start
|
||||
Object object;
|
||||
@@ -882,19 +894,7 @@ public abstract class PlayerList {
|
||||
@@ -886,19 +898,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public EntityPlayer getPlayer(String s) {
|
||||
@@ -183,5 +183,5 @@ index fa51a4c..0895491 100644
|
||||
|
||||
public InetSocketAddress getAddress() {
|
||||
--
|
||||
1.8.5.2.msysgit.0
|
||||
1.8.3.2
|
||||
|
||||
|
Reference in New Issue
Block a user