update after a decade (+ greet messages, - redundant events)

This commit is contained in:
2025-04-20 02:45:23 +08:00
parent 0f834e5810
commit 6b463cf5b3
25 changed files with 128 additions and 53 deletions
@@ -16,7 +16,7 @@ import java.util.Date;
public class PlayerCommandPreprocess implements Listener {
@EventHandler
public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
Bukkit.getConsoleSender().sendMessage("PlayerCommandPreprocess event triggered");
Bukkit.getConsoleSender().sendMessage("%s used a command".formatted(event.getPlayer().getName()));
Player player = event.getPlayer();
String[] command = event.getMessage().split(" "); // get the command name
DiscordWebhook notify = new DiscordWebhook(ServerUtils.webhook_notify);