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


    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():
    1. saveDefaultConfig();

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

    Step 4: To get something from it:
    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:
  4. Offline


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


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

Share This Page