Don't allow empty extension name

This commit is contained in:
Konicai 2022-08-03 00:30:22 -04:00 committed by GitHub
parent aa7d0f4a57
commit 36ef23b24e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,7 @@ public record GeyserExtensionDescription(@NonNull String name,
@NonNull List<String> authors) implements ExtensionDescription {
private static final Yaml YAML = new Yaml(new CustomClassLoaderConstructor(Source.class.getClassLoader()));
public static final Pattern NAME_PATTERN = Pattern.compile("^[A-Za-z_.-]*$");
public static final Pattern NAME_PATTERN = Pattern.compile("^[A-Za-z_.-]+$");
public static final Pattern API_VERSION_PATTERN = Pattern.compile("^\\d+\\.\\d+\\.\\d+$");
@NonNull