Fix version without patch not being detected on spigot/paper correctly

This commit is contained in:
Blue (Lukas Rieger) 2021-06-25 00:37:12 +02:00
parent 0818f945c8
commit 7d44a433d3
No known key found for this signature in database
GPG Key ID: 904C4995F9E1F800
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ public class BukkitPlugin extends JavaPlugin implements ServerInterface, Listene
//try to get best matching minecraft-version
try {
String versionString = getServer().getBukkitVersion();
Matcher versionMatcher = Pattern.compile("(\\d+\\.\\d+\\.\\d+)[-_].*").matcher(versionString);
Matcher versionMatcher = Pattern.compile("(\\d+(?:\\.\\d+){1,2})[-_].*").matcher(versionString);
if (!versionMatcher.matches()) throw new IllegalArgumentException();
version = MinecraftVersion.of(versionMatcher.group(1));
} catch (IllegalArgumentException e) {