Improves console logging
All checks were successful
EpicKnarvik97/Blacksmith/pipeline/head This commit looks good

This commit is contained in:
2024-07-29 18:32:08 +02:00
parent f3372a13a5
commit 0993fbe15f
15 changed files with 81 additions and 74 deletions

View File

@@ -20,7 +20,6 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Arrays;
import java.util.logging.Level;
import static net.knarcraft.blacksmith.formatting.BlacksmithTranslatableMessage.getCurrentValueMessage;
import static net.knarcraft.blacksmith.formatting.BlacksmithTranslatableMessage.getDefaultValueMessage;
@@ -127,8 +126,7 @@ public abstract class EditCommand<K extends CustomTrait<L>, L extends Setting> i
//Change the setting
Settings<L> settings = trait.getTraitSettings();
if (settings == null) {
BlacksmithPlugin.getInstance().getLogger().log(Level.SEVERE, "Settings for a CustomTrait has not " +
"been initialized! Please inform the developer!");
BlacksmithPlugin.error("Settings for a CustomTrait has not been initialized! Please inform the developer!");
return false;
}
settings.changeValue(setting, newValue);
@@ -154,8 +152,7 @@ public abstract class EditCommand<K extends CustomTrait<L>, L extends Setting> i
@NotNull CommandSender sender) {
Settings<L> settings = trait.getTraitSettings();
if (settings == null) {
BlacksmithPlugin.getInstance().getLogger().log(Level.SEVERE, "Settings for a CustomTrait has not " +
"been initialized! Please inform the developer!");
BlacksmithPlugin.error("Settings for a CustomTrait has not been initialized! Please inform the developer!");
return;
}