diff --git a/README.md b/README.md index 43b76f8..bf805fc 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,12 @@ All currently supported presets, and available filters for each preset: ## Configuration options +### Plugin Options + +| Key | Value type | Description | +| --- | --- | --- | +| language | string | The language used for this plugin. Only "en" is supported, unless you add a custom language. | + ### Global-only options | Key | Value type | Description | diff --git a/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java b/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java index 5ed38f3..bb0a46b 100644 --- a/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java +++ b/src/main/java/net/knarcraft/blacksmith/BlacksmithPlugin.java @@ -51,6 +51,8 @@ public class BlacksmithPlugin extends JavaPlugin { */ public void reload() { config.load(); + this.reloadConfig(); + Translator.loadLanguages(this.getConfig().getString("language", "en")); } @Override @@ -73,7 +75,7 @@ public class BlacksmithPlugin extends JavaPlugin { config = new GlobalSettings(this); config.load(); - Translator.loadLanguages("en"); + Translator.loadLanguages(fileConfiguration.getString("language", "en")); //Set up Vault integration if (!setUpVault()) { diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 9a6ff38..5449a15 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -1,5 +1,8 @@ # Blacksmith Configuration +# The language used for messages. Only "en" is supported +language: en + # The settings which apply to all Blacksmith NPCs. These can also be changed using the /blacksmithconfig command global: # The minimum price of each cost