mirror of
https://github.com/ME1312/SubServers-2.git
synced 2024-11-25 11:46:50 +01:00
Make color
the default behavior for placeholders
This commit is contained in:
parent
dacb3aa541
commit
0d052e0774
@ -101,8 +101,8 @@ public class PlaceholderImpl extends PlaceholderExpansion implements Taskable, C
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onPlaceholderRequest(Player player, String request) {
|
public String onPlaceholderRequest(Player player, String request) {
|
||||||
boolean colored = request.startsWith("color_");
|
boolean colored = !request.startsWith("plain_");
|
||||||
if (colored) request = request.substring(6);
|
if (!colored || request.startsWith("color_")) request = request.substring(6);
|
||||||
|
|
||||||
String response = parseRequest(request);
|
String response = parseRequest(request);
|
||||||
if (!init) init();
|
if (!init) init();
|
||||||
@ -128,7 +128,7 @@ public class PlaceholderImpl extends PlaceholderExpansion implements Taskable, C
|
|||||||
} else if (!arg.contains(",")) {
|
} else if (!arg.contains(",")) {
|
||||||
args = new String[]{ arg };
|
args = new String[]{ arg };
|
||||||
} else {
|
} else {
|
||||||
args = arg.split(",\\s*");
|
args = arg.split(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < args.length; ++i)
|
for (int i = 0; i < args.length; ++i)
|
||||||
@ -139,7 +139,7 @@ public class PlaceholderImpl extends PlaceholderExpansion implements Taskable, C
|
|||||||
} else if (!response.contains(",")) {
|
} else if (!response.contains(",")) {
|
||||||
responses = new String[]{ response };
|
responses = new String[]{ response };
|
||||||
} else {
|
} else {
|
||||||
responses = response.split(",\\s*");
|
responses = response.split(",");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < responses.length; ++i)
|
for (int i = 0; i < responses.length; ++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user