SteamWar/BungeeCore
Archiviert
13
2

Some minor bugfixes
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-01-07 22:03:06 +01:00
Ursprung 55a5492a2d
Commit 1c50d61a28
4 geänderte Dateien mit 15 neuen und 4 gelöschten Zeilen

1
.gitignore vendored
Datei anzeigen

@ -1,3 +1,4 @@
lib lib
.idea .idea
target target
dependency-reduced-pom.xml

Datei anzeigen

@ -40,7 +40,15 @@ public class VerifyCommand extends BasicCommand {
Message.send("VERIFY_USAGE", sender); Message.send("VERIFY_USAGE", sender);
return; return;
} }
byte[] bytes = Base64.getDecoder().decode(strings[0]);
byte[] bytes;
try {
bytes = Base64.getDecoder().decode(strings[0]);
} catch (IllegalArgumentException e) {
Message.send("VERIFY_INVALID", sender);
return;
}
if(bytes.length != 16) { if(bytes.length != 16) {
Message.send("VERIFY_INVALID", sender); Message.send("VERIFY_INVALID", sender);
return; return;

Datei anzeigen

@ -224,10 +224,12 @@ public class SteamwarUser {
final URL url = new URL(API_URL + playerName); final URL url = new URL(API_URL + playerName);
String uuid = jsonParser.parse(new Scanner(url.openConnection().getInputStream()).nextLine()).getAsJsonObject().get("id").getAsString(); String uuid = jsonParser.parse(new Scanner(url.openConnection().getInputStream()).nextLine()).getAsJsonObject().get("id").getAsString();
return UUID.fromString(uuid.replaceFirst("(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})", "$1-$2-$3-$4-$5")); return UUID.fromString(uuid.replaceFirst("(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})", "$1-$2-$3-$4-$5"));
} catch (NoSuchElementException | IOException e) { } catch (NoSuchElementException e) {
// ignore, player does not exist
} catch (IOException e) {
BungeeCore.get().getLogger().log(Level.SEVERE, "Could not get offline player UUID " + playerName, e); BungeeCore.get().getLogger().log(Level.SEVERE, "Could not get offline player UUID " + playerName, e);
return null;
} }
return null;
} }
public void setTeam(int team) { public void setTeam(int team) {

Datei anzeigen

@ -537,7 +537,7 @@ SERVER_WORLD_ERROR=§cDas Erstellen der Welt ist fehlgeschlagen.
#WhoisCommand #WhoisCommand
WHOIS_USAGE=§c/whois [Spieler/ID] {-a} WHOIS_USAGE=§c/whois [Spieler/ID] \{-a\}
WHOIS_USERNAME=§7Username§8: §e{0} WHOIS_USERNAME=§7Username§8: §e{0}
WHOIS_UUID=§7UUID§8: §e{0} WHOIS_UUID=§7UUID§8: §e{0}
WHOIS_UUID_HOVER=§eUUID Kopieren WHOIS_UUID_HOVER=§eUUID Kopieren