From 11af4fb90f8a167f10bc618bf303726f7ef941fe Mon Sep 17 00:00:00 2001 From: cons-tan-tan <132136681+cons-tan-tan@users.noreply.github.com> Date: Tue, 26 Mar 2024 07:30:42 +0900 Subject: [PATCH 1/2] fix: add ignore client setting --- src/main/java/bqlogging/BetterQuestLogging.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/bqlogging/BetterQuestLogging.java b/src/main/java/bqlogging/BetterQuestLogging.java index d3ee217..ffd3905 100644 --- a/src/main/java/bqlogging/BetterQuestLogging.java +++ b/src/main/java/bqlogging/BetterQuestLogging.java @@ -24,7 +24,8 @@ version = Tags.VERSION, name = "BetterQuestLogging", acceptedMinecraftVersions = "[1.7.10]", - dependencies = "required-after:betterquesting") + dependencies = "required-after:betterquesting", + acceptableRemoteVersions = "*") public class BetterQuestLogging { public static final String MODID = "bqlogging"; From 6f0a7744c038f8278a56cdd8a4e48bcc2771895d Mon Sep 17 00:00:00 2001 From: cons-tan-tan <132136681+cons-tan-tan@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:28:58 +0900 Subject: [PATCH 2/2] fix: simplify quest log --- src/main/java/bqlogging/BetterQuestLogging.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/bqlogging/BetterQuestLogging.java b/src/main/java/bqlogging/BetterQuestLogging.java index ffd3905..7a0eaa2 100644 --- a/src/main/java/bqlogging/BetterQuestLogging.java +++ b/src/main/java/bqlogging/BetterQuestLogging.java @@ -8,7 +8,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import betterquesting.api.api.QuestingAPI; import betterquesting.api.events.QuestEvent; import betterquesting.api.properties.NativeProps; import betterquesting.api.questing.IQuest; @@ -57,19 +56,17 @@ public void onQuestEvent(QuestEvent event) { return; } - String playerName = QuestingAPI.getPlayer(event.getPlayerID()) - .getDisplayName(); questIds.forEach(uuid -> { IQuest quest = QuestDatabase.INSTANCE.get(uuid); if (quest == null) { LOG.error(String.format("Quest with ID %s does not exist", uuid)); return; + } else if (quest.getProperty(NativeProps.SILENT)) { + return; } LOG.info( String.format( - "%s completed the quest %s: %s", - playerName, - quest.getProperty(NativeProps.GLOBAL) ? "[GLOBAL]" : "", + "Quest Completed: %s", QuestTranslation.translateQuestName(uuid, quest) .replaceAll("ยง.", ""))); });