From ddef07b3a6f7e10c9666bc542eb1b044f6585204 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 19 Jan 2020 06:45:06 +0100 Subject: [PATCH] Hotfix adding missing random --- src/de/steamwar/bungeecore/commands/FightCommand.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/de/steamwar/bungeecore/commands/FightCommand.java b/src/de/steamwar/bungeecore/commands/FightCommand.java index 6e3b7837..bc203f24 100644 --- a/src/de/steamwar/bungeecore/commands/FightCommand.java +++ b/src/de/steamwar/bungeecore/commands/FightCommand.java @@ -67,6 +67,16 @@ public class FightCommand extends BasicCommand { private static void getMaps(CommandSender sender, String precommand, ArenaMode mode){ TextComponent start = new TextComponent(); TextComponent current = start; + if(mode.getMaps().size() > 1){ + String command = precommand + mode.getChatName() + " Random"; + start.setBold(true); + start.setColor(ChatColor.GRAY); + start.setText("Random "); + start.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§e" + command).create())); + start.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, command)); + current = new TextComponent(); + } + for(String map : mode.getMaps()){ String command = precommand + mode.getChatName() + " " + map; current.setBold(true);