From 757f2439ebf6cc1fe8596ac60327b42c3a6dc9b6 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 6 Sep 2019 17:46:47 +0200 Subject: [PATCH] Fixing bau testarena + help entry --- src/de/steamwar/bungeecore/SubserverSystem.java | 5 +++-- src/de/steamwar/bungeecore/commands/HelpCommand.java | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/SubserverSystem.java b/src/de/steamwar/bungeecore/SubserverSystem.java index 55bc421..c7b743e 100644 --- a/src/de/steamwar/bungeecore/SubserverSystem.java +++ b/src/de/steamwar/bungeecore/SubserverSystem.java @@ -78,8 +78,9 @@ public class SubserverSystem { public static void sendToTestServer(ProxiedPlayer p, ArenaMode m, String map){ int port = freePort(4000); - String serverName = p.getName() + "s Bau"; - new Bauserver(serverName, p.getUniqueId(), port, MC_SCRIPT, "-a", m.name(), serverName, Integer.toString(port), map, "-1").sendPlayer(p); + + new Bauserver(p.getName() + "s Bau", p.getUniqueId(), port, + MC_SCRIPT, "-a", m.name(), p.getName(), Integer.toString(port), map, "-1").sendPlayer(p); } private static int freePort(int start){ diff --git a/src/de/steamwar/bungeecore/commands/HelpCommand.java b/src/de/steamwar/bungeecore/commands/HelpCommand.java index 20a4a25..f34c36f 100644 --- a/src/de/steamwar/bungeecore/commands/HelpCommand.java +++ b/src/de/steamwar/bungeecore/commands/HelpCommand.java @@ -110,6 +110,11 @@ public class HelpCommand extends BasicCommand { tc.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/bau delete")); p.sendMessage(tc); + tc = new TextComponent("§8/§ebau testarena §8- §7Starte eine Testarena"); + tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§eTestarena starten").create())); + tc.setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/bau testarena")); + p.sendMessage(tc); + tc = new TextComponent("§8/§ehelp bau §8- §7Hilfe zu nützlichen Werkzeugen"); tc.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder("§eNützliche Zusatzfunktionen").create())); tc.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/help bau"));