Config Replace String

Discussion in 'Plugin Development' started by JooshYT, Aug 13, 2015.

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

    JooshYT

    Hey so i have a config set like this:
    Messages:
    serverMOTD: '&cUltimate UHC &f: &a%s &6%s'

    And i was wondering with .replace or somthing how would i replace with first %s with a variable and the second %s with a different variable which i already have?
     
  2. I think you just use replaceFirst to replace it, just like you would do with the normal replace function.
     
  3. Offline

    JooshYT

    what do you mean?
     
  4. I think this can be done with String.format("bla %s bla %s", "string 1", "string 2")
     
  5. Offline

    cfil360

    Code:
    String modified = s.replaceAll("\"", "a");
     
Thread Status:
Not open for further replies.

Share This Page