Add ability to resolve unsafe positions by UUID where the identifier would otherwise be unsafe (#356)

This commit is contained in:
William authored and GitHub committed 2023-04-16 16:48:08 +01:00
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;
}