Solved Item stuck in GUI

Discussion in 'Plugin Development' started by yPedx, Apr 16, 2017.

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

    yPedx

    I don't know why, but whatever is set in the default config stays in the GUI forever. If the config contains;
    Code:
    MainPage:
          Slot5:
             Name: '&eExample Item'
             Command: me I forgot to configure the config!
             Item: DIAMOND
             Permission: custom.permission
    That item will stay in slot 5 forever and cannot be removed. Does this have something to do with saveDefaultConfig() at onEnable() ?
     
  2. Offline

    Ragnarok_

    I don't think it's with the saveDefaultConfig(). Is it Config.options.copy DefaultConfig()? I'm pretty sure that's only used to create a new one if it's deleted. Also, is tis for that ban time suggestion I left on spigot? :D
     
  3. Offline

    yPedx

    @Ragnarok_
    I believe they do the same anyway.
    And no, this is not for that :p It's for the plugin in my signature :p
     
  4. @yPedx
    Please give us a bit more of a thorough run-through of what you're doing. What GUI are you talking about? What do you mean by "slot 5"? Can you show us your code?

    Without this information, any help we try to give you is pretty much a shot in the dark :)
     
  5. Offline

    yPedx

    @AlvinB
    Slot5 from the config file further up.
    Here's the whole code.
    Cut the imports & registerevents sections due to over 30,000 words :p
    Show Spoiler
    Code:
        Hah, you ain't getting mah code :3
     
    Last edited: Apr 17, 2017
  6. @yPedx
    Still don't really get it. Do you mean that the Slot5 section in the config isn't updated when you want it to? I don't see where you're trying to update it..
     
  7. Offline

    yPedx

    @AlvinB
    Basically, if the default config has a slot in it like this;
    Code:
    Page1:
        Slot4:
            Name:
            Command:
            Item:
            Permission:
    That Item will forever stay in slot4 even if you remove it from config. This only happens if the default config has an item in a slot.
     
  8. So if you shut off the server, remove the Slot4 section, save, and restart the server, it still places it back in?
     
  9. Offline

    yPedx

    Found another solution.
     
Thread Status:
Not open for further replies.

Share This Page