mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-03 14:38:53 +00:00
Add ability to resolve unsafe positions by UUID where the identifier would otherwise be unsafe (#356)
This commit is contained in:
1 parent
4bd0244891
commit
3c18214016
26 files changed
+188
-60
No files matched your search
@@ -20,6 +20,7 @@
|
||||
package net.william278.huskhomes.util;
|
||||
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.position.Home;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
|
||||
@@ -43,7 +44,7 @@ public class Validator {
|
||||
*/
|
||||
public boolean isValidName(@NotNull String name) {
|
||||
return (isAsciiOnly(name) || plugin.getSettings().doAllowUnicodeNames())
|
||||
&& !containsWhitespace(name) && !name.contains(".")
|
||||
&& !containsWhitespace(name) && !name.contains(Home.IDENTIFIER_DELIMITER)
|
||||
&& name.length() <= MAX_NAME_LENGTH && name.length() >= MIN_NAME_LENGTH;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user