use of org.bukkit.craftbukkit.v1_16_R3.inventory.CraftInventoryPlayer in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayer_v1_10_R1 method setInventory.
@Override
public void setInventory(org.bukkit.inventory.PlayerInventory inventory) {
CraftInventoryPlayer inv = (CraftInventoryPlayer) inventory;
NBTTagCompound nbtTagCompound = ((CompoundTag_v1_10_R1) compound).toNMSTag();
nbtTagCompound.set("Inventory", inv.getInventory().a(new NBTTagList()));
this.compound = CompoundTag_v1_10_R1.fromNMSTag(nbtTagCompound);
if (this.autosave) {
savePlayerData();
}
}
use of org.bukkit.craftbukkit.v1_16_R3.inventory.CraftInventoryPlayer in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayerImpl method setInventory.
@Override
public void setInventory(org.bukkit.inventory.PlayerInventory inventory) {
CraftInventoryPlayer inv = (CraftInventoryPlayer) inventory;
net.minecraft.nbt.CompoundTag nbtTagCompound = ((CompoundTagImpl) compound).toNMSTag();
nbtTagCompound.put("Inventory", inv.getInventory().save(new ListTag()));
this.compound = CompoundTagImpl.fromNMSTag(nbtTagCompound);
if (this.autosave) {
savePlayerData();
}
}
Aggregations