mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-03 14:38:56 +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 = "";
|
||||
|
||||
//Force use of full names only
|
||||
if (full) {
|
||||
nationTag = "";
|
||||
townTag = "";
|
||||
@@ -219,13 +220,13 @@ public class TownyChatFormatter {
|
||||
nTag = nation.getName();
|
||||
|
||||
// Output depending on what tags are present
|
||||
if ((tTag.isEmpty()) && (nTag.isEmpty()))
|
||||
if ((!tTag.isEmpty()) && (!nTag.isEmpty()))
|
||||
return String.format(TownySettings.getChatTownNationTagFormat(), nTag, tTag);
|
||||
|
||||
if (nTag.isEmpty())
|
||||
if (!nTag.isEmpty())
|
||||
return String.format(TownySettings.getChatNationTagFormat(), nTag);
|
||||
|
||||
if (tTag.isEmpty())
|
||||
if (!tTag.isEmpty())
|
||||
return String.format(TownySettings.getChatTownTagFormat(), tTag);
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user