25 lines
1.6 KiB
Diff
25 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Cryptite <cryptite@gmail.com>
|
|
Date: Sun, 22 Oct 2023 08:41:08 -0500
|
|
Subject: [PATCH] ChunkStatusChangeEvent
|
|
|
|
|
|
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
|
index b66a7d4aab887309579154815a0d4abf9de506b0..050a667d79df28570f95fe616696d0915257cc89 100644
|
|
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
|
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/NewChunkHolder.java
|
|
@@ -1324,6 +1324,13 @@ public final class NewChunkHolder {
|
|
// chunks cannot downgrade state while status is pending a change
|
|
final LevelChunk chunk = (LevelChunk)this.currentChunk;
|
|
|
|
+ // Slice start
|
|
+ new com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent(new org.bukkit.craftbukkit.CraftChunk(chunk),
|
|
+ com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent.ChunkStatus.valueOf(currState.name()),
|
|
+ com.destroystokyo.paper.event.chunk.ChunkStatusChangeEvent.ChunkStatus.valueOf(nextState.name()))
|
|
+ .callEvent();
|
|
+ // Slice end
|
|
+
|
|
// Note: we assume that only load/unload contain plugin logic
|
|
// plugin logic is anything stupid enough to possibly change the chunk status while it is already
|
|
// being changed (i.e during load it is possible it will try to set to full ticking)
|