Skip to content

Commit

Permalink
Make color the default behavior for placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
ME1312 committed Jul 5, 2020
1 parent dacb3aa commit 0d052e0
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -101,8 +101,8 @@ public void clear() {

@Override
public String onPlaceholderRequest(Player player, String request) {
boolean colored = request.startsWith("color_");
if (colored) request = request.substring(6);
boolean colored = !request.startsWith("plain_");
if (!colored || request.startsWith("color_")) request = request.substring(6);

String response = parseRequest(request);
if (!init) init();
Expand All @@ -128,7 +128,7 @@ private String parseRequest(String placeholder) {
} else if (!arg.contains(",")) {
args = new String[]{ arg };
} else {
args = arg.split(",\\s*");
args = arg.split(",");
}

for (int i = 0; i < args.length; ++i)
Expand All @@ -139,7 +139,7 @@ private String parseRequest(String placeholder) {
} else if (!response.contains(",")) {
responses = new String[]{ response };
} else {
responses = response.split(",\\s*");
responses = response.split(",");
}

for (int i = 0; i < responses.length; ++i)
Expand Down

0 comments on commit 0d052e0

Please sign in to comment.