Skip perm checks on nicknames if there is no & character.
@@ -173,6 +173,7 @@ public class NicknameCommand extends AbstractCommand<CommandSource> {
private String stripPermissionless(Subject source, String message) throws ReturnMessageException {
+ if (message.contains("&")) {
for (Map.Entry<String[], Tuple<Matcher, Text>> r : replacements.entrySet()) {
// If we don't have the required permission...
if (r.getValue().getFirst().reset(message).find() && Arrays.stream(r.getKey()).noneMatch(source::hasPermission)) {
@@ -180,6 +181,7 @@ public class NicknameCommand extends AbstractCommand<CommandSource> {
throw new ReturnMessageException(r.getValue().getSecond());
}
}
+ }
return message;
}
