The variable that doesn't remove the plugin after restart

Discussion in 'Plugin Development' started by SeleXOnEuW, Apr 30, 2015.

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

    SeleXOnEuW

    How can I make this variable ?
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Simple little tutorial:
    Step 1: Put a file called config.yml in the same place as plugin.yml is.
    Step 2: Put this in onEnable():
    Code:java
    1. saveDefaultConfig();

    Step 3: To save something to it:
    Code:java
    1. getConfig().set("key", value);
    2. saveConfig(); // <-- IMPORTANT

    Step 4: To get something from it:
    Code:java
    1. String str = getConfig().getString("key");
    2. int i = getConfig().getInt("key");
    3. boolean b = getConfig().getBoolean("key");
    4. //There are many different things you can get from it.

    For a full tutorial, visit: http://wiki.bukkit.org/Configuration_API_Reference
     
  4. Offline

    SeleXOnEuW

    @FisheyLP I know how to config xd But im stupid ^^
    Solved
     
  5. Offline

    NordisKFail

    @SeleXOnEuW please mark the post solved in thread settings. :)
     
Thread Status:
Not open for further replies.

Share This Page