Updated public home regex to fix an internal error, closes #4

This commit is contained in:
William278 committed 2020-12-20 14:28:44 +00:00
1 parent 3df6f9653a
commit 034ea71455
1 file changed
+1 -1
@@ -18,7 +18,7 @@ public class publicHomeCommand implements CommandExecutor {
Player p = (Player) sender;
if (args.length == 1) {
String publicHome = args[0];
if (publicHome.matches("^(?!.*\\..*\\..*)[A-Za-z0-9_\\-]([A-Za-z0-9_\\-.]*[A-Za-z0-9_\\-])?$")) {
if (publicHome.matches("[A-Za-z0-9_\\-]+\\.[A-Za-z0-9_\\-]+")) {
String ownerName = publicHome.split("\\.")[0];
String homeName = publicHome.split("\\.")[1];
if (dataManager.homeExists(ownerName, homeName)) {