Fixed /unlol
This commit is contained in:
parent
87a3d1e0cb
commit
8b1d70e30b
4 changed files with 9 additions and 8 deletions
Binary file not shown.
|
@ -141,8 +141,9 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean greentext = event.getMessage().startsWith(">");
|
boolean greentext = event.getMessage().startsWith(">");
|
||||||
Commands.Lastlol = MaybeOfflinePlayer.AllPlayers.get(event.getPlayer()
|
if (event.getMessage().contains("lol"))
|
||||||
.getUniqueId());
|
Commands.Lastlol = MaybeOfflinePlayer.AllPlayers.get(event
|
||||||
|
.getPlayer().getUniqueId());
|
||||||
|
|
||||||
MaybeOfflinePlayer player = MaybeOfflinePlayer.AllPlayers.get(event
|
MaybeOfflinePlayer player = MaybeOfflinePlayer.AllPlayers.get(event
|
||||||
.getPlayer().getUniqueId());
|
.getPlayer().getUniqueId());
|
||||||
|
@ -300,15 +301,15 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
index = PluginMain.Instance.Towns.size() - 1;
|
index = PluginMain.Instance.Towns.size() - 1;
|
||||||
}
|
}
|
||||||
// PluginMain.SB.getObjective("town").getScore(event.getPlayer().getName()).setScore(index);
|
// PluginMain.SB.getObjective("town").getScore(event.getPlayer().getName()).setScore(index);
|
||||||
//System.out.println("index: " + index);
|
// System.out.println("index: " + index);
|
||||||
Objective obj = PluginMain.SB.getObjective("town");
|
Objective obj = PluginMain.SB.getObjective("town");
|
||||||
//System.out.println("obj: " + obj);
|
// System.out.println("obj: " + obj);
|
||||||
for (Player p : PluginMain.GetPlayers()) {
|
for (Player p : PluginMain.GetPlayers()) {
|
||||||
System.out.println(town.getName());
|
System.out.println(town.getName());
|
||||||
try {
|
try {
|
||||||
if (PluginMain.Instance.TU.getResidentMap()
|
if (PluginMain.Instance.TU.getResidentMap()
|
||||||
.get(p.getName().toLowerCase()).getTown().getName()
|
.get(p.getName().toLowerCase()).getTown()
|
||||||
.equals(town.getName()))
|
.getName().equals(town.getName()))
|
||||||
obj.getScore(p.getName()).setScore(index);
|
obj.getScore(p.getName()).setScore(index);
|
||||||
else
|
else
|
||||||
obj.getScore(p.getName()).setScore(-1);
|
obj.getScore(p.getName()).setScore(-1);
|
||||||
|
@ -370,8 +371,8 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
||||||
for (Player p : PluginMain.GetPlayers()) {
|
for (Player p : PluginMain.GetPlayers()) {
|
||||||
try {
|
try {
|
||||||
if (PluginMain.Instance.TU.getResidentMap()
|
if (PluginMain.Instance.TU.getResidentMap()
|
||||||
.get(p.getName().toLowerCase()).getTown().getNation()
|
.get(p.getName().toLowerCase()).getTown()
|
||||||
.getName().equals(nation.getName()))
|
.getNation().getName().equals(nation.getName()))
|
||||||
obj.getScore(p.getName()).setScore(index);
|
obj.getScore(p.getName()).setScore(index);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue