-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
270 additions
and
95 deletions.
There are no files selected for viewing
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
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
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
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
17 changes: 17 additions & 0 deletions
17
common/src/main/java/net/teamfruit/serverobserver/IProxyL.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 net.teamfruit.serverobserver; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
import cpw.mods.fml.common.event.FMLInitializationEvent; | ||
import cpw.mods.fml.common.event.FMLPostInitializationEvent; | ||
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | ||
|
||
public interface IProxyL { | ||
|
||
void preInit(@Nonnull FMLPreInitializationEvent event); | ||
|
||
void init(@Nonnull FMLInitializationEvent event); | ||
|
||
void postInit(@Nonnull FMLPostInitializationEvent event); | ||
|
||
} |
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
52 changes: 52 additions & 0 deletions
52
common/src/main/java/net/teamfruit/serverobserver/ServerObserverL.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,52 @@ | ||
package net.teamfruit.serverobserver; | ||
|
||
import java.util.Map; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
import cpw.mods.fml.common.Mod; | ||
import cpw.mods.fml.common.Mod.EventHandler; | ||
import cpw.mods.fml.common.Mod.Instance; | ||
import cpw.mods.fml.common.SidedProxy; | ||
import cpw.mods.fml.common.event.FMLInitializationEvent; | ||
import cpw.mods.fml.common.event.FMLPostInitializationEvent; | ||
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | ||
import cpw.mods.fml.common.network.NetworkCheckHandler; | ||
import cpw.mods.fml.relauncher.Side; | ||
|
||
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION, guiFactory = Reference.GUI_FACTORY) | ||
public class ServerObserverL { | ||
@Instance(Reference.MODID) | ||
public static @Nullable ServerObserverL instance; | ||
|
||
static { | ||
UniversalVersioner.loadVersion(); | ||
} | ||
|
||
@SidedProxy(serverSide = Reference.PROXY_SERVER, clientSide = Reference.PROXY_CLIENT) | ||
public static @Nullable IProxyL proxy; | ||
|
||
@NetworkCheckHandler | ||
public boolean checkModList(final @Nonnull Map<String, String> versions, final @Nonnull Side side) { | ||
return true; | ||
} | ||
|
||
@EventHandler | ||
public void preInit(final @Nonnull FMLPreInitializationEvent event) { | ||
if (proxy!=null) | ||
proxy.preInit(event); | ||
} | ||
|
||
@EventHandler | ||
public void init(final @Nonnull FMLInitializationEvent event) { | ||
if (proxy!=null) | ||
proxy.init(event); | ||
} | ||
|
||
@EventHandler | ||
public void postInit(final @Nonnull FMLPostInitializationEvent event) { | ||
if (proxy!=null) | ||
proxy.postInit(event); | ||
} | ||
} |
Oops, something went wrong.