show [+]/[-] badges on module toggle notifications

toggling a module now announces "[+] Name" in green for enabled and
"[-] Name" in red for disabled instead of the trailing on/off wording.
visual range notifications keep the shared "{gray} name message" format
This commit is contained in:
froslanz
2026-10-22 13:52:50 -04:00
parent f0398c7011
commit 6e8746c9d1
@@ -19,6 +19,7 @@ import static cc.fros.util.chat.SimpleSignature.from;
public class NotificationsModule extends Module {
private static final String MODULE_FORMAT = "{gray} %s %s%s";
private static final String TOGGLE_FORMAT = "%s%s {gray}%s";
public final Setting<Boolean> moduleToggle = bool("ModuleToggle", true);
public final Setting<Boolean> visualRange = bool("VisualRange", true);
@@ -45,10 +46,10 @@ public class NotificationsModule extends Module {
? module.getDisplayName()
: event.getFeature().getName();
ChatUtil.sendMessage(TextUtil.text(MODULE_FORMAT,
name,
ChatUtil.sendMessage(TextUtil.text(TOGGLE_FORMAT,
moduleState ? "{green}" : "{red}",
moduleState ? "on" : "off"), from(event.getFeature().getName()));
moduleState ? "[+]" : "[-]",
name), from(event.getFeature().getName()));
}
@Override