Increment MapID for Set Spawn Tool If config dont contain world name

Discussion in 'Spigot Plugin Development' started by TylerBenton98, Apr 24, 2017.

  1. this is gonna be a pain to explain what im having trouble with but here we go

    https://gyazo.com/3d55684202b1c9694a66744678f51054

    this is my config, the first 0 is the mapid and the second 0 and 1 is the spawnid for the hunger games



    if the player sets a spawn in a different world that is not in the config yet, i need to increment the mapid by 1 so it makes a new map id index in the config



    i've tried everything but i dont know what to do here, im lost,



    im not getting any errors but i just need a way to increment th mapid by 1 if the world name is not in the config,
     
  2. Take it back a step - what is this config structure for? The points for a hunger games map?

    This seems like a convoluted way of defining points for an arena.