mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-02 14:38:56 +00:00
fixed issue with contains liking cases when it shouldn't.
This commit is contained in:
1 parent
7094a38299
commit
1811d345b2
4 files changed
+16
-16
No files matched your search
@@ -74,7 +74,7 @@ public class CommandHelper {
|
||||
War w = WarData.getWar(war);
|
||||
if(w == null) return Collections.emptyList();
|
||||
for (Town t : TownyAPI.getInstance().getTowns()) {
|
||||
if(w.getSide2Towns().contains(t.getName()) || w.getSide1Towns().contains(t.getName())) {
|
||||
if(w.getSide2Towns().contains(t.getName().toLowerCase()) || w.getSide1Towns().contains(t.getName().toLowerCase())) {
|
||||
out.add(t.getName());
|
||||
}
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class CommandHelper {
|
||||
War w = WarData.getWar(war);
|
||||
if(w == null) return Collections.emptyList();
|
||||
for (Town t : TownyAPI.getInstance().getTowns()) {
|
||||
if(w.getSide2Towns().contains(t.getName()) || w.getSide1Towns().contains(t.getName())) {
|
||||
if(w.getSide2Towns().contains(t.getName().toLowerCase()) || w.getSide1Towns().contains(t.getName().toLowerCase())) {
|
||||
if(t.hasNation()) {
|
||||
try {
|
||||
out.add(t.getNation().getName());
|
||||
@@ -115,11 +115,11 @@ public class CommandHelper {
|
||||
if(w == null) return Collections.emptyList();
|
||||
for (Town t : TownyAPI.getInstance().getTowns()) {
|
||||
if(side.equalsIgnoreCase(w.getSide1())) {
|
||||
if(w.getSide1Towns().contains(t.getName())) {
|
||||
if(w.getSide1Towns().contains(t.getName().toLowerCase())) {
|
||||
out.add(t.getName());
|
||||
}
|
||||
} else if(side.equalsIgnoreCase(w.getSide2())) {
|
||||
if(w.getSide2Towns().contains(t.getName())) {
|
||||
if(w.getSide2Towns().contains(t.getName().toLowerCase())) {
|
||||
out.add(t.getName());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user