hey there, just wondering why it shows this: p.setHealth(20); when using bukkit_1.5.2 and this: p.setHealth(20); when using bukkit_1.6.2 And also: how can I solve this?
This is caused at all setHealth method in my plugin. Here's an example: Code:java @EventHandlerpublic void onInteract(PlayerInteractEvent evt){Player p = evt.getPlayer();if(p.getItemInHand().getTypeId() == Material.POTION.getId(){if(evt.getAction() == Action.LEFT_CLICK_AIR ||evt.getAction() == Action.LEFT_CLICK_BLOCK){p.getWorld().playEffect(p.getLocation(), Effect.POTION_BREAK, 1);p.setHealth(20);}}} Error: 'The method setHealth(int) from the type Damageable is deprecated' This only occures whenvusing 1.6 and not when using 1.5