From bf7e4fb40cb10bad3a9da97e5774a9d09b0e1068 Mon Sep 17 00:00:00 2001 From: minster586 <43217359+minster586@users.noreply.github.com> Date: Sat, 9 Aug 2025 03:29:46 -0400 Subject: [PATCH] Added the server variable --- .gitignore | 1 + pom.xml | 2 +- src/main/java/com/minster586/ntfyplugin/CommandMonitor.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ea8c4bf..81cf465 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +/.vscode diff --git a/pom.xml b/pom.xml index 03c328b..e766495 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 com.minster586 NTFYNotifier - 1.0.1 + 1.0.2 jar NTFYNotifier diff --git a/src/main/java/com/minster586/ntfyplugin/CommandMonitor.java b/src/main/java/com/minster586/ntfyplugin/CommandMonitor.java index 705b0db..e1fe6f0 100644 --- a/src/main/java/com/minster586/ntfyplugin/CommandMonitor.java +++ b/src/main/java/com/minster586/ntfyplugin/CommandMonitor.java @@ -33,7 +33,7 @@ public class CommandMonitor implements Listener { if (commandLine.toLowerCase().startsWith("/" + keyword.toLowerCase())) { String[] parts = commandLine.split("\\s+"); String target = parts.length > 1 ? parts[1] : null; - String title = messageManager.getMessage(keyword + ".title"); + String title = messageManager.formatMessage(keyword + ".title", (sender instanceof Player) ? (Player) sender : null, target); String message = messageManager.formatMessage(keyword + ".message", (sender instanceof Player) ? (Player) sender : null, target); notifier.sendNotification(title, message); break;