Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.Drexful.PAParticles;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.inventory.InventoryClickEvent;
- public class InvEvents implements Listener {
- Main plugin = Main.getInstance();
- @EventHandler
- public void onInvClick(InventoryClickEvent e){
- Player p = (Player) e.getWhoClicked();
- if (e.getInventory().getName() != "§cTrail Selector"){
- return;
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().contains("§c§l[!] §fFlames")){
- e.setCancelled(true);
- plugin.flames.add(p);
- plugin.hearts.remove(p);
- plugin.smoke.remove(p);
- p.sendMessage("§c§l[!] §7You selected the §fFlames§7 trail!");
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().contains("§c§l[!] §fHearts")){
- e.setCancelled(true);
- plugin.hearts.add(p);
- plugin.flames.remove(p);
- plugin.smoke.remove(p);
- p.sendMessage("§c§l[!] §7You selected the §fHeart§7 trail!");
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().contains("§c§l[!] §fSmoke")){
- e.setCancelled(true);
- plugin.smoke.add(p);
- plugin.flames.remove(p);
- plugin.hearts.remove(p);
- p.sendMessage("§c§l[!] §7You selected the §fSmoke§7 trail!");
- }
- if (e.getCurrentItem().getItemMeta().getDisplayName().contains("§c§l[!] §cRemove Current Trail")){
- e.setCancelled(true);
- plugin.smoke.remove(p);
- plugin.flames.remove(p);
- plugin.hearts.remove(p);
- p.sendMessage("§c§l[!] §7You removed your current trail.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement