Fixed OC/CC version reporting

This commit is contained in:
LemADEC 2016-02-08 03:01:37 +01:00
parent ea2d5df4db
commit 3aedd45881

View file

@ -200,7 +200,15 @@ public abstract class TileEntityAbstractInterfaced extends TileEntityAbstractBas
// Return version
public Object[] version(Object[] arguments) {
String[] strings = WarpDrive.VERSION.split("-")[0].split("\\.");
WarpDrive.logger.info("Version is " + WarpDrive.VERSION + " isDev " + WarpDrive.isDev);
String[] strings = WarpDrive.VERSION.split("-");
WarpDrive.logger.info("strings size is " + strings.length);
if (WarpDrive.isDev) {
strings = strings[strings.length - 2].split("\\.");
} else {
strings = strings[strings.length - 1].split("\\.");
}
WarpDrive.logger.info("strings size is now " + strings.length);
ArrayList<Integer> integers = new ArrayList(strings.length);
for (String string : strings) {
integers.add(Integer.parseInt(string));