Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.tylercreator.guichunk.listener;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.inventory.InventoryClickEvent;
- import me.tylercreator.guichunk.Main;
- import me.tylercreator.guichunk.ui.gui;
- public class ClickListener implements Listener {
- private Main plugin;
- public ClickListener(Main plugin) {
- this.plugin = plugin;
- }
- @EventHandler
- public void onClick(InventoryClickEvent e) {
- String title = e.getInventory().getTitle();
- if (title.equals(gui.inventory_name)) {
- e.setCancelled(true);
- if (e.getCurrentItem() == null) {
- return;
- }
- if (title.equals(gui.inventory_name)) {
- gui.clicked((Player) e.getWhoClicked(), e.getSlot(), e.getCurrentItem(), e.getInventory());
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement