mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 22:17:17 +00:00
Added first commands
This commit is contained in:
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");
|
||||
|
||||
Reference in new issue
Block a user