Made update check not show on dev version.

It's bloody annoying.
This commit is contained in:
Ellpeck 2015-12-13 23:01:56 +01:00
parent e80e83af9e
commit e728acfae6
3 changed files with 7 additions and 2 deletions

View file

@ -39,7 +39,7 @@ public class InitEvents{
Util.registerEvent(new NEIScreenEvents()); Util.registerEvent(new NEIScreenEvents());
} }
if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled()){ if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled() && !Util.isDevVersion()){
Util.registerEvent(new UpdateCheckerClientNotificationEvent()); Util.registerEvent(new UpdateCheckerClientNotificationEvent());
} }
} }

View file

@ -12,6 +12,7 @@ package ellpeck.actuallyadditions.update;
import ellpeck.actuallyadditions.config.values.ConfigBoolValues; import ellpeck.actuallyadditions.config.values.ConfigBoolValues;
import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.Util;
public class UpdateChecker{ public class UpdateChecker{
@ -22,7 +23,7 @@ public class UpdateChecker{
public static String updateVersion; public static String updateVersion;
public static void init(){ public static void init(){
if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled()){ if(ConfigBoolValues.DO_UPDATE_CHECK.isEnabled() && !Util.isDevVersion()){
ModUtil.LOGGER.info("Initializing Update Checker..."); ModUtil.LOGGER.info("Initializing Update Checker...");
new ThreadUpdateChecker(); new ThreadUpdateChecker();
} }

View file

@ -40,6 +40,10 @@ public class Util{
FMLCommonHandler.instance().bus().register(o); FMLCommonHandler.instance().bus().register(o);
} }
public static boolean isDevVersion(){
return ModUtil.VERSION.equals("@VERSION@");
}
public static void registerDispenserHandler(Item item, BehaviorDefaultDispenseItem handler){ public static void registerDispenserHandler(Item item, BehaviorDefaultDispenseItem handler){
BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler); BlockDispenser.dispenseBehaviorRegistry.putObject(item, handler);
} }