Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-12-26 16:12:43 +01:00
Fix NPE
Dieser Commit ist enthalten in:
Ursprung
152b9db80f
Commit
2334f6c5c9
@ -47,7 +47,8 @@ public abstract class LegacyBlockItemRewriter<T extends BackwardsProtocol> exten
|
|||||||
JsonPrimitive jsonData = object.getAsJsonPrimitive("data");
|
JsonPrimitive jsonData = object.getAsJsonPrimitive("data");
|
||||||
short data = jsonData != null ? jsonData.getAsShort() : 0;
|
short data = jsonData != null ? jsonData.getAsShort() : 0;
|
||||||
String name = object.getAsJsonPrimitive("name").getAsString();
|
String name = object.getAsJsonPrimitive("name").getAsString();
|
||||||
boolean block = object.getAsJsonPrimitive("block").getAsBoolean();
|
JsonPrimitive blockField = object.getAsJsonPrimitive("block");
|
||||||
|
boolean block = blockField != null && blockField.getAsBoolean();
|
||||||
|
|
||||||
if (dataEntry.getKey().contains("-")) {
|
if (dataEntry.getKey().contains("-")) {
|
||||||
// Range of ids
|
// Range of ids
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren