a few config questions

Discussion in 'Plugin Development' started by mickverm, May 20, 2012.

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

    mickverm

    hey guys,

    I've been working on a plugin but I got stuck on 3 things.

    The first thing is, how can I get colour codes to work in a config file
    if I do &1 I want it to display the message in the chat with the right colour but it says &1 message

    and the second thing is how can I get the plugin to place #message in the config file when it runs the plugin for the first time I need the #... for messages that should be read by the plugin because its just basic information

    and the last thing I need to know is how I can enable/disable things from the config so if it says for example:
    help: disabled
    in the config it disables the command ingame

    greetings, mickverm
     
  2. 1. message = message.replaceAll("(&([a-fk-or0-9]))", "§$2");
    2. not knowing anny solution right now
    3. ^
     
  3. Offline

    Sagacious_Zed Bukkit Docs

    1. the actual character that tells the client to start printing text in color is the section marker (§) your code will need to turn the & into §.

    2. you cannot access any lines with # in the yaml, the parser passes right over it

    3. you will need to read a node with a boolean value and write code to determine if the some function is on or off.
     
Thread Status:
Not open for further replies.

Share This Page