From 7236885590fb59c509b1745951aced907c486cd3 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 15 Jun 2022 20:07:29 +0200 Subject: [PATCH] Update LocalCommand --- .../steamwar/bungeecore/commands/LocalCommand.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/LocalCommand.java b/src/de/steamwar/bungeecore/commands/LocalCommand.java index 28717f7..ab77eb3 100644 --- a/src/de/steamwar/bungeecore/commands/LocalCommand.java +++ b/src/de/steamwar/bungeecore/commands/LocalCommand.java @@ -20,20 +20,18 @@ package de.steamwar.bungeecore.commands; import de.steamwar.bungeecore.listeners.ChatListener; +import de.steamwar.command.SWCommand; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.connection.ProxiedPlayer; -public class LocalCommand extends BasicCommand { +public class LocalCommand extends SWCommand { public LocalCommand() { super("local", null, "bc", "bauchat"); } - @Override - public void execute(CommandSender sender, String[] args) { - if(!(sender instanceof ProxiedPlayer)) - return; - - ChatListener.localChat((ProxiedPlayer) sender, String.join(" ", args)); + @Register + public void genericCommand(ProxiedPlayer player, String... message) { + ChatListener.localChat(player, String.join(" ", message)); } }