Added first commands

This commit is contained in:
BuildTools committed 2020-12-11 16:19:37 +00:00
1 parent 879293237f
commit 44eef2ff30
12 files changed
+311

No files matched your search

@@ -19,6 +19,14 @@ public class SetHomeConditions {
conditionsNotMetReason = "error_set_home_name_taken";
return;
}
if (homeName.length() > 16) {
conditionsNotMetReason = "error_set_home_invalid_length";
return;
}
if (!homeName.matches("[A-Za-z0-9_\\-]+")) {
conditionsNotMetReason = "error_set_home_invalid_characters";
return;
}
conditionsMet = true;
}
@@ -13,6 +13,14 @@ public class SetWarpConditions {
conditionsNotMetReason = "error_set_warp_name_taken";
return;
}
if (warpName.length() > 16) {
conditionsNotMetReason = "error_set_warp_invalid_length";
return;
}
if (!warpName.matches("[A-Za-z0-9_\\-]+")) {
conditionsNotMetReason = "error_set_warp_invalid_characters";
return;
}
conditionsMet = true;
}
@@ -19,6 +19,7 @@ public class Settings {
int teleportWarmupTime;
boolean doBungee;
boolean doSpawnCommand;
private void setSettings(FileConfiguration configFile) {
this.language = configFile.getString("language");
@@ -27,6 +28,8 @@ public class Settings {
this.storageType = configFile.getString("data_storage_option.storage_type");
this.doSpawnCommand = configFile.getBoolean("spawn_command.enabled");
this.playerTable = configFile.getString("data_storage_options.table_names.player_data");
this.locationsTable = configFile.getString("data_storage_options.table_names.location_data");
this.homesTable = configFile.getString("data_storage_options.table_names.home_data");