Esempio n. 1
0
 public void SetTypeId(int type)
 {
     this.type = type;
     if (this.meta != null)
     {
         this.meta = Bukkit.ItemFactory.asMetaFor(meta, GetType0());
     }
     CreateData((byte)0);
 }
Esempio n. 2
0
        private bool SetItemMeta0(IItemMeta itemMeta, Material material)
        {
            if (itemMeta == null)
            {
                this.meta = null;
                return(true);
            }
            if (!Bukkit.ItemFactory.IsApplicable(itemMeta, material))
            {
                return(false);
            }
            this.meta = Bukkit.ItemFactory.AsMetaFor(itemMeta, material);
            if (this.meta == itemMeta)
            {
                this.meta = itemMeta.Clone();
            }

            return(true);
        }
Esempio n. 3
0
 public bool SetItemMeta(IItemMeta itemMeta)
 {
     return(SetItemMeta0(itemMeta, GetType0()));
 }
Esempio n. 4
0
 public void AddUnsafeEnchantment(Enchantment ench, int level)
 {
     (meta == null ? meta = Bukkit.ItemFactory.GetItemMeta(GetType0()) : meta).AddEnchant(ench, level, true);
 }