From 383cd6097c8bb9ac107bd226703222e95f150944 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 23 Apr 2022 10:54:38 +0200 Subject: [PATCH] Fix pr stuff --- src/de/steamwar/bungeecore/commands/TeamCommand.java | 1 + .../bungeecore/listeners/SubserverProtocolFixer.java | 9 +++++---- src/de/steamwar/messages/BungeeCore.properties | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/de/steamwar/bungeecore/commands/TeamCommand.java b/src/de/steamwar/bungeecore/commands/TeamCommand.java index b6926b9..d92b5da 100644 --- a/src/de/steamwar/bungeecore/commands/TeamCommand.java +++ b/src/de/steamwar/bungeecore/commands/TeamCommand.java @@ -614,6 +614,7 @@ public class TeamCommand extends BasicCommand { } team.setAddress(server); team.setPort(port); + Storage.teamServers.remove(team.getTeamId()); Message.send("TEAM_SERVER_SET", player); } diff --git a/src/de/steamwar/bungeecore/listeners/SubserverProtocolFixer.java b/src/de/steamwar/bungeecore/listeners/SubserverProtocolFixer.java index d54414a..b87c960 100644 --- a/src/de/steamwar/bungeecore/listeners/SubserverProtocolFixer.java +++ b/src/de/steamwar/bungeecore/listeners/SubserverProtocolFixer.java @@ -29,6 +29,7 @@ import net.md_5.bungee.util.AddressUtil; import java.lang.reflect.Field; import java.net.InetSocketAddress; +import java.util.logging.Level; public class SubserverProtocolFixer extends BasicListener { @@ -40,8 +41,8 @@ public class SubserverProtocolFixer extends BasicListener { try { field = InitialHandler.class.getDeclaredField("extraDataInHandshake"); field.setAccessible(true); - } catch (Exception e) { - // ignore + } catch (NoSuchFieldException e) { + BungeeCord.getInstance().getLogger().log(Level.SEVERE, e.getMessage(), e); } } @@ -55,8 +56,8 @@ public class SubserverProtocolFixer extends BasicListener { extraData += "\00" + BungeeCord.getInstance().gson.toJson(properties); } field.set(initialHandler, extraData); - } catch (Exception ex) { - // ignore + } catch (IllegalAccessException ex) { + BungeeCord.getInstance().getLogger().log(Level.SEVERE, ex.getMessage(), ex); } } } diff --git a/src/de/steamwar/messages/BungeeCore.properties b/src/de/steamwar/messages/BungeeCore.properties index 9cfecf9..7b62af7 100644 --- a/src/de/steamwar/messages/BungeeCore.properties +++ b/src/de/steamwar/messages/BungeeCore.properties @@ -463,9 +463,9 @@ TEAM_EVENT_HOW_TO_LEAVE=§7Um die Teilnahme abzusagen, wiederhole den Befehl TEAM_COLOR_TITLE=Farbe wählen #Team Server -TEAM_SERVER_USAGE=§8/§7team server §8[§eIP/Address§8] §8(§7Port§8) §8- §7Setzt Addresse des Teamservers. +TEAM_SERVER_USAGE=§8/§7team server §8[§eIP/Adresse§8] §8(§7Port§8) §8- §7Setzt Adresse des Teamservers. TEAM_SERVER_SET=§7Du hast die Teamserveradresse geändert§8! -TEAM_SERVER_PORT_INVALID=§cDer Port muss eine Zahl sein. +TEAM_SERVER_PORT_INVALID=§cUnmögliche Portnummer. TEAM_NO_ADDRESS=§cTeamserveradresse nicht gesetzt. TEAM_TP_NO_TEAM=§cUnbekanntes Team.