mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-01 04:51:29 +01:00
BungeeCordProxy: skip if the name is not textures or the value & signature does not exist (#1127)
This commit is contained in:
parent
7b8445d0e2
commit
a4f392d116
@ -8,7 +8,7 @@ import net.minestom.server.entity.PlayerSkin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* BungeeCord forwarding support. This does not count as a security feature and you will still be required to manage your firewall.
|
||||
* BungeeCord forwarding support. This does not count as a security feature, and you will still be required to manage your firewall.
|
||||
* <p>
|
||||
* Please consider using {@link net.minestom.server.extras.velocity.VelocityProxy} instead.
|
||||
*/
|
||||
@ -39,15 +39,15 @@ public final class BungeeCordProxy {
|
||||
|
||||
for (JsonElement element : array) {
|
||||
JsonObject jsonObject = element.getAsJsonObject();
|
||||
final String name = jsonObject.get("name").getAsString();
|
||||
final String value = jsonObject.get("value").getAsString();
|
||||
final String signature = jsonObject.get("signature").getAsString();
|
||||
JsonElement name = jsonObject.get("name");
|
||||
if (name == null || !name.getAsString().equals("textures")) continue;
|
||||
|
||||
if (name.equals("textures")) {
|
||||
skinTexture = value;
|
||||
skinSignature = signature;
|
||||
}
|
||||
JsonElement value = jsonObject.get("value");
|
||||
JsonElement signature = jsonObject.get("signature");
|
||||
if (value == null || signature == null) continue;
|
||||
|
||||
skinTexture = value.getAsString();
|
||||
skinSignature = signature.getAsString();
|
||||
}
|
||||
|
||||
if (skinTexture != null && skinSignature != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user