From b69bb97da495bfd2c97f3224d95e172d33c9dac6 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Tue, 6 Aug 2024 17:26:11 +0200 Subject: [PATCH] Revert ChatListener --- .../de/steamwar/velocitycore/listeners/ChatListener.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/VelocityCore/src/de/steamwar/velocitycore/listeners/ChatListener.java b/VelocityCore/src/de/steamwar/velocitycore/listeners/ChatListener.java index ae113f82..0880a0bf 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/listeners/ChatListener.java +++ b/VelocityCore/src/de/steamwar/velocitycore/listeners/ChatListener.java @@ -56,7 +56,6 @@ public class ChatListener extends BasicListener { @Subscribe(order = PostOrder.FIRST) public void fixCommands(CommandExecuteEvent e) { - System.out.println("fixCommands " + e); String command = e.getCommand(); if(command.startsWith("7")) { command = "/" + command.substring(1); @@ -73,7 +72,6 @@ public class ChatListener extends BasicListener { @Subscribe(order = PostOrder.LAST) public void logCommands(CommandExecuteEvent e) { - System.out.println("logCommands " + e); String command = e.getCommand(); int space = command.indexOf(' '); if(VelocityCore.getProxy().getCommandManager().hasCommand(space != -1 ? command.substring(0, space) : command)) { @@ -88,10 +86,9 @@ public class ChatListener extends BasicListener { cmdLogger.log(Level.INFO, "%s -> executed command /%s".formatted(name, command)); } else if (e.getCommandSource() instanceof Player player) { - System.out.println("spoofChatInput " + e); - // player.spoofChatInput("/" + command); - // e.setResult(CommandExecuteEvent.CommandResult.denied()); - e.setResult(CommandExecuteEvent.CommandResult.forwardToServer(e.getCommand())); + // System.out.println("spoofChatInput " + e); + player.spoofChatInput("/" + command); + e.setResult(CommandExecuteEvent.CommandResult.denied()); } }