Fixed /tc and /nc...
This commit is contained in:
parent
42fff2fbca
commit
87a3d1e0cb
4 changed files with 9 additions and 2 deletions
Binary file not shown.
|
@ -300,12 +300,18 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
|||
index = PluginMain.Instance.Towns.size() - 1;
|
||||
}
|
||||
// PluginMain.SB.getObjective("town").getScore(event.getPlayer().getName()).setScore(index);
|
||||
//System.out.println("index: " + index);
|
||||
Objective obj = PluginMain.SB.getObjective("town");
|
||||
//System.out.println("obj: " + obj);
|
||||
for (Player p : PluginMain.GetPlayers()) {
|
||||
System.out.println(town.getName());
|
||||
try {
|
||||
if (PluginMain.Instance.TU.getResidentMap()
|
||||
.get(p.getName()).getTown().getName().equals(town.getName()))
|
||||
.get(p.getName().toLowerCase()).getTown().getName()
|
||||
.equals(town.getName()))
|
||||
obj.getScore(p.getName()).setScore(index);
|
||||
else
|
||||
obj.getScore(p.getName()).setScore(-1);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +370,8 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
|||
for (Player p : PluginMain.GetPlayers()) {
|
||||
try {
|
||||
if (PluginMain.Instance.TU.getResidentMap()
|
||||
.get(p.getName()).getTown().getNation().getName().equals(nation.getName()))
|
||||
.get(p.getName().toLowerCase()).getTown().getNation()
|
||||
.getName().equals(nation.getName()))
|
||||
obj.getScore(p.getName()).setScore(index);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue