mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-30 14:43:49 +01:00
Fixes horse and similar pasting from files
https://github.com/BentoBoxWorld/BentoBox/issues/532
This commit is contained in:
parent
f64968c7c7
commit
d17d19d5d3
@ -382,11 +382,15 @@ public class Clipboard {
|
||||
}
|
||||
}
|
||||
if (e instanceof AbstractHorse) {
|
||||
Horse horse = (Horse)e;
|
||||
AbstractHorse horse = (AbstractHorse)e;
|
||||
horse.setDomestication(ent.getInt("domestication"));
|
||||
ConfigurationSection inv = ent.getConfigurationSection(INVENTORY);
|
||||
inv.getKeys(false).forEach(i -> horse.getInventory().setItem(Integer.valueOf(i), (ItemStack)inv.get(i)));
|
||||
horse.setStyle(Horse.Style.valueOf(ent.getString("style", "NONE")));
|
||||
if (ent.isConfigurationSection(INVENTORY)) {
|
||||
ConfigurationSection inv = ent.getConfigurationSection(INVENTORY);
|
||||
inv.getKeys(false).forEach(i -> horse.getInventory().setItem(Integer.valueOf(i), (ItemStack)inv.get(i)));
|
||||
}
|
||||
}
|
||||
if (e instanceof Horse) {
|
||||
((Horse)e).setStyle(Horse.Style.valueOf(ent.getString("style", "NONE")));
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user