Solved How to add hashtags to YAML strings!?

Discussion in 'Plugin Development' started by leduyquang753, Dec 9, 2017.

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

    leduyquang753

    Hi everyone again. So I am developing the plugin WelcomeNoob 1.2 which implements a randomized welcome messages system, and in the config I declared a list of messages to be displayed like so:
    Code:
    Welcome:
      - "&6Welcome &d%player% &6to the server! &b(#%count%)"
      - "&6The server now have member &b#%count% &6and it''s &d%player%&6!"
      - "&6Greetings to &d%player% &6- the member &b%count%&6!"
    There are hashtags in the strings for the No. of the new player (i.e #156), but when I ran the plugin it treated the hashtags as the begin of a throwaway comment and threw errors. I tried \#, ## but no hope.
    Can anyone solve this issue? @Zombie_Striker ? @timtower ?

    SOLVED: The problem here was discovered myself. It was when I edit the config and save, it is not updated. I added
    reloadConfig(); to the plugin startup and now it worked...
     
    Last edited: Dec 9, 2017
  2. Offline

    Zombie_Striker

  3. Offline

    leduyquang753

    OK it might be the solution but, @Zombie_Striker wouldn't it be some hard and messy stuff for the plugin users?
     
  4. Offline

    Zombie_Striker

Thread Status:
Not open for further replies.

Share This Page