Archiviert
1
0
Dieser Commit ist enthalten in:
zOnlyKroks 2022-03-23 17:04:38 +01:00
Ursprung 1675b1dc9c
Commit a7525dd8a1

Datei anzeigen

@ -28,7 +28,6 @@ import de.steamwar.bungeecore.sql.Mod;
import de.steamwar.bungeecore.sql.Punishment;
import de.steamwar.bungeecore.sql.SteamwarUser;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
import net.md_5.bungee.api.event.PluginMessageEvent;
import net.md_5.bungee.event.EventHandler;
@ -69,24 +68,27 @@ public class Fabric extends BasicListener {
if(data.length != varInt.length + varInt.value) {
banPlayer(user,player);
return;
}
data = Arrays.copyOfRange(data,varInt.length, data.length);
String dataString = "";
String dataString;
try{
dataString = new String(data, StandardCharsets.UTF_8);
}catch (UnsupportedCharsetException exception) {
banPlayer(user, player);
return;
}
JsonArray array = new JsonArray();
JsonArray array;
try {
array = new JsonParser().parse(dataString).getAsJsonArray();
}catch (JsonSyntaxException exception) {
banPlayer(user, player);
return;
}
for(JsonElement mod : array) {