Fixed a jumper perk.

This commit is contained in:
Mysticate 2015-09-28 21:03:58 -04:00
parent bcfd8fcec7
commit 2d173a5be4

View File

@ -7,7 +7,6 @@ import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.kit.Perk;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@ -29,10 +28,14 @@ public class PerkJumpsDisplay extends Perk
if (!Kit.HasKit(player))
continue;
if (player.getInventory().getItem(8) == null || player.getInventory().getItem(8).getType() != Material.FEATHER || player.getInventory().getItem(8).getAmount() < 0)
continue;
UtilTextBottom.display(F.elem(player.getInventory().getItem(8).getAmount() + "") + C.cWhite + " jumps left", player);
if (player.getInventory().getItem(8) == null || player.getInventory().getItem(8).getAmount() <= 0)
{
UtilTextBottom.display(C.cWhite + "No jumps left", player);
}
else
{
UtilTextBottom.display(F.elem(player.getInventory().getItem(8).getAmount() + "") + C.cWhite + " jumps left", player);
}
}
}
}