Added the server variable

This commit is contained in:
minster586
2025-08-09 03:29:46 -04:00
parent c28b4b89ba
commit bf7e4fb40c
3 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/target /target
/.vscode

View File

@@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.minster586</groupId> <groupId>com.minster586</groupId>
<artifactId>NTFYNotifier</artifactId> <artifactId>NTFYNotifier</artifactId>
<version>1.0.1</version> <version>1.0.2</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>NTFYNotifier</name> <name>NTFYNotifier</name>

View File

@@ -33,7 +33,7 @@ public class CommandMonitor implements Listener {
if (commandLine.toLowerCase().startsWith("/" + keyword.toLowerCase())) { if (commandLine.toLowerCase().startsWith("/" + keyword.toLowerCase())) {
String[] parts = commandLine.split("\\s+"); String[] parts = commandLine.split("\\s+");
String target = parts.length > 1 ? parts[1] : null; 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); String message = messageManager.formatMessage(keyword + ".message", (sender instanceof Player) ? (Player) sender : null, target);
notifier.sendNotification(title, message); notifier.sendNotification(title, message);
break; break;