Moving over to the use of describeTo.
This commit is contained in:
@@ -103,10 +103,6 @@ public class Factions extends EntityCollection<Faction>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------//
|
||||
// Faction tag
|
||||
//----------------------------------------------//
|
||||
@@ -117,19 +113,19 @@ public class Factions extends EntityCollection<Faction>
|
||||
|
||||
if(MiscUtil.getComparisonString(str).length() < Conf.factionTagLengthMin)
|
||||
{
|
||||
errors.add(P.p.txt.parse("<i>The faction tag can't be shorter than "+Conf.factionTagLengthMin+ " chars."));
|
||||
errors.add(P.p.txt.parse("<i>The faction tag can't be shorter than <h>%s<i> chars.", Conf.factionTagLengthMin));
|
||||
}
|
||||
|
||||
if(str.length() > Conf.factionTagLengthMax)
|
||||
{
|
||||
errors.add(P.p.txt.parse("<i>The faction tag can't be longer than "+Conf.factionTagLengthMax+ " chars."));
|
||||
errors.add(P.p.txt.parse("<i>The faction tag can't be longer than <h>%s<i> chars.", Conf.factionTagLengthMax));
|
||||
}
|
||||
|
||||
for (char c : str.toCharArray())
|
||||
{
|
||||
if ( ! MiscUtil.substanceChars.contains(String.valueOf(c)))
|
||||
{
|
||||
errors.add(P.p.txt.parse("<i>Faction tag must be alphanumeric. \""+c+"\" is not allowed."));
|
||||
errors.add(P.p.txt.parse("<i>Faction tag must be alphanumeric. \"<h>%s<i>\" is not allowed.", c));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user