Solved Change weapon damage

Discussion in 'Plugin Development' started by bc112354, Jun 27, 2014.

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

    bc112354

    How do I, if X player has X permission, make it so X weapons damage is increased by X?
     
  2. bc112354 Use a EntityDamageByEntityEvent
    We are NOT going to give you code. Search google/this forums.
     
  3. Code:java
    1. if(p.hasPermission("weapon.damage") {
    2. if(p.getItemInHand() != null) {
    3. if(p.getItemInHand().getType() == Material.IRON_SWORD) {
    4. e.setDamage(e.getDamage() * 2);
    5. }
    6. }
    7. }


    EDIT: You really do need to do your own work, as HeyAwesomePeople said.
     
  4. Offline

    bc112354

    HeyAwesomePeople Im_Zeus I was just looking for the method, I was searching through the event and not the player class
     
Thread Status:
Not open for further replies.

Share This Page