Skip to content

Commit 6169ed3

Browse files
committed
2 parents 592366f + 96f7502 commit 6169ed3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/main/java/com/jelly/farmhelperv2/config/FarmHelperConfig.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,6 +1316,11 @@ public static void triggerManuallyPestsDestroyer() {
13161316
description = "Pings everyone on Visitors Macro Logs"
13171317
)
13181318
public static boolean pingEveryoneOnVisitorsMacroLogs = false;
1319+
@Switch(
1320+
name = "Send Macro Enable/Disable Logs", category = DISCORD_INTEGRATION, subcategory = "Discord Webhook",
1321+
description = "Sends messages when the macro has been enabled or disabled"
1322+
)
1323+
public static boolean sendMacroEnableDisableLogs = true;
13191324
@Text(
13201325
name = "WebHook URL", category = DISCORD_INTEGRATION, subcategory = "Discord Webhook",
13211326
description = "The URL to use for the webhook",

src/main/java/com/jelly/farmhelperv2/handler/MacroHandler.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,9 @@ public void enableMacro() {
180180
LogUtils.sendDebug("Selected macro: " + LogUtils.capitalize(currentMacro.get().getClass().getSimpleName()));
181181
PlayerUtils.closeScreen();
182182
LogUtils.sendSuccess("Macro enabled!");
183-
LogUtils.webhookLog("Macro enabled!");
183+
if (FarmHelperConfig.sendMacroEnableDisableLogs) {
184+
LogUtils.webhookLog("Macro enabled!");
185+
}
184186

185187
analyticsTimer.reset();
186188
Multithreading.schedule(() -> {
@@ -206,7 +208,9 @@ public void enableMacro() {
206208
public void disableMacro() {
207209
setMacroToggled(false);
208210
LogUtils.sendSuccess("Macro disabled!");
209-
LogUtils.webhookLog("Macro disabled!");
211+
if (FarmHelperConfig.sendMacroEnableDisableLogs) {
212+
LogUtils.webhookLog("Macro disabled!");
213+
}
210214
currentMacro.ifPresent(m -> {
211215
m.setSavedState(Optional.empty());
212216
m.getRotation().reset();

0 commit comments

Comments
 (0)