mirror of
https://github.com/Minestom/Minestom.git
synced 2024-09-25 21:22:44 +02: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;
|
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>
|
* <p>
|
||||||
* Please consider using {@link net.minestom.server.extras.velocity.VelocityProxy} instead.
|
* Please consider using {@link net.minestom.server.extras.velocity.VelocityProxy} instead.
|
||||||
*/
|
*/
|
||||||
@ -39,15 +39,15 @@ public final class BungeeCordProxy {
|
|||||||
|
|
||||||
for (JsonElement element : array) {
|
for (JsonElement element : array) {
|
||||||
JsonObject jsonObject = element.getAsJsonObject();
|
JsonObject jsonObject = element.getAsJsonObject();
|
||||||
final String name = jsonObject.get("name").getAsString();
|
JsonElement name = jsonObject.get("name");
|
||||||
final String value = jsonObject.get("value").getAsString();
|
if (name == null || !name.getAsString().equals("textures")) continue;
|
||||||
final String signature = jsonObject.get("signature").getAsString();
|
|
||||||
|
|
||||||
if (name.equals("textures")) {
|
JsonElement value = jsonObject.get("value");
|
||||||
skinTexture = value;
|
JsonElement signature = jsonObject.get("signature");
|
||||||
skinSignature = signature;
|
if (value == null || signature == null) continue;
|
||||||
}
|
|
||||||
|
|
||||||
|
skinTexture = value.getAsString();
|
||||||
|
skinSignature = signature.getAsString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skinTexture != null && skinSignature != null) {
|
if (skinTexture != null && skinSignature != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user