Skip to content

Commit

Permalink
Merge pull request #26 from GTNewHorizons/remove-offline-kick
Browse files Browse the repository at this point in the history
Remove offline kick if hodgepodge is loaded
  • Loading branch information
Dream-Master authored Jul 8, 2023
2 parents 1b9af6b + bc1b10e commit 357e902
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/de/katzenpapst/amunra/AmunRa.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
dependencies = "required-after:GalacticraftCore@[3.0.61-GTNH,);" + "required-after:GalacticraftMars;"
+ "after:dreamcraft;"
+ "after:IronChest;"
+ "after:AdvancedSolarPanel",
+ "after:AdvancedSolarPanel;"
+ "after:Hodgepodge@[2.2.19,);",
name = AmunRa.MODNAME)
public class AmunRa {

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/de/katzenpapst/amunra/proxy/ServerProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.minecraft.server.MinecraftServer;

import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import de.katzenpapst.amunra.AmunRa;

Expand All @@ -12,7 +13,9 @@ public class ServerProxy extends ARSidedProxy {
public void init(final FMLInitializationEvent event) {
try {
final MinecraftServer s = MinecraftServer.getServer();
if (s.isDedicatedServer() && !s.isServerInOnlineMode() && !AmunRa.isDevEnvironment()) {
if (!Loader.isModLoaded("hodgepodge") && s.isDedicatedServer()
&& !s.isServerInOnlineMode()
&& !AmunRa.isDevEnvironment()) {
AmunRa.LOGGER.fatal("Server is running in offline mode. This is not supported.");
FMLCommonHandler.instance().exitJava(-10, false);
}
Expand Down

0 comments on commit 357e902

Please sign in to comment.