Skip to content

Commit

Permalink
Update replay api
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Sep 17, 2023
1 parent 2baf839 commit 3639506
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions patches/api/0009-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ index 0b58392263898b4ef7eba8a082cddf74d3c7cd82..9de03cb5217bd9ac73484e1121768bce
}
diff --git a/src/main/java/top/leavesmc/leaves/entity/Photographer.java b/src/main/java/top/leavesmc/leaves/entity/Photographer.java
new file mode 100644
index 0000000000000000000000000000000000000000..fbc57438293210fa4ee30327e01261db447c9de2
index 0000000000000000000000000000000000000000..985f8ff42a326d10edb582e5e24947f301fceb0c
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/entity/Photographer.java
@@ -0,0 +1,23 @@
@@ -0,0 +1,25 @@
+package top.leavesmc.leaves.entity;
+
+import org.bukkit.entity.Player;
Expand All @@ -71,6 +71,8 @@ index 0000000000000000000000000000000000000000..fbc57438293210fa4ee30327e01261db
+
+ public void stopRecording();
+
+ public void stopRecording(boolean async);
+
+ public void pauseRecording();
+
+ public void resumeRecording();
Expand Down
11 changes: 8 additions & 3 deletions patches/server/0113-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ index 8388c2a56cbe531cf5f60a18866c85fad1e23c54..bdd36d58c55a66a9538540fa5c88a294
// Leaves end - add CraftBot
diff --git a/src/main/java/top/leavesmc/leaves/entity/CraftPhotographer.java b/src/main/java/top/leavesmc/leaves/entity/CraftPhotographer.java
new file mode 100644
index 0000000000000000000000000000000000000000..7471ad4912009db4bdac74aa1326af2169b20ba6
index 0000000000000000000000000000000000000000..65fd6fd9e6af4e43268f1f1507a37e1bd95d41b8
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/entity/CraftPhotographer.java
@@ -0,0 +1,63 @@
@@ -0,0 +1,68 @@
+package top.leavesmc.leaves.entity;
+
+import net.minecraft.server.level.ServerPlayer;
Expand All @@ -406,7 +406,12 @@ index 0000000000000000000000000000000000000000..7471ad4912009db4bdac74aa1326af21
+
+ @Override
+ public void stopRecording() {
+ this.getHandle().remove(true);
+ this.stopRecording(true);
+ }
+
+ @Override
+ public void stopRecording(boolean async) {
+ this.getHandle().remove(async);
+ }
+
+ @Override
Expand Down

0 comments on commit 3639506

Please sign in to comment.