From 67d816e90b6f93fd906db725bbb66e2b684a2989 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 16 Jun 2022 11:10:19 +0200 Subject: [PATCH] Update RegelnCommand --- .../steamwar/bungeecore/commands/RegelnCommand.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/RegelnCommand.java b/src/de/steamwar/bungeecore/commands/RegelnCommand.java index 37755f4..2721b73 100644 --- a/src/de/steamwar/bungeecore/commands/RegelnCommand.java +++ b/src/de/steamwar/bungeecore/commands/RegelnCommand.java @@ -20,21 +20,18 @@ package de.steamwar.bungeecore.commands; import de.steamwar.bungeecore.Message; +import de.steamwar.command.SWCommand; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.chat.ClickEvent; import net.md_5.bungee.api.connection.ProxiedPlayer; -public class RegelnCommand extends BasicCommand { +public class RegelnCommand extends SWCommand { public RegelnCommand() { - super("regeln", null); + super("regeln"); } - @Override - public void execute(CommandSender sender, String[] args) { - if(!(sender instanceof ProxiedPlayer)) - return; - ProxiedPlayer player = (ProxiedPlayer) sender; - + @Register + public void genericCommand(ProxiedPlayer player) { Message.send("REGELN_RULES", player); Message.sendPrefixless("REGELN_AS", player, Message.parse("REGELN_AS_HOVER", player), new ClickEvent(ClickEvent.Action.OPEN_URL, Message.parse("REGELN_AS_URL", player))); Message.sendPrefixless("REGELN_MWG", player, Message.parse("REGELN_MWG_HOVER", player), new ClickEvent(ClickEvent.Action.OPEN_URL, Message.parse("REGELN_MWG_URL", player)));