mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Simplify CommandBase's onCommand
Added some TODOs to do Replaced "dynamic" regex with cached Patterns
This commit is contained in:
30 files changed
+122
-106
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package me.william278.huskhomes2.utils;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public final class RegexUtil {
|
||||
|
||||
public static final Pattern DESCRIPTION_PATTERN = Pattern.compile("[a-zA-Z0-9\\d\\-_\\s]+");
|
||||
public static final Pattern NAME_PATTERN = Pattern.compile("[A-Za-z0-9_\\-]+");
|
||||
public static final Pattern OWNER_NAME_PATTERN = Pattern.compile("[A-Za-z0-9_]\\.[A-Za-z0-9_\\-]");
|
||||
|
||||
private RegexUtil() {
|
||||
// No object for you
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user