Skip to content

Commit

Permalink
Fix other memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Dec 6, 2023
1 parent 374d746 commit 8ec95d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions patches/server/0111-Replay-Mod-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ index 1bc21038e33faa9c1f24acedabeb84741e31de05..dc7b69f429cc9b19080fa05c6135175d
this.server.getCustomBossEvents().onPlayerDisconnect(entityplayer);
UUID uuid = entityplayer.getUUID();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index be41bc7bad37ccfb9d9b7a268a4a702db8c66f4f..f956ce593fe468a4cd4a6f7dfd221276178f3b58 100644
index b76d078606b9c8486c1cbff240fd45e69eb9e58d..73e77895559ad935e03f27cee32d433c13d47b73 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -265,6 +265,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
Expand Down Expand Up @@ -375,7 +375,7 @@ index be41bc7bad37ccfb9d9b7a268a4a702db8c66f4f..f956ce593fe468a4cd4a6f7dfd221276
+ // Leaves end - replay mod api
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index f1343e71eaf0592b4efa5ba5d60cb5e9973f71e1..98789c4649e4b81cfdd5d80f2fcb707806fde057 100644
index 22e22234473c601bf674f42efa81a6920c0fb344..796423c97b06b29d1e5afa16792338f86738fc81 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -198,6 +198,8 @@ import top.leavesmc.leaves.bot.ServerBot;
Expand Down Expand Up @@ -642,7 +642,7 @@ index 0000000000000000000000000000000000000000..46a86cfce4aa859b8de7c126c22f64a9
+}
diff --git a/src/main/java/top/leavesmc/leaves/replay/Recorder.java b/src/main/java/top/leavesmc/leaves/replay/Recorder.java
new file mode 100644
index 0000000000000000000000000000000000000000..a091dee8ff3edadf7447922d057c5804e9b25e1c
index 0000000000000000000000000000000000000000..925ee5005e74f4e61f7d76ad06e5eb80bdf3e92e
--- /dev/null
+++ b/src/main/java/top/leavesmc/leaves/replay/Recorder.java
@@ -0,0 +1,226 @@
Expand Down Expand Up @@ -766,7 +766,7 @@ index 0000000000000000000000000000000000000000..a091dee8ff3edadf7447922d057c5804
+ }
+
+ @Override
+ public void send(@NotNull Packet<?> packet, @Nullable PacketSendListener callbacks) {
+ public void send(@NotNull Packet<?> packet, @Nullable PacketSendListener callbacks, boolean flush) {
+ if (!stopped) {
+ if (packet instanceof ClientboundBundlePacket packet1) {
+ packet1.subPackets().forEach(subPacket -> {
Expand Down

0 comments on commit 8ec95d9

Please sign in to comment.