Skip to content

Commit

Permalink
only log screen name client side
Browse files Browse the repository at this point in the history
  • Loading branch information
JaisDK committed Aug 9, 2024
1 parent 286ac51 commit a6ea7f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mod_name=Inventory Tweaks Refoxed
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=Apache License, Version 2.0
# The mod version. See https://semver.org/
mod_version=1.21.0-1.1.3
mod_version=1.21.0-1.1.4
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/invtweaks/config/InvTweaksConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ public static boolean isQuickViewEnabled() {
}

public static boolean isDebugEnabled() {
return ENABLE_DEBUG.get();
return CLIENT_CONFIG.isLoaded() && ENABLE_DEBUG.get();
}

public static Map<String, Category> cfgToCompiledCats(List<UnmodifiableConfig> lst) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/invtweaks/util/Sorting.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

public class Sorting {
public static void executeSort(Player player, boolean isPlayerSort, String screenClass) {
if (InvTweaksConfig.isDebugEnabled()) {
if (player != null && player.level().isClientSide() && InvTweaksConfig.isDebugEnabled()) {
InvTweaksMod.LOGGER.debug("screen: " + screenClass);
}
if (isPlayerSort) {
Expand Down

0 comments on commit a6ea7f3

Please sign in to comment.