Advertisement
Guest User

Untitled

a guest
Oct 6th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. package me.wolfeiii.event.ui;
  2.  
  3. import org.bukkit.Bukkit;
  4. import org.bukkit.entity.Player;
  5. import org.bukkit.inventory.Inventory;
  6. import org.bukkit.inventory.ItemStack;
  7.  
  8. import me.wolfeiii.event.utils.Utils;
  9.  
  10. public class EventUI {
  11.  
  12. public static Inventory inv;
  13. public static String inventory_name;
  14. public static int inv_rows = 4 * 9;
  15.  
  16. public static void initialize() {
  17. inventory_name = Utils.chat("&cEvent GUI");
  18.  
  19. inv = Bukkit.createInventory(null, inv_rows);
  20. }
  21.  
  22. public static Inventory GUI (Player p) {
  23. Inventory toReturn = Bukkit.createInventory(null, inv_rows, inventory_name);
  24.  
  25.  
  26. Utils.createItem(inv, "dirt", 1, 1, "&3Sumo", "&7Sumo event startas om du trycker här!!", "Coolt va?");
  27. Utils.createItem(inv, "WOOL", 1, 13, "&3Red Rover", "test");
  28.  
  29.  
  30. toReturn.setContents(inv.getContents());
  31. return toReturn;
  32. }
  33.  
  34. public static void clicked(Player p, int slot, ItemStack clicked, Inventory inv) {
  35. if (clicked.getItemMeta().getDisplayName().equalsIgnoreCase(Utils.chat("&3Sumo"))) {
  36. p.sendMessage(Utils.chat("&4gg have fun")); //< this is where i want them to teleport instead of it sending a message.
  37. }
  38.  
  39. }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement