Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.paauum.holly.add.eventosecomandos;
- import java.util.Arrays;
- import java.util.ArrayList;
- import org.bukkit.Bukkit;
- import org.bukkit.Material;
- import org.bukkit.Sound;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandExecutor;
- import org.bukkit.command.CommandSender;
- import org.bukkit.enchantments.Enchantment;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.inventory.InventoryClickEvent;
- import org.bukkit.inventory.Inventory;
- import org.bukkit.inventory.InventoryHolder;
- import org.bukkit.inventory.ItemStack;
- import org.bukkit.inventory.meta.ItemMeta;
- import api.CriarD;
- import api.JSONMessage;
- import api.JSONMessage.ClickAction;
- import api.JSONMessage.HoverAction;
- import me.paauum.CashAPI;
- import me.paauum.holly.eventos.BauEvento;
- import net.md_5.bungee.api.ChatColor;
- public class Shop implements Listener, CommandExecutor {
- @Override
- public boolean onCommand(CommandSender sender, Command cmd, String arg1, String[] args) {
- if (!(sender instanceof Player)) {
- sender.sendMessage("§cApenas jogadores podem executar os comandos.");
- return false;
- }
- Player p = (Player) sender;
- if (cmd.getName().equalsIgnoreCase("shop")) {
- ShopMenu(p);
- }
- return false;
- }
- public void ShopMenu(Player p) {
- final Inventory inv = Bukkit.getServer().createInventory((InventoryHolder)p, 6 * 9, "SHOP");
- final ItemStack cabeça = new ItemStack(CriarD.getNamedSkull(p.getName(), "§a"));
- final ItemMeta cabeçaMeta = cabeça.getItemMeta();
- cabeçaMeta.setDisplayName("§6Informações de §f" + p.getName());
- cabeçaMeta.setLore(Arrays.asList("§1",
- "§eSaldo atual em Cash: §f" + CashAPI.format(CashAPI.getCoins(p.getName())),
- "§2", "§e* §7Com Cash você poderá adquirir vários",
- "§7itens em nosso Shop.", "§4"));
- cabeça.setItemMeta(cabeçaMeta);
- inv.setItem(4, cabeça);
- final ItemStack vidro = new ItemStack(CriarD.add(Material.STAINED_GLASS_PANE, 1, 15));
- final ItemMeta vidrom = vidro.getItemMeta();
- vidrom.addEnchant(Enchantment.DURABILITY, 1, false);
- vidrom.setDisplayName("§6Morg");
- vidro.setItemMeta(vidrom);
- inv.setItem(0, vidro);
- inv.setItem(1, vidro);
- inv.setItem(9, vidro);
- inv.setItem(8, vidro);
- inv.setItem(7, vidro);
- inv.setItem(9, vidro);
- inv.setItem(17, vidro);
- inv.setItem(36, vidro);
- inv.setItem(44, vidro);
- inv.setItem(46, vidro);
- inv.setItem(45, vidro);
- inv.setItem(52, vidro);
- inv.setItem(53, vidro);
- final ItemStack info = new ItemStack(CriarD.add(Material.BOOK_AND_QUILL, "§eComo adquirir §6§lCASH§e?", new String[]
- { "§1", "§ePara adquirir §6§lCASH§e, basta ir em nossa", "§eloja: §fhttps://galaxynetwork.lojasquare.com.br §ee comprar.", "§2 "} ));
- final ItemMeta infom = info.getItemMeta();
- info.setItemMeta(infom);
- inv.setItem(49, info);
- final ItemStack caixas = new ItemStack(Material.ENDER_CHEST);
- final ItemMeta caixasm = caixas.getItemMeta();
- caixasm.setDisplayName("§5§lCAIXAS MISTERIOSAS");
- ArrayList<String> lore = new ArrayList();
- lore.add("");
- lore.add("§eClique aqui apara adquirir caixas misteriosas");
- lore.add("§eutilizando seu saldo de §6§lCASH");
- lore.add("");
- lore.add("§eSeu saldo de cash atual: §f" + CashAPI.format(CashAPI.getCoins(p.getName())));
- caixasm.setLore(lore);
- caixas.setItemMeta(caixasm);
- inv.setItem(20, caixas);
- }
- public void ShopMEspeciais(Player p) {
- final Inventory inv8 = Bukkit.getServer().createInventory((InventoryHolder)p, 4 * 9, "SHOP - ESPECIAIS");
- final ItemStack cabeça8 = new ItemStack(CriarD.getNamedSkull(p.getName(), "§a"));
- final ItemMeta cabeça8Meta = cabeça8.getItemMeta();
- cabeça8Meta.setDisplayName("§eInformações de §f" + p.getName());
- cabeça8Meta.setLore(Arrays.asList("§1",
- "§eSaldo atual em Cash: §f" + CashAPI.format(CashAPI.getCoins(p.getName())),
- "§4"));
- cabeça8.setItemMeta(cabeça8Meta);
- inv8.setItem(18, cabeça8);
- final ItemStack voltar08 = new ItemStack(CriarD.add(Material.ARROW, "§cVoltar.", new String [] { "§1 ",
- "§7Clique para voltar.",
- "§1 "} ));
- final ItemMeta voltar08m = voltar08.getItemMeta();
- voltar08.setItemMeta(voltar08m);
- inv8.setItem(27, voltar08);
- final ItemStack lancador = new ItemStack(CriarD.add(Material.FIREWORK, "§eLançador", new String [] { "§1", "§7 Utilize este item para obter",
- "§7um impulso para onde estiver olhando.",
- "§2", "§eCusto§f: 3 Cash", "§3", "§aClique para adquirir este produto."} ));
- final ItemMeta lancadorm = lancador.getItemMeta();
- lancador.setItemMeta(lancadorm);
- inv8.setItem(11, lancador);
- final ItemStack voar = new ItemStack(CriarD.add(Material.FEATHER, "§eVoar", new String [] { "§1",
- "§7 Utilizando este item você poderá",
- "§7obter um vôo eternamente.",
- "§2", "§eCusto§f: 2 Cash", "§2", "§aClique para adquirir este produto."} ));
- final ItemMeta voarm = voar.getItemMeta();
- voar.setItemMeta(voarm);
- inv8.setItem(12, voar);
- final ItemStack corchat = new ItemStack(CriarD.add(Material.SUGAR, "§eCor em chat's", new String [] { "§1",
- "§7 Utilize este item para obter acesso",
- "§7á uma escrita colorida em chat's.",
- "§2", "§eCusto§f: 2 Cash", "§2", "§aClique para adquirir este produto."} ));
- final ItemMeta corchatm = corchat.getItemMeta();
- corchat.setItemMeta(corchatm);
- inv8.setItem(13, corchat);
- final ItemStack b = new ItemStack(CriarD.add(Material.CHEST, "§eBaú virtual.", new String [] { "§1",
- "§7 Use este item para obter um novo",
- "§eBaú virtual§7.",
- "§5", "§eCusto§f: 5 Cash", "§5", "§aClique para adquirir este produto."} ));
- final ItemMeta bm = b.getItemMeta();
- b.setItemMeta(bm);
- inv8.setItem(14, b);
- p.openInventory(inv8);
- }
- public void CaixaMenu(Player p ) {
- final Inventory inv3 = Bukkit.getServer().createInventory((InventoryHolder)p, 4 * 9, "SHOP - CAIXAS MISTERIOSAS");
- final ItemStack cabeça = new ItemStack(CriarD.getNamedSkull(p.getName(), "§a"));
- final ItemMeta cabeçaMeta = cabeça.getItemMeta();
- cabeçaMeta.setDisplayName("§6Informações de §f" + p.getName());
- cabeçaMeta.setLore(Arrays.asList("§1",
- "§eSaldo atual em Cash: §f" + CashAPI.format(CashAPI.getCoins(p.getName())),
- "§2", "§e* §7Com Cash você poderá adquirir vários",
- "§7itens em nosso Shop.", "§4"));
- cabeça.setItemMeta(cabeçaMeta);
- inv3.setItem(18, cabeça);
- final ItemStack caixab = new ItemStack(Material.CHEST);
- final ItemMeta caixabm = caixab.getItemMeta();
- caixabm.setDisplayName("§eCaixa Básica");
- ArrayList<String> lore = new ArrayList();
- lore.add("");
- lore.add("§7Clique aqui para adquirir a Caixa Básica (1x)");
- lore.add("§7Custo: §6250 cash");
- lore.add("");
- caixabm.setLore(lore);
- caixab.setItemMeta(caixabm);
- inv3.setItem(11, caixab);
- final ItemStack caixar = new ItemStack(Material.ENDER_CHEST);
- final ItemMeta caixarm = caixar.getItemMeta();
- caixarm.setDisplayName("§5Caixa Rara");
- ArrayList<String> lore2 = new ArrayList();
- lore2.add("");
- lore2.add("§7Clique aqui para adquirir a Caixa Rara (1x)");
- lore2.add("§7Custo: §6350 cash");
- lore2.add("");
- caixarm.setLore(lore2);
- caixar.setItemMeta(caixarm);
- inv3.setItem(13, caixar);
- final ItemStack caixaa = new ItemStack(Material.ENCHANTMENT_TABLE);
- final ItemMeta caixaam = caixaa.getItemMeta();
- caixaam.setDisplayName("§6Caixa Avançada");
- ArrayList<String> lore3 = new ArrayList();
- lore3.add("");
- lore3.add("§7Clique aqui para adquirir a Caixa Avançada (1x)");
- lore3.add("§7Custo: §6550 cash");
- lore3.add("");
- caixaam.setLore(lore3);
- caixaa.setItemMeta(caixaam);
- inv3.setItem(15, caixaa);
- final ItemStack retornar = new ItemStack(Material.ARROW);
- final ItemMeta retornarm = retornar.getItemMeta();
- retornarm.setDisplayName("§cRetornar");
- retornarm.setLore(Arrays.asList("§1",
- "§7Clique aqui para retornar ao menu principal",
- ""));
- retornar.setItemMeta(retornarm);
- inv3.setItem(27, retornar);
- p.openInventory(inv3);
- }
- @EventHandler
- public void onClickCaixas(final InventoryClickEvent e) {
- final Player p = (Player)e.getWhoClicked();
- if(e.getCurrentItem() == null) {
- return;
- }
- if(!e.getCurrentItem().hasItemMeta()) {
- return;
- }
- if(e.getInventory().getTitle().equalsIgnoreCase("SHOP - CAIXAS MISTERIOSAS")) {
- e.setCancelled(true);
- if(e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eCaixa Básica")) {
- if(CashAPI.getCoins(p.getName()).doubleValue() < 250.0) {
- p.sendMessage("§cVocê precisa de 250 de cash para adquirir este produto");
- return;
- }
- CashAPI.removeCoins(p.getName(), 250.0);
- p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 10.0f, 10.0f);
- Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "givecaixa 01 1 " + p.getName());
- for (Player on : Bukkit.getServer().getOnlinePlayers()) {
- JSONMessage json = new JSONMessage();
- on.sendMessage("§f ");
- on.playSound(on.getLocation(), Sound.EXPLODE, 1.0f, 15.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 5.0f, 10.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 10.0f, 5.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 15.0f, 1.0f);
- json.addText(ChatColor.RED + " [§c§l!§c] " + ChatColor.YELLOW + "O player " + p.getName() +
- ChatColor.YELLOW + " adquiriu uma ")
- .addText("§6§lCAIXA MISTERIOSA")
- .withHoverAction(HoverAction.SHOW_TEXT, "§eItem: '§fCaixa Básica x1§e'.")
- .addText(ChatColor.YELLOW + " no ").addText("§6§lSHOP").withClickAction(ClickAction.RUN_COMMAND,
- "/shop").withHoverAction(HoverAction.SHOW_TEXT, ChatColor.YELLOW +
- "Clique para acessar o §6§lSHOP").addText("§e.");
- json.sendJson(on);
- on.sendMessage("§f ");
- }
- }
- if(e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§5Caixa Rara")) {
- if(CashAPI.getCoins(p.getName()).doubleValue() < 350.0) {
- p.sendMessage("§cVocê precisa de 350 de cash para adquirir este produto");
- return;
- }
- CashAPI.removeCoins(p.getName(), 350.0);
- p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 10.0f, 10.0f);
- Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "givecaixa 02 1 " + p.getName());
- for (Player on : Bukkit.getServer().getOnlinePlayers()) {
- JSONMessage json = new JSONMessage();
- on.sendMessage("§f ");
- on.playSound(on.getLocation(), Sound.EXPLODE, 1.0f, 15.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 5.0f, 10.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 10.0f, 5.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 15.0f, 1.0f);
- json.addText(ChatColor.RED + " [§c§l!§c] " + ChatColor.YELLOW + "O player " + p.getName() +
- ChatColor.YELLOW + " adquiriu uma ")
- .addText("§6§lCAIXA MISTERIOSA")
- .withHoverAction(HoverAction.SHOW_TEXT, "§eItem: '§fCaixa Rara x1§e'.")
- .addText(ChatColor.YELLOW + " no ").addText("§6§lSHOP").withClickAction(ClickAction.RUN_COMMAND,
- "/shop").withHoverAction(HoverAction.SHOW_TEXT, ChatColor.YELLOW +
- "Clique para acessar o §6§lSHOP").addText("§e.");
- json.sendJson(on);
- on.sendMessage("§f ");
- }
- }
- if(e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6Caixa Avançada")) {
- if(CashAPI.getCoins(p.getName()).doubleValue() < 550.0) {
- p.sendMessage("§cVocê precisa de 550 de cash para adquirir este produto");
- return;
- }
- CashAPI.removeCoins(p.getName(), 550.0);
- p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 10.0f, 10.0f);
- Bukkit.dispatchCommand((CommandSender)Bukkit.getConsoleSender(), "givecaixa 03 1 " + p.getName());
- for (Player on : Bukkit.getServer().getOnlinePlayers()) {
- JSONMessage json = new JSONMessage();
- on.sendMessage("§f ");
- on.playSound(on.getLocation(), Sound.EXPLODE, 1.0f, 15.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 5.0f, 10.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 10.0f, 5.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 15.0f, 1.0f);
- json.addText(ChatColor.RED + " [§c§l!§c] " + ChatColor.YELLOW + "O player " + p.getName() +
- ChatColor.YELLOW + " adquiriu uma ")
- .addText("§6§lCAIXA MISTERIOSA")
- .withHoverAction(HoverAction.SHOW_TEXT, "§eItem: '§fCaixa Avançada x1§e'.")
- .addText(ChatColor.YELLOW + " no ").addText("§6§lSHOP").withClickAction(ClickAction.RUN_COMMAND,
- "/shop").withHoverAction(HoverAction.SHOW_TEXT, ChatColor.YELLOW +
- "Clique para acessar o §6§lSHOP").addText("§e.");
- json.sendJson(on);
- on.sendMessage("§f ");
- }
- }
- if(e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§cRetornar")) {
- p.playSound(p.getLocation(), Sound.VILLAGER_NO, 10.0f, 10.0f);
- ShopMenu(p);
- return;
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eInformações de §f" + p.getName())) {
- p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 10.0f, 10.0f);
- return;
- }
- }
- }
- @EventHandler
- public void onPlayerClickInventory6(final InventoryClickEvent e) {
- final Player p = (Player)e.getWhoClicked();
- if (e.getCurrentItem() == null) {
- return;
- }
- if (!e.getCurrentItem().hasItemMeta()) {
- return;
- }
- if (e.getInventory().getTitle().equalsIgnoreCase("SHOP - ESPECIAIS")) {
- e.setCancelled(true);
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eInformações de §f" + p.getName())) {
- p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 10.0f, 10.0f);
- return;
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§cVoltar.")) {
- p.playSound(p.getLocation(), Sound.VILLAGER_NO, 10.0f, 10.0f);
- ShopMenu(p);
- return;
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eLançador")) {
- {
- if (CashAPI.getCoins(p.getName()).doubleValue() < 3.0)
- {
- p.sendMessage("§cVocê precisa de 3 cash para adquirir este produto.");
- return;
- }
- CashAPI.removeCoins(p.getName(), 3.0);
- p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 10.0f, 10.0f);
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- p.getInventory().addItem(EventosR.getItem());
- for (Player on : Bukkit.getServer().getOnlinePlayers()) {
- JSONMessage json = new JSONMessage();
- on.sendMessage("§f ");
- on.playSound(on.getLocation(), Sound.EXPLODE, 1.0f, 15.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 5.0f, 10.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 10.0f, 5.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 15.0f, 1.0f);
- json.addText(ChatColor.RED + " [§c§l!§c] " + ChatColor.YELLOW + "O player " + p.getName() +
- ChatColor.YELLOW + " adquiriu um ")
- .addText("§e§lITEM ESPECIAL")
- .withHoverAction(HoverAction.SHOW_TEXT, "§eItem: '§6Lançador x1§e'.")
- .addText(ChatColor.YELLOW + " no ").addText("§6§lSHOP").withClickAction(ClickAction.RUN_COMMAND,
- "/shop").withHoverAction(HoverAction.SHOW_TEXT, ChatColor.YELLOW +
- "Clique para acessar o §6§lSHOP").addText("§e.");
- json.sendJson(on);
- on.sendMessage("§f ");
- }
- }
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eCor em chat's")) {
- {
- if (CashAPI.getCoins(p.getName()).doubleValue() < 2.0)
- {
- p.sendMessage("§cVocê precisa de 2 cash para adquirir este produto.");
- return;
- }
- CashAPI.removeCoins(p.getName(), 2.0);
- p.playSound(p.getLocation(), Sound.VILLAGER_YES, 10.0f, 10.0f);
- p.getInventory().addItem(EventosR.getCorChat());
- for (Player on : Bukkit.getServer().getOnlinePlayers()) {
- JSONMessage json = new JSONMessage();
- on.sendMessage("§f ");
- on.playSound(on.getLocation(), Sound.EXPLODE, 1.0f, 15.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 5.0f, 10.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 10.0f, 5.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 15.0f, 1.0f);
- json.addText(ChatColor.RED + " [§c§l!§c] " + ChatColor.YELLOW + "O player " + p.getName() +
- ChatColor.YELLOW + " adquiriu um ")
- .addText("§e§lITEM ESPECIAL")
- .withHoverAction(HoverAction.SHOW_TEXT, "§eItem: '§6Cor em chat's x1§e'.")
- .addText(ChatColor.YELLOW + " no ").addText("§6§lSHOP").withClickAction(ClickAction.RUN_COMMAND,
- "/shop").withHoverAction(HoverAction.SHOW_TEXT, ChatColor.YELLOW +
- "Clique para acessar o §6§lSHOP").addText("§e.");
- json.sendJson(on);
- on.sendMessage("§f ");
- }
- return;
- }
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eVoar")) {
- {
- if (CashAPI.getCoins(p.getName()).doubleValue() < 2.0)
- {
- p.sendMessage("§cVocê precisa de 2 cash para adquirir este produto.");
- return;
- }
- CashAPI.removeCoins(p.getName(), 2.0);
- p.playSound(p.getLocation(), Sound.VILLAGER_YES, 10.0f, 10.0f);
- p.getInventory().addItem(EventosR.getvoar());
- for (Player on : Bukkit.getServer().getOnlinePlayers()) {
- JSONMessage json = new JSONMessage();
- on.sendMessage("§f ");
- on.playSound(on.getLocation(), Sound.EXPLODE, 1.0f, 15.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 5.0f, 10.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 10.0f, 5.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 15.0f, 1.0f);
- json.addText(ChatColor.RED + " [§c§l!§c] " + ChatColor.YELLOW + "O player " + p.getName() +
- ChatColor.YELLOW + " adquiriu um ")
- .addText("§e§lITEM ESPECIAL")
- .withHoverAction(HoverAction.SHOW_TEXT, "§eItem: '§6Voar x1§e'.")
- .addText(ChatColor.YELLOW + " no ").addText("§6§lSHOP").withClickAction(ClickAction.RUN_COMMAND,
- "/shop").withHoverAction(HoverAction.SHOW_TEXT, ChatColor.YELLOW +
- "Clique para acessar o §6§lSHOP").addText("§e.");
- json.sendJson(on);
- on.sendMessage("§f ");
- }
- return;
- }
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eBaú virtual.")) {
- {
- if (CashAPI.getCoins(p.getName()).doubleValue() < 5.0)
- {
- p.sendMessage("§cVocê precisa de 5 cash para adquirir este produto.");
- return;
- }
- p.getInventory().addItem(BauEvento.getBau());
- CashAPI.removeCoins(p.getName(), 5.0);
- p.playSound(p.getLocation(), Sound.LEVEL_UP, 10.0f, 10.0f);
- for (Player on : Bukkit.getServer().getOnlinePlayers()) {
- JSONMessage json = new JSONMessage();
- on.sendMessage("§f ");
- on.playSound(on.getLocation(), Sound.EXPLODE, 1.0f, 15.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 5.0f, 10.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 10.0f, 5.0f);
- on.playSound(on.getLocation(), Sound.EXPLODE, 15.0f, 1.0f);
- json.addText(ChatColor.RED + " [§c§l!§c] " + ChatColor.YELLOW + "O player " + p.getName() +
- ChatColor.YELLOW + " adquiriu um ")
- .addText("§e§lITEM ESPECIAL")
- .withHoverAction(HoverAction.SHOW_TEXT, "§eItem: '§6Baú virtual x1§e'.")
- .addText(ChatColor.YELLOW + " no ").addText("§6§lSHOP").withClickAction(ClickAction.RUN_COMMAND,
- "/shop").withHoverAction(HoverAction.SHOW_TEXT, ChatColor.YELLOW +
- "Clique para acessar o §6§lSHOP").addText("§e.");
- json.sendJson(on);
- on.sendMessage("§f ");
- }
- return;
- }
- }
- }
- if (e.getInventory().getTitle().equalsIgnoreCase("SHOP")) {
- e.setCancelled(true);
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6Informações de §f" + p.getName())) {
- p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 10.0f, 10.0f);
- return;
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§6Morg§fMC")) {
- p.playSound(p.getLocation(), Sound.CHICKEN_EGG_POP, 10.0f, 10.0f);
- return;
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§eComo adquirir §6§lCASH§e?")) {
- p.playSound(p.getLocation(), Sound.EXPLODE, 10.0f, 10.0f);
- return;
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§e§lESPECIAIS")) {
- p.playSound(p.getLocation(), Sound.LEVEL_UP, 10.0f, 10.0f);
- ShopMEspeciais(p);
- return;
- }
- }
- if(e.getCurrentItem().getItemMeta().getDisplayName().equalsIgnoreCase("§5§lCAIXAS MISTERIOSAS")) {
- CaixaMenu(p);
- p.playSound(p.getLocation(), Sound.LEVEL_UP, 10.0f, 10.0f);
- return;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement