Enchantment Table Server Selector

Discussion in 'Plugin Development' started by DennisUnplugged, Dec 6, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    DennisUnplugged

    So I've a coded a server selector tool to open a regular GUI and then created a command to also open up that same GUI but I was looking at it thinking that every server all over the world is using the exact same way to allow players select a sub server! Then I was looking at an enchantment table wandering if I could use it as a server selector: the players would put their server selector item (a clock in my case) on the enchantment slot (lapis would already be in there) and then the list with the enchantments would turn into a list with servers allowing players to click on one of those and then being teleported to that server. I tried to make an enchantment GUI but it's steel not clear to me how I'm going to code it so I wanted to ask if there's a way to do it or if it's impossible....?

    Code:
    public class EnchantmentTableGUI{
    
        public static Inventory inv;
        public static String inv_name;
        public static int inv_slots;
    
        public void initialize() {
            inv = Bukkit.createInventory(null, InventoryType.ENCHANTING);
       
            inv.setItem(1, Utils.createItemByte(inv, 351, 4, 1, 2, "&3You need lapis to go to servers...", "&6Not really"));
       
            if (inv.getItem(0) == ItemSelector.stack) {
                //And now it's time for the cool stuff.....?
            }
        }
    
    }
     
  2. Offline

    Chr0mosom3

Thread Status:
Not open for further replies.

Share This Page