Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onSoup(PlayerInteractEvent e) {
- Player player = e.getPlayer();
- if(e.getAction().equals(Action.RIGHT_CLICK_AIR) || e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
- if(player.getItemInHand().getType() == Material.MUSHROOM_SOUP) {
- if(player.getHealthScale() > 13) {
- player.setHealth(20);
- player.getItemInHand().setType(Material.BOWL);
- }else{
- player.setHealth(player.getHealthScale() + 7);
- player.getItemInHand().setType(Material.BOWL);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement