Don't allow % in faction descriptions.
Was messing up string formatting. Fixes #490
This commit is contained in:
@@ -33,7 +33,9 @@ public class CmdDescription extends FCommand {
|
||||
return;
|
||||
}
|
||||
|
||||
myFaction.setDescription(TextUtil.implode(args, " ").replaceAll("(&([a-f0-9]))", "& $2")); // since "&" color tags seem to work even through plain old FPlayer.sendMessage() for some reason, we need to break those up
|
||||
// since "&" color tags seem to work even through plain old FPlayer.sendMessage() for some reason, we need to break those up
|
||||
// And replace all the % because it messes with string formatting and this is easy way around that.
|
||||
myFaction.setDescription(TextUtil.implode(args, " ").replaceAll("%", "").replaceAll("(&([a-f0-9]))", "& $2"));
|
||||
|
||||
if (!Conf.broadcastDescriptionChanges) {
|
||||
fme.msg(TL.COMMAND_DESCRIPTION_CHANGED, myFaction.describeTo(fme));
|
||||
|
||||
Reference in New Issue
Block a user