-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
crash if 'Vivecraft Forge Extension' is loaded on a server
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
forge/src/main/java/org/vivecraft/forge/event/ServerEvents.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.vivecraft.forge.event; | ||
|
||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.event.server.ServerAboutToStartEvent; | ||
import net.minecraftforge.eventbus.api.SubscribeEvent; | ||
import net.minecraftforge.fml.common.Mod; | ||
import org.vivecraft.client.Xplat; | ||
|
||
@Mod.EventBusSubscriber(value = Dist.DEDICATED_SERVER, bus = Mod.EventBusSubscriber.Bus.FORGE) | ||
public class ServerEvents { | ||
@SubscribeEvent | ||
public static void crashWithForgeExtension(ServerAboutToStartEvent event) { | ||
if (Xplat.isModLoaded("vivecraftforgeextensions")) { | ||
throw new RuntimeException("The vivecraft mod cannot be used together with the 'Vivecraft Forge Extension'.\nThe Vivecraft Mod implements all features the forge extension has.\nRemove the 'Vivecraft Forge Extension' to resolve this error"); | ||
} | ||
} | ||
} |