mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 11:45:52 -07:00
@@ -72,7 +72,7 @@ public final class NamespacedKey {
|
|||||||
Preconditions.checkArgument(key != null, "Key cannot be null");
|
Preconditions.checkArgument(key != null, "Key cannot be null");
|
||||||
|
|
||||||
this.namespace = plugin.getName().toLowerCase(Locale.ROOT);
|
this.namespace = plugin.getName().toLowerCase(Locale.ROOT);
|
||||||
this.key = key.toLowerCase().toLowerCase(Locale.ROOT);
|
this.key = key.toLowerCase(Locale.ROOT);
|
||||||
|
|
||||||
// Check validity after normalization
|
// Check validity after normalization
|
||||||
Preconditions.checkArgument(VALID_NAMESPACE.matcher(this.namespace).matches(), "Invalid namespace. Must be [a-z0-9._-]: %s", this.namespace);
|
Preconditions.checkArgument(VALID_NAMESPACE.matcher(this.namespace).matches(), "Invalid namespace. Must be [a-z0-9._-]: %s", this.namespace);
|
||||||
|
Reference in New Issue
Block a user