3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 16:12:46 +01:00

Don't allow empty extension name

Dieser Commit ist enthalten in:
Konicai 2022-08-03 00:30:22 -04:00 committet von GitHub
Ursprung aa7d0f4a57
Commit 36ef23b24e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -48,7 +48,7 @@ public record GeyserExtensionDescription(@NonNull String name,
@NonNull List<String> authors) implements ExtensionDescription { @NonNull List<String> authors) implements ExtensionDescription {
private static final Yaml YAML = new Yaml(new CustomClassLoaderConstructor(Source.class.getClassLoader())); 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+$"); public static final Pattern API_VERSION_PATTERN = Pattern.compile("^\\d+\\.\\d+\\.\\d+$");
@NonNull @NonNull