diff --git a/bukkit-helper/.settings/org.eclipse.jdt.core.prefs b/bukkit-helper/.settings/org.eclipse.jdt.core.prefs index 636d2bf7..34340ad4 100644 --- a/bukkit-helper/.settings/org.eclipse.jdt.core.prefs +++ b/bukkit-helper/.settings/org.eclipse.jdt.core.prefs @@ -1,5 +1,5 @@ # -#Wed Mar 02 23:09:05 CST 2022 +#Tue Mar 29 22:17:34 CDT 2022 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 diff --git a/forge-1.12.2/src/main/java/org/dynmap/forge_1_12_2/DynmapMod.java b/forge-1.12.2/src/main/java/org/dynmap/forge_1_12_2/DynmapMod.java index 1acfa451..1203516c 100644 --- a/forge-1.12.2/src/main/java/org/dynmap/forge_1_12_2/DynmapMod.java +++ b/forge-1.12.2/src/main/java/org/dynmap/forge_1_12_2/DynmapMod.java @@ -21,6 +21,7 @@ import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.event.FMLServerAboutToStartEvent; import net.minecraftforge.fml.common.event.FMLServerStartedEvent; import net.minecraftforge.fml.common.event.FMLServerStartingEvent; import net.minecraftforge.fml.common.event.FMLServerStoppingEvent; @@ -108,7 +109,7 @@ public class DynmapMod private MinecraftServer server; @EventHandler - public void serverStarting(FMLServerStartingEvent event) { + public void serverStarting(FMLServerAboutToStartEvent event) { server = event.getServer(); } diff --git a/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/DynmapMod.java b/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/DynmapMod.java index d68e502d..0edcec54 100644 --- a/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/DynmapMod.java +++ b/forge-1.14.4/src/main/java/org/dynmap/forge_1_14_4/DynmapMod.java @@ -20,6 +20,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; import net.minecraftforge.fml.event.server.FMLServerStartingEvent; import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; +import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent; import net.minecraftforge.fml.event.server.FMLServerStartedEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.network.FMLNetworkConstants; @@ -111,13 +112,17 @@ public class DynmapMod private MinecraftServer server; @SubscribeEvent - public void onServerStarting(FMLServerStartingEvent event) { + public void onServerAboutToStartStarting(FMLServerAboutToStartEvent event) { server = event.getServer(); if(plugin == null) plugin = proxy.startServer(server); + } + + @SubscribeEvent + public void onServerStarting(FMLServerStartingEvent event) { plugin.onStarting(event.getCommandDispatcher()); } - + @SubscribeEvent public void onServerStarted(FMLServerStartedEvent event) { DynmapCommonAPIListener.register(new APICallback()); diff --git a/forge-1.15.2/src/main/java/org/dynmap/forge_1_15_2/DynmapMod.java b/forge-1.15.2/src/main/java/org/dynmap/forge_1_15_2/DynmapMod.java index d25de06c..5077eb4a 100644 --- a/forge-1.15.2/src/main/java/org/dynmap/forge_1_15_2/DynmapMod.java +++ b/forge-1.15.2/src/main/java/org/dynmap/forge_1_15_2/DynmapMod.java @@ -21,6 +21,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; import net.minecraftforge.fml.event.server.FMLServerStartingEvent; import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; +import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent; import net.minecraftforge.fml.event.server.FMLServerStartedEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.network.FMLNetworkConstants; @@ -112,13 +113,17 @@ public class DynmapMod private MinecraftServer server; @SubscribeEvent - public void onServerStarting(FMLServerStartingEvent event) { + public void onServerAboutToStart(FMLServerAboutToStartEvent event) { server = event.getServer(); if(plugin == null) plugin = proxy.startServer(server); + } + + @SubscribeEvent + public void onServerStarting(FMLServerStartingEvent event) { plugin.onStarting(event.getCommandDispatcher()); } - + @SubscribeEvent public void onServerStarted(FMLServerStartedEvent event) { DynmapCommonAPIListener.register(new APICallback()); diff --git a/forge-1.16.5/src/main/java/org/dynmap/forge_1_16_5/DynmapMod.java b/forge-1.16.5/src/main/java/org/dynmap/forge_1_16_5/DynmapMod.java index 6fa7041e..5cb31914 100644 --- a/forge-1.16.5/src/main/java/org/dynmap/forge_1_16_5/DynmapMod.java +++ b/forge-1.16.5/src/main/java/org/dynmap/forge_1_16_5/DynmapMod.java @@ -20,6 +20,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; import net.minecraftforge.fml.event.server.FMLServerStartingEvent; import net.minecraftforge.fml.event.server.FMLServerStoppingEvent; +import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent; import net.minecraftforge.fml.event.server.FMLServerStartedEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.network.FMLNetworkConstants; @@ -111,7 +112,7 @@ public class DynmapMod private MinecraftServer server; @SubscribeEvent - public void onServerStarting(FMLServerStartingEvent event) { + public void onServerStarting(FMLServerAboutToStartEvent event) { server = event.getServer(); if(plugin == null) plugin = proxy.startServer(server); diff --git a/forge-1.17.1/src/main/java/org/dynmap/forge_1_17_1/DynmapMod.java b/forge-1.17.1/src/main/java/org/dynmap/forge_1_17_1/DynmapMod.java index cf4b61ec..83840610 100644 --- a/forge-1.17.1/src/main/java/org/dynmap/forge_1_17_1/DynmapMod.java +++ b/forge-1.17.1/src/main/java/org/dynmap/forge_1_17_1/DynmapMod.java @@ -21,6 +21,7 @@ import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fmllegacy.network.FMLNetworkConstants; +import net.minecraftforge.fmlserverevents.FMLServerAboutToStartEvent; import net.minecraftforge.fmlserverevents.FMLServerStartedEvent; import net.minecraftforge.fmlserverevents.FMLServerStartingEvent; import net.minecraftforge.fmlserverevents.FMLServerStoppingEvent; @@ -113,7 +114,7 @@ public class DynmapMod private MinecraftServer server; @SubscribeEvent - public void onServerStarting(FMLServerStartingEvent event) { + public void onServerStarting(FMLServerAboutToStartEvent event) { server = event.getServer(); if(plugin == null) plugin = proxy.startServer(server); diff --git a/forge-1.18.2/src/main/java/org/dynmap/forge_1_18_2/DynmapMod.java b/forge-1.18.2/src/main/java/org/dynmap/forge_1_18_2/DynmapMod.java index 0499cc6c..2d0be831 100644 --- a/forge-1.18.2/src/main/java/org/dynmap/forge_1_18_2/DynmapMod.java +++ b/forge-1.18.2/src/main/java/org/dynmap/forge_1_18_2/DynmapMod.java @@ -11,6 +11,7 @@ import org.dynmap.forge_1_18_2.DynmapPlugin.OurLog; import net.minecraft.server.MinecraftServer; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.server.ServerAboutToStartEvent; import net.minecraftforge.event.server.ServerStartedEvent; import net.minecraftforge.event.server.ServerStartingEvent; import net.minecraftforge.event.server.ServerStoppingEvent; @@ -113,7 +114,7 @@ public class DynmapMod private MinecraftServer server; @SubscribeEvent - public void onServerStarting(ServerStartingEvent event) { + public void onServerStarting(ServerAboutToStartEvent event) { server = event.getServer(); if(plugin == null) plugin = proxy.startServer(server); diff --git a/forge-1.18/src/main/java/org/dynmap/forge_1_18/DynmapMod.java b/forge-1.18/src/main/java/org/dynmap/forge_1_18/DynmapMod.java index 37a1e02a..c54a6f89 100644 --- a/forge-1.18/src/main/java/org/dynmap/forge_1_18/DynmapMod.java +++ b/forge-1.18/src/main/java/org/dynmap/forge_1_18/DynmapMod.java @@ -11,6 +11,7 @@ import org.dynmap.forge_1_18.DynmapPlugin.OurLog; import net.minecraft.server.MinecraftServer; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.server.ServerAboutToStartEvent; import net.minecraftforge.event.server.ServerStartedEvent; import net.minecraftforge.event.server.ServerStartingEvent; import net.minecraftforge.event.server.ServerStoppingEvent; @@ -113,7 +114,7 @@ public class DynmapMod private MinecraftServer server; @SubscribeEvent - public void onServerStarting(ServerStartingEvent event) { + public void onServerStarting(ServerAboutToStartEvent event) { server = event.getServer(); if(plugin == null) plugin = proxy.startServer(server);