mSpigot-Parent/patches/api/0010-Chunk-snapshot-API.patch

34 lines
1.1 KiB
Diff
Raw Normal View History

2023-07-21 05:34:25 +02:00
From e96e8b8df1f574feccdf9007d513bfc03a054028 Mon Sep 17 00:00:00 2001
From: virtualWinter <winter@catmc.club>
Date: Fri, 21 Jul 2023 06:07:20 +0300
Subject: [PATCH] Chunk snapshot API
diff --git a/src/main/java/net/frozenorb/chunksnapshot/ChunkSnapshot.java b/src/main/java/net/frozenorb/chunksnapshot/ChunkSnapshot.java
new file mode 100644
index 00000000..fd051bdc
--- /dev/null
+++ b/src/main/java/net/frozenorb/chunksnapshot/ChunkSnapshot.java
@@ -0,0 +1,4 @@
+package net.frozenorb.chunksnapshot;
+
+public interface ChunkSnapshot {
+}
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
index 05101517..109f32f9 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -121,4 +121,9 @@ public interface Chunk {
* @return true if the chunk has unloaded successfully, otherwise false
*/
boolean unload();
+
+ // MineHQ start - chunk snapshot api
+ net.frozenorb.chunksnapshot.ChunkSnapshot takeSnapshot();
+ void restoreSnapshot(net.frozenorb.chunksnapshot.ChunkSnapshot snapshot);
+ // MineHQ end
}
--
2.41.0.windows.1