Fixed OC/CC version reporting
This commit is contained in:
parent
ea2d5df4db
commit
3aedd45881
1 changed files with 9 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue