Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean checkInvSpace(Player p, int amount) {
- int minusa = amount - 1;
- //PointsAPI points = (PointsAPI) Bukkit.getPluginManager().getPlugin("PointsAPI");
- for (int i = 0; i <= p.getInventory().getSize() - 1; i++) {
- if (p.getInventory().firstEmpty() < 0) {
- if (p.getInventory().getItem(i).getType() == Material.EMERALD) {
- if (!p.getInventory().containsAtLeast(new ItemStack(Material.EMERALD), 64 - minusa)) {
- return true;
- /*ItemStack it = new ItemStack(Material.EMERALD, 1);
- points.removePoints(p, 25);
- p.getInventory().addItem(it);
- p.playSound(p.getLocation(), Sound.ORB_PICKUP, 1, 1);
- p.sendMessage(prefix + "§aDu hast §21 §aEmerald für §225 §aPunkte gekauft!");
- break;*/
- } else {
- continue;
- }
- } else {
- p.sendMessage("stome");
- continue;
- }
- } else {
- break;
- }
- }
- return false; //<<-------------------- DAS DA WEG >.<
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement