mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +00:00
Fixed empty string tests
This commit is contained in:
1 parent
9bff9bea6e
commit
dd78651adc
1 file changed
+4
-3
@@ -202,6 +202,7 @@ public class TownyChatFormatter {
|
|||||||
|
|
||||||
String nTag = "", tTag = "";
|
String nTag = "", tTag = "";
|
||||||
|
|
||||||
|
//Force use of full names only
|
||||||
if (full) {
|
if (full) {
|
||||||
nationTag = "";
|
nationTag = "";
|
||||||
townTag = "";
|
townTag = "";
|
||||||
@@ -219,13 +220,13 @@ public class TownyChatFormatter {
|
|||||||
nTag = nation.getName();
|
nTag = nation.getName();
|
||||||
|
|
||||||
// Output depending on what tags are present
|
// Output depending on what tags are present
|
||||||
if ((tTag.isEmpty()) && (nTag.isEmpty()))
|
if ((!tTag.isEmpty()) && (!nTag.isEmpty()))
|
||||||
return String.format(TownySettings.getChatTownNationTagFormat(), nTag, tTag);
|
return String.format(TownySettings.getChatTownNationTagFormat(), nTag, tTag);
|
||||||
|
|
||||||
if (nTag.isEmpty())
|
if (!nTag.isEmpty())
|
||||||
return String.format(TownySettings.getChatNationTagFormat(), nTag);
|
return String.format(TownySettings.getChatNationTagFormat(), nTag);
|
||||||
|
|
||||||
if (tTag.isEmpty())
|
if (!tTag.isEmpty())
|
||||||
return String.format(TownySettings.getChatTownTagFormat(), tTag);
|
return String.format(TownySettings.getChatTownTagFormat(), tTag);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user