From a89e8d3cc42702e80e2f973e79aab6090e74a72e Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Wed, 24 May 2023 12:27:38 -0400 Subject: Make sure the server plugin unregisters itself when disabled --- .../me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spark-forge1710/src/main/java/me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java b/spark-forge1710/src/main/java/me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java index 059b684..03f55d7 100644 --- a/spark-forge1710/src/main/java/me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java +++ b/spark-forge1710/src/main/java/me/lucko/spark/forge/plugin/Forge1710ServerSparkPlugin.java @@ -57,6 +57,12 @@ public class Forge1710ServerSparkPlugin extends Forge1710SparkPlugin { return plugin; } + @Override + public void disable() { + super.disable(); + FMLCommonHandler.instance().bus().unregister(this); + } + @SubscribeEvent public void onServerTickEnd(TickEvent.ServerTickEvent event) { if(event.phase == TickEvent.Phase.START) { -- cgit