use of org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryPlayer in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayer_v1_9_R2 method setInventory.
@Override
public void setInventory(org.bukkit.inventory.PlayerInventory inventory) {
CraftInventoryPlayer inv = (CraftInventoryPlayer) inventory;
NBTTagCompound nbtTagCompound = ((CompoundTag_v1_9_R2) compound).toNMSTag();
nbtTagCompound.set("Inventory", inv.getInventory().a(new NBTTagList()));
this.compound = CompoundTag_v1_9_R2.fromNMSTag(nbtTagCompound);
if (this.autosave) {
savePlayerData();
}
}
use of org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryPlayer in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayer_v1_11_R1 method setInventory.
@Override
public void setInventory(org.bukkit.inventory.PlayerInventory inventory) {
CraftInventoryPlayer inv = (CraftInventoryPlayer) inventory;
NBTTagCompound nbtTagCompound = ((CompoundTag_v1_11_R1) compound).toNMSTag();
nbtTagCompound.set("Inventory", inv.getInventory().a(new NBTTagList()));
this.compound = CompoundTag_v1_11_R1.fromNMSTag(nbtTagCompound);
if (this.autosave) {
savePlayerData();
}
}
use of org.bukkit.craftbukkit.v1_17_R1.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;
NBTTagCompound nbtTagCompound = ((CompoundTagImpl) compound).toNMSTag();
nbtTagCompound.set("Inventory", inv.getInventory().a(new NBTTagList()));
this.compound = CompoundTagImpl.fromNMSTag(nbtTagCompound);
if (this.autosave) {
savePlayerData();
}
}
use of org.bukkit.craftbukkit.v1_17_R1.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();
}
}
use of org.bukkit.craftbukkit.v1_17_R1.inventory.CraftInventoryPlayer in project Denizen-For-Bukkit by DenizenScript.
the class ImprovedOfflinePlayer_v1_8_R3 method setInventory.
@Override
public void setInventory(org.bukkit.inventory.PlayerInventory inventory) {
CraftInventoryPlayer inv = (CraftInventoryPlayer) inventory;
NBTTagCompound nbtTagCompound = ((CompoundTag_v1_8_R3) compound).toNMSTag();
nbtTagCompound.set("Inventory", inv.getInventory().a(new NBTTagList()));
this.compound = CompoundTag_v1_8_R3.fromNMSTag(nbtTagCompound);
if (this.autosave) {
savePlayerData();
}
}
Aggregations