Placeholder//Variables Help! (For Config)

Discussion in 'Plugin Development' started by VortexHDPlays, Jun 27, 2017.

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

    VortexHDPlays

    So I need help with Placeholders / Variables for Config!

    (!) Please be specific when you are doing this! What makes me confused is somebody says a code but doesn't specificity which exact place it is located which makes me confused

    > > I really want $player in the config to make it say the sender name! If you can help me that'll be awesome :p I hope you see my thread, and tell me.. I hope you have a great day and thanks for reading this, I hope you know how, so you can tell me how.. Bye!

    ~-~ VortexHDPlays (Bye)
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    Horsey

    You would use
    Code:java
    1.  
    2. getConfig().getString("YourPathHere").replace("$player", "Sender'sNameHere");
    3. // gets a string from the config, and replaces any "$player" with the specified string, (use sender#getName() in a command)
     
Thread Status:
Not open for further replies.

Share This Page