From 74dbd92d7a9566e979adbd69d787df747fc6a750 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 19 Jul 2020 15:44:59 +0200 Subject: [PATCH] Fix joining Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/commands/RankedCommand.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/commands/RankedCommand.java b/src/de/steamwar/bungeecore/commands/RankedCommand.java index 2034ce28..d64aeaf1 100644 --- a/src/de/steamwar/bungeecore/commands/RankedCommand.java +++ b/src/de/steamwar/bungeecore/commands/RankedCommand.java @@ -147,7 +147,13 @@ public class RankedCommand extends BasicCommand { removeFromAll(wp2.player); String serverName = wp1.player.getName() + " vs " + wp2.player.getName(); - SubserverSystem.startArena(mode, mode.getRandomMap(), 0, 0, serverName, serverName.replace(' ', '_'), wp1.player.getUniqueId(), wp2.player.getUniqueId(), true); + Subserver arena = SubserverSystem.startArena(mode, mode.getRandomMap(), 0, 0, serverName, serverName.replace(' ', '_'), wp1.player.getUniqueId(), wp2.player.getUniqueId(), true); + arena.sendPlayer(wp1.player); + arena.sendPlayer(wp2.player); + + BungeeCore.broadcast(BungeeCore.CHAT_PREFIX + "§7" + mode.getDisplayName() + "§8-§7Ranglistenspiel§8: §e" + serverName, + "§aZuschauen", + new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/join " + wp1.player.getName())); } } }