Search in sources :

Example 1 with CraftInventoryPlayer

use of org.bukkit.craftbukkit.v1_11_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();
    }
}
Also used : CraftInventoryPlayer(org.bukkit.craftbukkit.v1_11_R1.inventory.CraftInventoryPlayer) CompoundTag_v1_11_R1(net.aufdemrand.denizen.nms.impl.jnbt.CompoundTag_v1_11_R1)

Example 2 with CraftInventoryPlayer

use of org.bukkit.craftbukkit.v1_11_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();
    }
}
Also used : CompoundTag_v1_9_R2(net.aufdemrand.denizen.nms.impl.jnbt.CompoundTag_v1_9_R2) CraftInventoryPlayer(org.bukkit.craftbukkit.v1_9_R2.inventory.CraftInventoryPlayer)

Example 3 with CraftInventoryPlayer

use of org.bukkit.craftbukkit.v1_11_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();
    }
}
Also used : CompoundTag_v1_8_R3(net.aufdemrand.denizen.nms.impl.jnbt.CompoundTag_v1_8_R3) CraftInventoryPlayer(org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryPlayer)

Example 4 with CraftInventoryPlayer

use of org.bukkit.craftbukkit.v1_11_R1.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();
    }
}
Also used : CraftInventoryPlayer(org.bukkit.craftbukkit.v1_10_R1.inventory.CraftInventoryPlayer) CompoundTag_v1_10_R1(net.aufdemrand.denizen.nms.impl.jnbt.CompoundTag_v1_10_R1)

Aggregations

CompoundTag_v1_10_R1 (net.aufdemrand.denizen.nms.impl.jnbt.CompoundTag_v1_10_R1)1 CompoundTag_v1_11_R1 (net.aufdemrand.denizen.nms.impl.jnbt.CompoundTag_v1_11_R1)1 CompoundTag_v1_8_R3 (net.aufdemrand.denizen.nms.impl.jnbt.CompoundTag_v1_8_R3)1 CompoundTag_v1_9_R2 (net.aufdemrand.denizen.nms.impl.jnbt.CompoundTag_v1_9_R2)1 CraftInventoryPlayer (org.bukkit.craftbukkit.v1_10_R1.inventory.CraftInventoryPlayer)1 CraftInventoryPlayer (org.bukkit.craftbukkit.v1_11_R1.inventory.CraftInventoryPlayer)1 CraftInventoryPlayer (org.bukkit.craftbukkit.v1_8_R3.inventory.CraftInventoryPlayer)1 CraftInventoryPlayer (org.bukkit.craftbukkit.v1_9_R2.inventory.CraftInventoryPlayer)1