Solved Multiple players minigame kit selection?

Discussion in 'Plugin Development' started by Cookid, Mar 1, 2021.

  1. Offline

    Cookid

    Hi, I'm attempting to convert a minigame I made on command blocks into a plugin, and I'm stuck on a problem right now:

    I need kit memory for the players, I have inventories and the eventhandlers for the kit gui set up but I don't know how to approach the problem of remembering which player has which kit.

    I was thinking of using the config.yml without any actual saving so it's just memory, but it looks like I can't just impulsively create a key path using the player's UUID, paths are pre-set from what I'm seeing.
    Not sure but I think enum is also useless here? I don't know exactly what enum does even though I'm using it lol

    So thats about it, multiple kit selection, need to know how I can remember what kit each player has chosen, so I can then give the items/perks on start.


    Show Spoiler
    UNRELATED QUESTION: I plan on this being the only question I ask about this plugin so i'd like to also just ask real quick, whats up with the email verification? I have an account from 2013 that can't post because it needs a verified email but the resend does nothing. Upon creating this new account I didn't have to do a verification, was email verifications abandoned and my old account is permalocked?
     
  2. Online

    timtower Administrator Administrator Moderator

    @Cookid HashMap<UUID, String> ?
    No need to save it to config right away, only in the onDisable

    About the account: Twitch broke that email stuff years ago, they never bothered to fix it.
     
  3. Offline

    Cookid

    That works! looks like I should of researched java a bit more, but I honestly never came across hashmap while looking. Thanks though, and rip my account I guess lol
     

Share This Page