mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-17 06:48:23 +01:00
Don't replace entries in the tracked player map (Fixes #2102)
This commit is contained in:
parent
35226c96e4
commit
18794d2123
1 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ index 315c3d9165..aaf3a54b08 100644
|
||||||
|
|
||||||
this.c();
|
this.c();
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 44e3340773..6c904968d7 100644
|
index 44e3340773..cfc7f5a118 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
@@ -0,0 +0,0 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||||
|
@ -102,7 +102,7 @@ index 44e3340773..6c904968d7 100644
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
- if (flag1 && this.trackedPlayers.add(entityplayer)) {
|
- if (flag1 && this.trackedPlayers.add(entityplayer)) {
|
||||||
+ if (flag1 && this.trackedPlayerMap.put(entityplayer, true) == null) { // Paper
|
+ if (flag1 && this.trackedPlayerMap.putIfAbsent(entityplayer, true) == null) { // Paper
|
||||||
this.trackerEntry.b(entityplayer);
|
this.trackerEntry.b(entityplayer);
|
||||||
}
|
}
|
||||||
} else if (this.trackedPlayers.remove(entityplayer)) {
|
} else if (this.trackedPlayers.remove(entityplayer)) {
|
||||||
|
|
Loading…
Reference in a new issue