Skip to content

Commit 7eb2899

Browse files
authored
paper: allow snapshot versions, such as Velocity's (#592)
1 parent 15206e9 commit 7eb2899

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/me/itzg/helpers/paper/InstallPaperCommand.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static class Coordinates {
6161
@Option(names = "--project", defaultValue = "paper")
6262
String project;
6363

64-
private static final Pattern ALLOWED_VERSIONS = Pattern.compile("latest|\\d+\\.\\d+(\\.\\d+)?",
64+
private static final Pattern ALLOWED_VERSIONS = Pattern.compile("latest|\\d+\\.\\d+(\\.\\d+)?(-SNAPSHOT)?",
6565
Pattern.CASE_INSENSITIVE
6666
);
6767

@@ -71,8 +71,7 @@ public void setVersion(String version) {
7171
if (!m.matches()) {
7272
throw new ParameterException(spec.commandLine(), "Invalid value for minecraft version: " + version);
7373
}
74-
this.version = version.toLowerCase();
75-
74+
this.version = version;
7675
}
7776

7877
String version;

0 commit comments

Comments
 (0)