Plugin Help Gui Help

Discussion in 'Plugin Help/Development/Requests' started by jamesd5, Dec 10, 2017.

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

    jamesd5

    I have recently been using ServerSelectorX. I have been making a gui with a special command. However, when the command is used nothing happens. This is what is in the console. How can it be fixed?

    Code:
    10.12 11:11:45 [Server] INFO ... 3 more
    
    10.12 11:11:45 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
    
    10.12 11:11:45 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
    
    10.12 11:11:45 [Server] INFO at xyz.derkades.serverselectorx.SelectorMenu$1.run(SelectorMenu.java:181)
    
    10.12 11:11:45 [Server] INFO Caused by: java.lang.NullPointerException
    
    10.12 11:11:45 [Server] INFO at java.lang.Thread.run(Unknown Source)
    
    10.12 11:11:45 [Server] INFO at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    
    10.12 11:11:45 [Server] INFO at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 10.12
    
    11:11:45 [Server] INFO at
    org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
    
    10.12 11:11:45 [Server] WARN org.apache.commons.lang.UnhandledException: Plugin ServerSelectorX v3.2.4 generated an exception while executing task 338
    
    10.12 11:11:45 [Server] WARN Exception in thread "Craft Scheduler Thread - 22"
    
    This is my config as well…


    Code:
    # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #
    #                                                                                                        #
    #    For a list of item names see https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html      #
    #                                                                                                        #
    # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #
    
    
    
    # Number of rows of slots of your server selector menu. For example '2' will mean 2*9 = 18 slots. Max value is 6.
    rows: 2
    
    # This will be displayed as the title of the menu.
    title: 'Server Selector'
    
    # This will be the name of the server selector item
    item-name: 'Server Selector'
    
    # Item lore. For no lore, put 'none' in the first line.
    item-lore:
    - 'Right or Left Click to Open'
    
    # The name of the server selector item. Specify "NONE" for no item.
    item: COMPASS
    data: 0
    
    # Give the item when a player joins?
    on-join: false
    
    # What slot should the item be in? Specify -1 to automatically put it in the first available slot.
    inv-slot: 0
    
    # URL clickable message
    url-message: '&3&lClick here'
    
    # Command to open the menu. Specify "none" for no command. (without /)
    command: "james"
    
    # Possible values for action:
    #
    # Teleport player to server
    # action: 'srv:skywars'
    #
    # Send player a clickable message to open a URL. Only works on spigot, not bukkit.
    # action: 'url:http://example.com/'
    #
    # Teleport player to world
    # action: 'world:skyblock'
    #
    # Execute a command. The player will need permission for this command. No / before the command.
    # action: 'cmd:gamemode 1'
    # For bungeecord commands, add a bungee: prefix. This requires https://www.spigotmc.org/resources/commandsync.115/ to be installed.
    # action: 'bungeecmd:glist'
    #
    # Open another selector (for submenus for example)
    # action: 'sel:uhc-servers'
    # SUPER VALUABLE TIP:
    # If you set the ip to 'submenu' and ping-server to true, {online} and {max} will be the combined number of players of all servers in the submenu.
    #
    # Send message
    # action: 'msg:&1This &2is &3a &4message'
    #
    # Close selector
    # action: 'close'
    #
    # Do nothing (selector stays open)
    # action: 'none'
    
    menu:
    
      3: # Item in 4th slot (use 0 for first item). Add as many items as you want by copying this section and giving it a new number. This number must not be greater than (rows*9)-1
    
        # Whether the server should be pinged for information. Enables placeholders in lore.
        ping-server: true
        ip: sashaizlands.mcph.co # Note that you can't use localhost because the plugin uses an external API by default. For more info see config.yml
        port: 1234
      
        action: 'srv:kitpvp'
    
        # Change item count based on number of players online. Only works if ping-server is turned on. If there are more than 64 players online, the item count will be 1
        # Change how this works in config.yml.
        change-item-count: true
      
        # This value is ignored when change-item-count is turned on.
        item-count: 1
            
      10: # Item in 6th slot 
        action: 'cmd:GunGame join Gg-1'
        online:
          item: SLIMEBALL # You can use head:auto to get the head of the player opening the menu, or head:SomethingElse to get the head of a specific player.
          data: 0
          enchanted: false
          name: 'BodyBuilder'
          lore:
           - 'City'
           - '&e%server_online_Splatoon% / 6'
          
      11: 
        action: 'none'
        online:
          item: SLIMEBALL
          data: 0
          enchanted: false
          name: 'BodyBuilder'
          lore:
           - 'Coming Soon'
          
      -1: # -1 means everything else
        action: 'none'
        online:
          item: STAINED_GLASS_PANE
          data: 0
          enchanted: false
          name: ''
          lore:
     
  2. Online

    timtower Moderator Moderator

  3. Offline

    Ghost105

    The error is saying you're defining a variable then redefining it with an invalid value. 11 and 10 you have 2 items with the same name.
     
Thread Status:
Not open for further replies.

Share This Page