From 84ead29ddbc103278ab5bf9b074b734c8a2fb39b Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 16 Jun 2022 11:09:24 +0200 Subject: [PATCH] Update RCommand --- .../bungeecore/commands/RCommand.java | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/RCommand.java b/src/de/steamwar/bungeecore/commands/RCommand.java index 62e5af8..32f1a64 100644 --- a/src/de/steamwar/bungeecore/commands/RCommand.java +++ b/src/de/steamwar/bungeecore/commands/RCommand.java @@ -19,28 +19,19 @@ package de.steamwar.bungeecore.commands; -import de.steamwar.messages.ChatSender; -import net.md_5.bungee.api.CommandSender; +import de.steamwar.command.SWCommand; import net.md_5.bungee.api.connection.ProxiedPlayer; import static de.steamwar.bungeecore.Storage.lastChats; -public class RCommand extends BasicCommand { +public class RCommand extends SWCommand { public RCommand() { super("r", "", "reply"); } - @Override - public void execute(CommandSender sender, String[] args) { - if(!(sender instanceof ProxiedPlayer)) - return; - - if(args.length == 0){ - ChatSender.of(sender).system("R_USAGE"); - return; - } - - MsgCommand.msg((ProxiedPlayer) sender, lastChats.get(sender), args); + @Register(description = "R_USAGE") + public void genericCommand(ProxiedPlayer player, String... message) { + MsgCommand.msg(player, lastChats.get(player), message); } }