mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-16 20:32:29 +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
|
@Override
|
||||||
public void write(JsonWriter out, Profession profession) throws IOException {
|
public void write(JsonWriter out, Profession profession) throws IOException {
|
||||||
out.value(profession.name());
|
if (profession != null) {
|
||||||
|
out.value(profession.name());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
out.nullValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -13,6 +13,10 @@ public class VillagerTypeAdapter extends TypeAdapter<Villager.Type> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(JsonWriter out, Villager.Type type) throws IOException {
|
public void write(JsonWriter out, Villager.Type type) throws IOException {
|
||||||
|
if (type == null) {
|
||||||
|
out.nullValue();
|
||||||
|
return;
|
||||||
|
}
|
||||||
out.value(type.name());
|
out.value(type.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user