mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-11-14 10:55:20 +01:00
Fix NPE
This commit is contained in:
parent
152b9db80f
commit
2334f6c5c9
@ -47,7 +47,8 @@ public abstract class LegacyBlockItemRewriter<T extends BackwardsProtocol> exten
|
||||
JsonPrimitive jsonData = object.getAsJsonPrimitive("data");
|
||||
short data = jsonData != null ? jsonData.getAsShort() : 0;
|
||||
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("-")) {
|
||||
// Range of ids
|
||||
|
Loading…
Reference in New Issue
Block a user