Config help

Discussion in 'Plugin Development' started by bobthefish, Jul 23, 2014.

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

    bobthefish

    Hi,

    This may be the wrong section, but since I wanted it as PART of my plugin,i figured Id post here.

    I ma making a kit pvp plugin, and so far everything is working well. The only problem is, all of my kits are hard coded into the plugin, so to change them, I have to change the code. I was wondering how I might switch over to config based kits. I would need a way to create them with custom armor and items. (with enchantments etc) any way to do that easily? thanks
     
  2. Offline

    Niknea

    Bukkit has an very enhanced config methods. Here is a link. Pretty much, you would be using quite a bit of strings, and getting the strings from the config.

    Getting a string from the config :
    PHP:
    if(this.getConfig().getString("Example"))
     
  3. Offline

    bobthefish

    Niknea Yes, I know that, but what I mean is that I would need to make it so that in the command to make a kit, you may or may not put in an enchantment on for example your sword, or maybe put on 2. but Im not sure how to have that flexibility
     
  4. Offline

    Niknea

    bobthefish Check if the string is not null before setting the enchanentments.
     
Thread Status:
Not open for further replies.

Share This Page