diff --git a/Core/src/main/java/com/intellectualcrafters/plot/PlotVersion.java b/Core/src/main/java/com/intellectualcrafters/plot/PlotVersion.java index 24932ee88..d0c6e82fc 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/PlotVersion.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/PlotVersion.java @@ -13,16 +13,25 @@ public class PlotVersion { this.year = Integer.parseInt(date[0]); this.month = Integer.parseInt(date[1]); this.day = Integer.parseInt(date[2]); - this.hash = Integer.parseInt(split[1], 16); - this.build = Integer.parseInt(split[2]); + if(split[1].equals("SNAPSHOT")) { // fallback when compiling with Maven + this.hash = 0; + this.build = 0; + } else { + this.hash = Integer.parseInt(split[1], 16); + this.build = Integer.parseInt(split[2]); + } } @Override public String toString() { - return "PlotSquared-" + year + "." + month + "." + day + "-" + Integer.toHexString(hash) + "-" + build; + if(hash == 0 && build == 0) { + return "PlotSquared-" + year + "." + month + "." + day + "-SNAPSHOT"; + } else { + return "PlotSquared-" + year + "." + month + "." + day + "-" + Integer.toHexString(hash) + "-" + build; + } } public boolean isNewer(PlotVersion other) { return other.build < this.build; } -} \ No newline at end of file +}