parent
9345ad73d3
commit
127aeb53b2
|
@ -52,23 +52,6 @@ public class DeluxeUtil {
|
||||||
((DynmapAPI) dynmap).setDisableChatToWebProcessing(true);
|
((DynmapAPI) dynmap).setDisableChatToWebProcessing(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isGroupChat(List<String> prefixes, String message) {
|
|
||||||
boolean groupChat = false;
|
|
||||||
for (String prefix : prefixes) {
|
|
||||||
// If chat starts with 1 prefix, it is group chat.
|
|
||||||
if (message.startsWith(prefix)) {
|
|
||||||
groupChat = true;
|
|
||||||
message = message.substring(1);
|
|
||||||
// If chat still starts with the prefix, it means there were two and we are delegating to normal chat
|
|
||||||
if (message.startsWith(prefix)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return groupChat;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<String> trimmed(List<String> list) {
|
public static List<String> trimmed(List<String> list) {
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
list.set(i, list.get(i).trim());
|
list.set(i, list.get(i).trim());
|
||||||
|
|
Loading…
Reference in New Issue