Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ public enum MinecraftVersion {
*/
public static final MinecraftVersion CURRENT;
private static final boolean PAPER;
private static final String[] PAPER_VERSION_SUFFIXES = {
".build", // for incremental builds of paper
".local" // for locally built jars
};

static {

Expand Down Expand Up @@ -434,9 +438,10 @@ private static String findMinorVersion() {
}

private static String matchVersion(String version) {

if (version.endsWith(".build")) { // Paper experimental versions
version = version.substring(0, version.length() - ".build".length());
for (final String paperVersionSuffix : PAPER_VERSION_SUFFIXES) {
if (version.endsWith(paperVersionSuffix)) {
version = version.substring(0, version.length() - paperVersionSuffix.length());
}
}

switch (version) {
Expand Down