mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-22 02:35:21 +01:00
Fix bug with saving mobs in blueprints #2497
This commit is contained in:
parent
86c9a8f47b
commit
dbf4bb75b1
@ -13,7 +13,11 @@ public class ProfessionTypeAdapter extends TypeAdapter<Profession> {
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter out, Profession profession) throws IOException {
|
||||
out.value(profession.name());
|
||||
if (profession != null) {
|
||||
out.value(profession.name());
|
||||
return;
|
||||
}
|
||||
out.nullValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,6 +13,10 @@ public class VillagerTypeAdapter extends TypeAdapter<Villager.Type> {
|
||||
|
||||
@Override
|
||||
public void write(JsonWriter out, Villager.Type type) throws IOException {
|
||||
if (type == null) {
|
||||
out.nullValue();
|
||||
return;
|
||||
}
|
||||
out.value(type.name());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user