Custom Damage with lore

Discussion in 'Plugin Development' started by nbkburns, Jun 29, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    nbkburns

    hello i want to know if its possible to have custom damage that is from the lore of the weapon

    -Nbk, Thanks
     
  2. Offline

    JeroenV

    Code:
        @EventHandler
        public void onAtt(EntityDamageByEntityEvent e){
        Entity attacker = e.getDamager();
        Entity defender = e.getEntity();
     
            if(attacker instanceof LivingEntity && defender instanceof LivingEntity){
                EntityEquipment ee = ((LivingEntity) attacker).getEquipment();
                ItemStack it = ee.getItemInHand();
             
                if(it != null && it.getItemMeta() != null &&){
            //int attackvalue = Integer.parseInt(itemlore.toString().replace("unwantedthings ",""));
                    }         
            }
         
        }
     
Thread Status:
Not open for further replies.

Share This Page