mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 14:58:43 +01:00
Comment typo
This commit is contained in:
parent
431303ff40
commit
993db46961
1 changed files with 3 additions and 5 deletions
|
@ -57,18 +57,16 @@
|
|||
|
||||
private SortedArraySet<Ticket<?>> getTickets(long chunkPos) {
|
||||
return this.tickets.computeIfAbsent(chunkPos, l -> SortedArraySet.create(4));
|
||||
@@ -217,8 +_,12 @@
|
||||
@@ -217,8 +_,10 @@
|
||||
ChunkPos chunkPos = sectionPos.chunk();
|
||||
long packedChunkPos = chunkPos.toLong();
|
||||
ObjectSet<ServerPlayer> set = this.playersPerChunk.get(packedChunkPos);
|
||||
- set.remove(player);
|
||||
- if (set.isEmpty()) {
|
||||
+ // Paper start - some state corruption happens here, don't crash, clean up gracefully
|
||||
+ if (set != null) {
|
||||
+ set.remove(player);
|
||||
+ }
|
||||
+ if (set != null) set.remove(player);
|
||||
+ if (set == null || set.isEmpty()) {
|
||||
+ // Paper end - some state corruption happens here, don't crash, clean up gracefully
|
||||
+ // Paper end - some state corruption happens here, don't crash, clean up gracefully
|
||||
this.playersPerChunk.remove(packedChunkPos);
|
||||
this.naturalSpawnChunkCounter.update(packedChunkPos, Integer.MAX_VALUE, false);
|
||||
this.playerTicketManager.update(packedChunkPos, Integer.MAX_VALUE, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue