Skip to content

Commit

Permalink
Fix incorrect version number in mcstats
Browse files Browse the repository at this point in the history
  • Loading branch information
LunNova committed Jan 14, 2016
1 parent 36ecb61 commit 9638262
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import java.util.*;

@SuppressWarnings("WeakerAccess")
@Mod(modid = "TickProfiler", name = "TickProfiler", version = "1.7.10", acceptableRemoteVersions = "*")
@Mod(modid = "TickProfiler", name = "TickProfiler", acceptableRemoteVersions = "*")
public class TickProfiler {
@Mod.Instance("TickProfiler")
public static TickProfiler instance;
Expand Down
22 changes: 2 additions & 20 deletions src/main/java/nallar/tickprofiler/util/VersionUtil.java
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
package nallar.tickprofiler.util;

import net.minecraft.server.MinecraftServer;
import cpw.mods.fml.common.Loader;

// 'constants' aren't constant, the build script replaces them with versioning information
@SuppressWarnings("MethodReturnAlwaysConstant")
public enum VersionUtil {
;

public static String detailedVersion() {
String version = "";
try {
MinecraftServer minecraftServer = MinecraftServer.getServer();
if (minecraftServer != null) {
version = " on " + minecraftServer.getMinecraftVersion() + ' ' + minecraftServer.getServerModName();
}
} catch (NoClassDefFoundError ignored) {
}
return version() + version;
}

public static String version() {
return "@MOD_NAME@ v@MOD_VERSION@ for MC@MC_VERSION@";
}

public static String versionNumber() {
return "@MOD_VERSION@";
return Loader.instance().getIndexedModList().get("TickProfiler").getVersion();
}
}

0 comments on commit 9638262

Please sign in to comment.