Allow double removal from player chunk loader
Unlike Folia, players may be incorrectly be double-removed Fixes https://github.com/PaperMC/Paper/issues/9299
This commit is contained in:
parent
2ffb704efa
commit
3d06377b24
1 changed files with 2 additions and 2 deletions
|
@ -2310,7 +2310,7 @@ index 95eac2e12a16938d81ab512b00e90c5234b42834..8f7bf1f0400aeab8b7801d113d244d07
|
||||||
private ChunkSystem() {
|
private ChunkSystem() {
|
||||||
diff --git a/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..a642b02694eb50e21dee1c3dc0bc397c1712c71e
|
index 0000000000000000000000000000000000000000..a495d692841c1a6056ca82519ee9b9c66f1ff5cd
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java
|
+++ b/src/main/java/io/papermc/paper/chunk/system/RegionizedPlayerChunkLoader.java
|
||||||
@@ -0,0 +1,1418 @@
|
@@ -0,0 +1,1418 @@
|
||||||
|
@ -2471,7 +2471,7 @@ index 0000000000000000000000000000000000000000..a642b02694eb50e21dee1c3dc0bc397c
|
||||||
+ final PlayerChunkLoaderData loader = player.chunkLoader;
|
+ final PlayerChunkLoaderData loader = player.chunkLoader;
|
||||||
+
|
+
|
||||||
+ if (loader == null) {
|
+ if (loader == null) {
|
||||||
+ throw new IllegalStateException("Player is already removed from player chunk loader");
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ loader.remove();
|
+ loader.remove();
|
||||||
|
|
Loading…
Reference in a new issue