mirror of
https://github.com/itHotL/PlayerStats.git
synced 2025-01-23 21:51:19 +01:00
Finished toggle for TranslatableComponents (#57), rewrote non-translated stat/block/item/entity names and added more debug logging
This commit is contained in:
parent
3e968232c6
commit
d225b1e235
@ -30,7 +30,7 @@ public class ConfigHandler {
|
|||||||
|
|
||||||
/** Returns the desired debugging level.
|
/** Returns the desired debugging level.
|
||||||
<p>1 = low (only show unexpected errors)</p>
|
<p>1 = low (only show unexpected errors)</p>
|
||||||
<p>2 = medium (show all encountered exceptions, log main tasks and show time taken)</p>
|
<p>2 = medium (detail all encountered exceptions, log main tasks and show time taken)</p>
|
||||||
<p>3 = high (log all tasks and time taken)</p>
|
<p>3 = high (log all tasks and time taken)</p>
|
||||||
<p>Default: 1</p>*/
|
<p>Default: 1</p>*/
|
||||||
public int debugLevel() {
|
public int debugLevel() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.gmail.artemis.the.gr8.playerstats.msg;
|
package com.gmail.artemis.the.gr8.playerstats.msg;
|
||||||
|
|
||||||
import com.gmail.artemis.the.gr8.playerstats.utils.EnumHandler;
|
import com.gmail.artemis.the.gr8.playerstats.utils.EnumHandler;
|
||||||
import org.bukkit.Bukkit;
|
import com.gmail.artemis.the.gr8.playerstats.utils.MyLogger;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Statistic;
|
import org.bukkit.Statistic;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -30,7 +30,7 @@ public class LanguageKeyHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException e) {
|
catch (IllegalArgumentException e) {
|
||||||
Bukkit.getLogger().info("PlayerStats, LanguageKeyHandler 33: " + e);
|
MyLogger.logException(e, "LanguageKeyHandler, getStatKey", 34);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -44,7 +44,7 @@ public class LanguageKeyHandler {
|
|||||||
return "entity.minecraft." + EnumHandler.getEntityEnum(entityName).getKey().getKey();
|
return "entity.minecraft." + EnumHandler.getEntityEnum(entityName).getKey().getKey();
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException e) {
|
catch (IllegalArgumentException e) {
|
||||||
Bukkit.getLogger().info("PlayerStats, LanguageKeyHandler 47: " + e);
|
MyLogger.logException(e, "LanguageKeyHandler, getEntityKey", 48);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ public class LanguageKeyHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException e) {
|
catch (IllegalArgumentException e) {
|
||||||
Bukkit.getLogger().info("PlayerStats, LanguageKeyHandler 64: " + e);
|
MyLogger.logException(e, "LanguageKeyHandler, getItemKey", 65);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ public class LanguageKeyHandler {
|
|||||||
return "block.minecraft." + EnumHandler.getBlockEnum(name).getKey().getKey();
|
return "block.minecraft." + EnumHandler.getBlockEnum(name).getKey().getKey();
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException e) {
|
catch (IllegalArgumentException e) {
|
||||||
Bukkit.getLogger().info("PlayerStats, LanguageKeyHandler 78: " + e);
|
MyLogger.logException(e, "LanguageKeyHandler, getBlockKey", 79);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ package com.gmail.artemis.the.gr8.playerstats.msg;
|
|||||||
import com.gmail.artemis.the.gr8.playerstats.enums.Query;
|
import com.gmail.artemis.the.gr8.playerstats.enums.Query;
|
||||||
import com.gmail.artemis.the.gr8.playerstats.config.ConfigHandler;
|
import com.gmail.artemis.the.gr8.playerstats.config.ConfigHandler;
|
||||||
import com.gmail.artemis.the.gr8.playerstats.utils.EnumHandler;
|
import com.gmail.artemis.the.gr8.playerstats.utils.EnumHandler;
|
||||||
|
import com.gmail.artemis.the.gr8.playerstats.utils.MyLogger;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.TextComponent;
|
import net.kyori.adventure.text.TextComponent;
|
||||||
import net.kyori.adventure.text.TranslatableComponent;
|
import net.kyori.adventure.text.TranslatableComponent;
|
||||||
@ -254,70 +255,59 @@ public class MessageFactory {
|
|||||||
protected TranslatableComponent statNameComponent(Query selection, @NotNull String statName, String subStatName) {
|
protected TranslatableComponent statNameComponent(Query selection, @NotNull String statName, String subStatName) {
|
||||||
TextColor statNameColor = getColorFromString(config.getStatNameFormatting(selection, false));
|
TextColor statNameColor = getColorFromString(config.getStatNameFormatting(selection, false));
|
||||||
TextDecoration statNameStyle = getStyleFromString(config.getStatNameFormatting(selection, true));
|
TextDecoration statNameStyle = getStyleFromString(config.getStatNameFormatting(selection, true));
|
||||||
TranslatableComponent subStat = subStatNameComponent(selection, subStatName);
|
|
||||||
|
|
||||||
String key = language.getStatKey(statName);
|
Statistic.Type statType = EnumHandler.getStatType(statName);
|
||||||
if (key == null) {
|
TranslatableComponent subStat = subStatNameComponent(selection, subStatName, statType);
|
||||||
key = statName;
|
TranslatableComponent.Builder totalName;
|
||||||
|
|
||||||
|
String key = getLanguageKey(statName, null, statType);
|
||||||
|
if (key == null) key = statName;
|
||||||
|
|
||||||
|
if (key.equalsIgnoreCase("stat_type.minecraft.killed") && subStat != null) {
|
||||||
|
totalName = killEntityComponent(subStat);
|
||||||
}
|
}
|
||||||
|
|
||||||
//case for kill_entity
|
|
||||||
else if (key.equalsIgnoreCase("stat_type.minecraft.killed") && subStat != null) {
|
|
||||||
TranslatableComponent.Builder totalName = translatable()
|
|
||||||
.key("commands.kill.success.single") //"Killed %s"
|
|
||||||
.args(subStat)
|
|
||||||
.color(statNameColor);
|
|
||||||
if (statNameStyle != null) {
|
|
||||||
totalName.decoration(statNameStyle, TextDecoration.State.TRUE);
|
|
||||||
}
|
|
||||||
return totalName.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
//case for entity_killed_by
|
|
||||||
else if (key.equalsIgnoreCase("stat_type.minecraft.killed_by") && subStat != null) {
|
else if (key.equalsIgnoreCase("stat_type.minecraft.killed_by") && subStat != null) {
|
||||||
String newKey = "stat.minecraft.player_kills"; //"Player Kills"
|
totalName = entityKilledByComponent(selection, subStat);
|
||||||
if (selection == Query.PLAYER) {
|
}
|
||||||
newKey = "stat.minecraft.deaths"; //"Number of Deaths"
|
else {
|
||||||
}
|
totalName = translatable().key(key);
|
||||||
TranslatableComponent.Builder totalName = translatable()
|
|
||||||
.key(newKey)
|
|
||||||
.append(space())
|
|
||||||
.append(translatable()
|
|
||||||
.key("book.byAuthor") //"by %1$s"
|
|
||||||
.args(subStat))
|
|
||||||
.color(statNameColor);
|
|
||||||
if (statNameStyle != null) {
|
|
||||||
totalName.decoration(statNameStyle, TextDecoration.State.TRUE);
|
|
||||||
}
|
|
||||||
return totalName.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//all other cases
|
|
||||||
TranslatableComponent.Builder totalName = translatable()
|
|
||||||
.key(key)
|
|
||||||
.color(statNameColor);
|
|
||||||
|
|
||||||
if (statNameStyle != null) totalName.decoration(statNameStyle, TextDecoration.State.TRUE);
|
if (statNameStyle != null) totalName.decoration(statNameStyle, TextDecoration.State.TRUE);
|
||||||
if (subStat != null) {
|
if (subStat != null) totalName.append(space()).append(subStat);
|
||||||
totalName.append(space()).append(subStat);
|
return totalName
|
||||||
}
|
.color(statNameColor)
|
||||||
return totalName.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected @Nullable TranslatableComponent subStatNameComponent(Query selection, @Nullable String subStatName) {
|
/** Construct a custom translation for kill_entity */
|
||||||
if (subStatName == null) {
|
private TranslatableComponent.@NotNull Builder killEntityComponent(TranslatableComponent subStat) {
|
||||||
return null;
|
TranslatableComponent.Builder totalName = translatable()
|
||||||
}
|
.key("commands.kill.success.single"); //"Killed %s"
|
||||||
String key = null;
|
|
||||||
if (EnumHandler.isEntity(subStatName)){
|
if (subStat != null) totalName.args(subStat);
|
||||||
key = language.getEntityKey(subStatName);
|
return totalName;
|
||||||
}
|
}
|
||||||
else if (EnumHandler.isBlock(subStatName)) {
|
|
||||||
key = language.getBlockKey(subStatName);
|
/** Construct a custom translation for entity_killed_by */
|
||||||
}
|
private TranslatableComponent.@NotNull Builder entityKilledByComponent(Query selection, TranslatableComponent subStat) {
|
||||||
else if (EnumHandler.isItem(subStatName)) {
|
String key = "stat.minecraft.player_kills"; //"Player Kills"
|
||||||
key = language.getItemKey(subStatName);
|
if (selection == Query.PLAYER) {
|
||||||
|
key = "stat.minecraft.deaths"; //"Number of Deaths"
|
||||||
}
|
}
|
||||||
|
TranslatableComponent.Builder totalName = translatable()
|
||||||
|
.key(key)
|
||||||
|
.append(space())
|
||||||
|
.append(translatable()
|
||||||
|
.key("book.byAuthor")); //"by %1$s"
|
||||||
|
|
||||||
|
if (subStat != null) totalName.args(subStat);
|
||||||
|
return totalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected @Nullable TranslatableComponent subStatNameComponent(Query selection, @Nullable String subStatName, Statistic.Type statType) {
|
||||||
|
String key = getLanguageKey(null, subStatName, statType);
|
||||||
|
|
||||||
if (key != null) {
|
if (key != null) {
|
||||||
TextDecoration style = getStyleFromString(config.getSubStatNameFormatting(selection, true));
|
TextDecoration style = getStyleFromString(config.getSubStatNameFormatting(selection, true));
|
||||||
TranslatableComponent.Builder subStat = translatable()
|
TranslatableComponent.Builder subStat = translatable()
|
||||||
@ -376,6 +366,47 @@ public class MessageFactory {
|
|||||||
return style == null ? text(content).color(color) : text(content).color(color).decoration(style, TextDecoration.State.TRUE);
|
return style == null ? text(content).color(color) : text(content).color(color).decoration(style, TextDecoration.State.TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** If TranslatableComponents are enabled, this will attempt to get the appropriate language key.
|
||||||
|
Otherwise, it will attempt to replace "_" with " " and capitalize each first letter of the input.
|
||||||
|
If that fails too, it will simply return the String it received as input.
|
||||||
|
If even THAT somehow fails, it will return null.*/
|
||||||
|
private @Nullable String getLanguageKey(@Nullable String statName, @Nullable String subStatName, Statistic.Type statType) {
|
||||||
|
String key = null;
|
||||||
|
if (config.useTranslatableComponents()) {
|
||||||
|
if (statName != null) {
|
||||||
|
key = language.getStatKey(statName);
|
||||||
|
} else if (subStatName != null && statType != null) {
|
||||||
|
switch (statType) {
|
||||||
|
case BLOCK -> key = language.getBlockKey(subStatName);
|
||||||
|
case ENTITY -> key = language.getEntityKey(subStatName);
|
||||||
|
case ITEM -> key = language.getItemKey(subStatName);
|
||||||
|
case UNTYPED -> {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (key != null) {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (statName != null) key = statName;
|
||||||
|
else if (subStatName != null) key = subStatName;
|
||||||
|
|
||||||
|
if (key != null) {
|
||||||
|
StringBuilder capitals = new StringBuilder(key);
|
||||||
|
capitals.setCharAt(0, Character.toUpperCase(capitals.charAt(0)));
|
||||||
|
while (capitals.indexOf("_") != -1) {
|
||||||
|
MyLogger.replacingUnderscores();
|
||||||
|
|
||||||
|
int index = capitals.indexOf("_");
|
||||||
|
capitals.setCharAt(index + 1, Character.toUpperCase(capitals.charAt(index + 1)));
|
||||||
|
capitals.setCharAt(index, ' ');
|
||||||
|
}
|
||||||
|
key = capitals.toString();
|
||||||
|
}
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
private TextColor getColorFromString(String configString) {
|
private TextColor getColorFromString(String configString) {
|
||||||
if (configString != null) {
|
if (configString != null) {
|
||||||
try {
|
try {
|
||||||
@ -411,7 +442,7 @@ public class MessageFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//returns the type of the substatistic in String-format, or null if this statistic is not of type block, item or entity
|
/** Returns the type of the substatistic in String-format, or null if this statistic is not of type block, item or entity */
|
||||||
private String getSubStatTypeName(Statistic.Type statType) {
|
private String getSubStatTypeName(Statistic.Type statType) {
|
||||||
String subStat;
|
String subStat;
|
||||||
if (statType == Statistic.Type.BLOCK) {
|
if (statType == Statistic.Type.BLOCK) {
|
||||||
@ -429,7 +460,7 @@ public class MessageFactory {
|
|||||||
return subStat;
|
return subStat;
|
||||||
}
|
}
|
||||||
|
|
||||||
//returns the usage-explanation with hovering text
|
/** Returns the usage-explanation with hovering text */
|
||||||
private @NotNull TextComponent helpMsgHover() {
|
private @NotNull TextComponent helpMsgHover() {
|
||||||
TextComponent spaces = text(" "); //4 spaces
|
TextComponent spaces = text(" "); //4 spaces
|
||||||
TextComponent arrow = text("→ ").color(NamedTextColor.GOLD); //alt + 26
|
TextComponent arrow = text("→ ").color(NamedTextColor.GOLD); //alt + 26
|
||||||
@ -487,8 +518,8 @@ public class MessageFactory {
|
|||||||
.append(text(", add the player's name").color(hoverBaseColor))))));
|
.append(text(", add the player's name").color(hoverBaseColor))))));
|
||||||
}
|
}
|
||||||
|
|
||||||
//returns the usage-explanation without any hovering text
|
/** Returns the usage-explanation without any hovering text.
|
||||||
//if BukkitVersion is CraftBukkit, this doesn't use unicode symbols or hex colors
|
If BukkitVersion is CraftBukkit, this doesn't use unicode symbols or hex colors */
|
||||||
private @NotNull TextComponent helpMsgPlain(boolean isConsoleSender) {
|
private @NotNull TextComponent helpMsgPlain(boolean isConsoleSender) {
|
||||||
TextComponent spaces = text(" "); //4 spaces
|
TextComponent spaces = text(" "); //4 spaces
|
||||||
TextComponent arrow = text("→ ").color(NamedTextColor.GOLD); //alt + 26;
|
TextComponent arrow = text("→ ").color(NamedTextColor.GOLD); //alt + 26;
|
||||||
|
@ -21,6 +21,7 @@ public class PrideMessageFactory extends MessageFactory {
|
|||||||
config = c;
|
config = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected TextComponent getPrefixAsTitle(boolean isConsoleSender) {
|
protected TextComponent getPrefixAsTitle(boolean isConsoleSender) {
|
||||||
if (cancelRainbow(isConsoleSender)) {
|
if (cancelRainbow(isConsoleSender)) {
|
||||||
@ -63,11 +64,5 @@ public class PrideMessageFactory extends MessageFactory {
|
|||||||
private boolean cancelRainbow(boolean isConsoleSender) {
|
private boolean cancelRainbow(boolean isConsoleSender) {
|
||||||
return !(config.useRainbowPrefix() || (config.useFestiveFormatting() && LocalDate.now().getMonth().equals(Month.JUNE))) ||
|
return !(config.useRainbowPrefix() || (config.useFestiveFormatting() && LocalDate.now().getMonth().equals(Month.JUNE))) ||
|
||||||
(isConsoleSender && Bukkit.getName().equalsIgnoreCase("CraftBukkit"));
|
(isConsoleSender && Bukkit.getName().equalsIgnoreCase("CraftBukkit"));
|
||||||
// If a player uses the command after pride month, with rainbow enabled
|
|
||||||
// not (true OR (true && false)) OR (false && false)
|
|
||||||
// not (true OR (false)) OR (false)
|
|
||||||
// not (true) OR (false) not (false) OR (false)
|
|
||||||
// false OR (false) not (true) true OR false not (false)
|
|
||||||
// false true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,18 +98,18 @@ public class ReloadThread extends Thread {
|
|||||||
OfflinePlayer[] offlinePlayers;
|
OfflinePlayer[] offlinePlayers;
|
||||||
if (config.whitelistOnly()) {
|
if (config.whitelistOnly()) {
|
||||||
offlinePlayers = Bukkit.getWhitelistedPlayers().toArray(OfflinePlayer[]::new);
|
offlinePlayers = Bukkit.getWhitelistedPlayers().toArray(OfflinePlayer[]::new);
|
||||||
MyLogger.logTimeTaken("ReloadThread", "getting white-list-only list", time);
|
MyLogger.logTimeTaken("ReloadThread", "retrieved whitelist", time);
|
||||||
}
|
}
|
||||||
else if (config.excludeBanned()) {
|
else if (config.excludeBanned()) {
|
||||||
Set<OfflinePlayer> bannedPlayers = Bukkit.getBannedPlayers();
|
Set<OfflinePlayer> bannedPlayers = Bukkit.getBannedPlayers();
|
||||||
offlinePlayers = Arrays.stream(Bukkit.getOfflinePlayers())
|
offlinePlayers = Arrays.stream(Bukkit.getOfflinePlayers())
|
||||||
.parallel()
|
.parallel()
|
||||||
.filter(offlinePlayer -> !bannedPlayers.contains(offlinePlayer)).toArray(OfflinePlayer[]::new);
|
.filter(offlinePlayer -> !bannedPlayers.contains(offlinePlayer)).toArray(OfflinePlayer[]::new);
|
||||||
MyLogger.logTimeTaken("ReloadThread", "getting excluding-banned-players list", time);
|
MyLogger.logTimeTaken("ReloadThread", "retrieved banlist", time);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
offlinePlayers = Bukkit.getOfflinePlayers();
|
offlinePlayers = Bukkit.getOfflinePlayers();
|
||||||
MyLogger.logTimeTaken("ReloadThread", "getting regular player list", time);
|
MyLogger.logTimeTaken("ReloadThread", "retrieved list of Offline Players", time);
|
||||||
}
|
}
|
||||||
|
|
||||||
int size = offlinePlayers != null ? offlinePlayers.length : 16;
|
int size = offlinePlayers != null ? offlinePlayers.length : 16;
|
||||||
|
@ -3,6 +3,7 @@ package com.gmail.artemis.the.gr8.playerstats.utils;
|
|||||||
import com.gmail.artemis.the.gr8.playerstats.enums.DebugLevel;
|
import com.gmail.artemis.the.gr8.playerstats.enums.DebugLevel;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -22,8 +23,7 @@ public class MyLogger {
|
|||||||
|
|
||||||
static{
|
static{
|
||||||
Plugin plugin = Bukkit.getPluginManager().getPlugin("PlayerStats");
|
Plugin plugin = Bukkit.getPluginManager().getPlugin("PlayerStats");
|
||||||
|
logger = (plugin != null) ? plugin.getLogger() : Bukkit.getLogger();
|
||||||
logger = plugin != null ? plugin.getLogger() : Bukkit.getLogger();
|
|
||||||
debugLevel = DebugLevel.LOW;
|
debugLevel = DebugLevel.LOW;
|
||||||
|
|
||||||
processedPlayers = new String[10];
|
processedPlayers = new String[10];
|
||||||
@ -34,6 +34,7 @@ public class MyLogger {
|
|||||||
private MyLogger() {
|
private MyLogger() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/** Accesses the playersIndex to up it by 1 and return its previous value. */
|
/** Accesses the playersIndex to up it by 1 and return its previous value. */
|
||||||
private static int nextPlayersIndex() {
|
private static int nextPlayersIndex() {
|
||||||
return playersIndex.getAndIncrement();
|
return playersIndex.getAndIncrement();
|
||||||
@ -46,7 +47,7 @@ public class MyLogger {
|
|||||||
|
|
||||||
/** Sets the desired debugging level.
|
/** Sets the desired debugging level.
|
||||||
<p>1 = low (only show unexpected errors)</p>
|
<p>1 = low (only show unexpected errors)</p>
|
||||||
<p>2 = medium (show all encountered exceptions, log main tasks and show time taken)</p>
|
<p>2 = medium (detail all encountered exceptions, log main tasks and show time taken)</p>
|
||||||
<p>3 = high (log all tasks and time taken)</p>
|
<p>3 = high (log all tasks and time taken)</p>
|
||||||
<p>Default: 1</p>*/
|
<p>Default: 1</p>*/
|
||||||
public static void setDebugLevel(int level) {
|
public static void setDebugLevel(int level) {
|
||||||
@ -61,6 +62,27 @@ public class MyLogger {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Log the encountered exception to console, including a printStackTrace if DebugLevel is MEDIUM or HIGH.
|
||||||
|
@param exception The encountered exception
|
||||||
|
@param caughtBy The name of the class/method that caught the exception
|
||||||
|
@param lineNumber The line where the exception is caught */
|
||||||
|
public static void logException(@NotNull Exception exception, String caughtBy, int lineNumber) {
|
||||||
|
String line = (lineNumber == 0) ? "" : " [" + lineNumber + "]";
|
||||||
|
String caught = (debugLevel != DebugLevel.LOW) ? " (" + caughtBy + line + ")" : "";
|
||||||
|
|
||||||
|
logger.info(exception + caught);
|
||||||
|
if (debugLevel == DebugLevel.HIGH) {
|
||||||
|
exception.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** If DebugLevel is MEDIUM or HIGH, logs when the while loop in MessageFactory, getLanguageKey is being run. */
|
||||||
|
public static void replacingUnderscores() {
|
||||||
|
if (debugLevel != DebugLevel.LOW) {
|
||||||
|
logger.info("Replacing underscores and capitalizing names...");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Output to console that the given thread has been created (but not started yet).*/
|
/** Output to console that the given thread has been created (but not started yet).*/
|
||||||
public static void threadCreated(String threadName) {
|
public static void threadCreated(String threadName) {
|
||||||
if (debugLevel != DebugLevel.LOW) {
|
if (debugLevel != DebugLevel.LOW) {
|
||||||
|
@ -10,7 +10,7 @@ config-version: 3.1
|
|||||||
|
|
||||||
# How much output in console you'll get while PlayerStats is processing
|
# How much output in console you'll get while PlayerStats is processing
|
||||||
# 1 = low (only show unexpected errors)
|
# 1 = low (only show unexpected errors)
|
||||||
# 2 = medium (show all encountered exceptions, log main tasks and show time taken)
|
# 2 = medium (detail all encountered exceptions, log main tasks and show time taken)
|
||||||
# 3 = high (log all tasks and time taken)
|
# 3 = high (log all tasks and time taken)
|
||||||
debug-level: 1
|
debug-level: 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user