Skip to content

Commit

Permalink
Remove the world before nullifying chunkLoader & chunkProvider (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
dentmaged authored Aug 28, 2021
1 parent a2f2817 commit fb2f88c
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion base/.upstream-state
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.8--2882919d66fc3bf050fe2a1474393750d281fa07
1.8.8--2f2122c04575618c76b2f485c1528480c02b5589
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From a7addc1b58400190e483e0bc0cf4c02c2eccfff5 Mon Sep 17 00:00:00 2001
From: William Jeffcock <[email protected]>
Date: Thu, 5 Aug 2021 19:17:47 +0100
Subject: [PATCH] Remove the world before nullifying chunkLoader &
chunkProvider


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 1a92092b..0f75111e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -912,6 +912,9 @@ public final class CraftServer implements Server {
return false;
}

+ worlds.remove(world.getName().toLowerCase());
+ console.worlds.remove(console.worlds.indexOf(handle));
+
if (save) {
try {
handle.save(true, null);
@@ -937,9 +940,6 @@ public final class CraftServer implements Server {
chunkProviderServer.chunks.clear();
}

- worlds.remove(world.getName().toLowerCase());
- console.worlds.remove(console.worlds.indexOf(handle));
-
File parentFolder = world.getWorldFolder().getAbsoluteFile();

// Synchronized because access to RegionFileCache.a is guarded by this lock.
--
2.17.1

0 comments on commit fb2f88c

Please sign in to comment.