Skip to content

Commit

Permalink
Fix LogHelper NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
ILikePlayingGames committed Jul 17, 2023
1 parent 0cd786f commit 8c973f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void logDebug(String message, Throwable throwable, Object... param
String callingClassName = new Throwable().getStackTrace()[3].getClassName();
Logger logger = LogManager.getLogger(callingClassName);

if (FancyWarpMenu.logger.isDebugEnabled() || Settings.isDebugModeEnabled()) {
if (Settings.isDebugModeEnabled()) {
if (throwable != null && params != null && params.length > 0) {
throw new IllegalArgumentException("Throwable and params cannot be used together in the same call");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class EntityPlayerSPHook {
public static void onSendChatMessage(String message, CallbackInfo ci) {
String lowerCaseMessage = message.toLowerCase(Locale.US).trim();

if (LogHelper.DEBUG_ENABLED && message.contains("/warp")) {
if (message.contains("/warp")) {
LogHelper.logDebug("Caught send message: {}" +
"\nMenu Enabled: {}", lowerCaseMessage, Settings.isWarpMenuEnabled());
}
Expand Down

0 comments on commit 8c973f8

Please sign in to comment.