Updates some KnarLib code
Some checks failed
EpicKnarvik97/Blacksmith/pipeline/head There was a failure building this commit
Some checks failed
EpicKnarvik97/Blacksmith/pipeline/head There was a failure building this commit
This commit is contained in:
@ -19,7 +19,6 @@ import net.knarcraft.blacksmith.listener.PlayerListener;
|
||||
import net.knarcraft.blacksmith.manager.EconomyManager;
|
||||
import net.knarcraft.blacksmith.trait.BlacksmithTrait;
|
||||
import net.knarcraft.knarlib.formatting.StringFormatter;
|
||||
import net.knarcraft.knarlib.formatting.TranslatableMessage;
|
||||
import net.knarcraft.knarlib.formatting.TranslatableTimeUnit;
|
||||
import net.knarcraft.knarlib.formatting.Translator;
|
||||
import net.knarcraft.knarlib.property.ColorConversion;
|
||||
@ -79,16 +78,6 @@ public class BlacksmithPlugin extends JavaPlugin {
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the translation of the given translatable message
|
||||
*
|
||||
* @param translatableMessage <p>The message to translate</p>
|
||||
* @return <p>The message, in the language specified in the configuration</p>
|
||||
*/
|
||||
public static @NotNull String translate(TranslatableMessage translatableMessage) {
|
||||
return BlacksmithPlugin.getTranslator().getTranslatedMessage(translatableMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets settings for the blacksmith plugin's blacksmiths
|
||||
*
|
||||
@ -118,15 +107,6 @@ public class BlacksmithPlugin extends JavaPlugin {
|
||||
this.getConfig().getString("language", "en"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the translator to use for translation
|
||||
*
|
||||
* @return <p>The translator to use</p>
|
||||
*/
|
||||
public static @NotNull Translator getTranslator() {
|
||||
return BlacksmithPlugin.translator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string formatter to use for formatting
|
||||
*
|
||||
@ -136,6 +116,15 @@ public class BlacksmithPlugin extends JavaPlugin {
|
||||
return BlacksmithPlugin.stringFormatter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the translator to use for translation
|
||||
*
|
||||
* @return <p>The translator to use</p>
|
||||
*/
|
||||
public static @NotNull Translator getTranslator() {
|
||||
return BlacksmithPlugin.translator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable() {
|
||||
getLogger().log(Level.INFO, " v" + getDescription().getVersion() + " disabled.");
|
||||
|
Reference in New Issue
Block a user