Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (e.getClickedInventory().getTitle().equals("§b§lSchwerter")) {
- e.setCancelled(true);
- if (e.getCurrentItem().getType() == Material.IRON_SWORD) {
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§aNormales-Schwert")) {
- if (TokenAPI.getBalance(p) >= 500) {
- TokenAPI.takeBalance(p, 500);
- ItemStack ironschwert1 = new ItemStack(Material.IRON_SWORD);
- ItemMeta ironschwert1Meta = ironschwert1.getItemMeta();
- ironschwert1Meta.setDisplayName("§aNormales-Schwert");
- ironschwert1.setItemMeta(ironschwert1Meta);
- p.getInventory().addItem(ironschwert1);
- p.playSound(p.getLocation(), Sound.LEVEL_UP, 2F, 1F);
- p.sendMessage(Main.Prefix + "§aDu hast dir erfolgreich das §aNormale-Schwert §agekauft!");
- p.closeInventory();
- } else {
- p.sendMessage(Main.Prefix + "§cDu hast nicht genug Tokens! Du benötigst §a500-Tokens §cdafür!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement