geforkt von Mirrors/Paper
SPIGOT-113: Add save status to ChunkUnloadEvent
Dieser Commit ist enthalten in:
Ursprung
a625e4567d
Commit
0df416d679
@ -140,17 +140,18 @@
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,6 +270,39 @@
|
@@ -197,6 +270,40 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ public boolean unloadChunk(Chunk chunk, boolean save) {
|
+ public boolean unloadChunk(Chunk chunk, boolean save) {
|
||||||
+ ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk);
|
+ ChunkUnloadEvent event = new ChunkUnloadEvent(chunk.bukkitChunk, save);
|
||||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||||
+ if (event.isCancelled()) {
|
+ if (event.isCancelled()) {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
|
+ save = event.isSaveChunk();
|
||||||
+
|
+
|
||||||
+ // Update neighbor counts
|
+ // Update neighbor counts
|
||||||
+ for (int x = -2; x < 3; x++) {
|
+ for (int x = -2; x < 3; x++) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren