mirror of
https://github.com/darksaid98/AlathranWars.git
synced 2026-12-04 06:28:51 +00:00
Null getSidePlayers doesn't result in exception
This commit is contained in:
1 parent
bb622ad8f0
commit
eae8ed8923
1 file changed
+5
-1
@@ -24,13 +24,17 @@ public class JoinListener implements Listener {
|
|||||||
boolean inWar = false;
|
boolean inWar = false;
|
||||||
boolean colorRemoved = false;
|
boolean colorRemoved = false;
|
||||||
for (final War war : WarCommands.wars) {
|
for (final War war : WarCommands.wars) {
|
||||||
if (war.getSide1Players().contains(p.getName())) {
|
if (war.getSide1Players() == null) {
|
||||||
|
Main.warLogger.log("ERROR: Unable to retrieve side 1 of war " + war.getName());
|
||||||
|
} else if (war.getSide1Players().contains(p.getName())) {
|
||||||
TABHook.assignSide1WarSuffix(p, war);
|
TABHook.assignSide1WarSuffix(p, war);
|
||||||
if (!colorRemoved) {
|
if (!colorRemoved) {
|
||||||
TABHook.removeColorPrefix(p, LuckPermsHook.getPrefix(p.getName()));
|
TABHook.removeColorPrefix(p, LuckPermsHook.getPrefix(p.getName()));
|
||||||
colorRemoved = true;
|
colorRemoved = true;
|
||||||
}
|
}
|
||||||
inWar = true;
|
inWar = true;
|
||||||
|
} else if (war.getSide2Players() == null) {
|
||||||
|
Main.warLogger.log("ERROR: Unable to retrieve side 2 of war " + war.getName());
|
||||||
} else if (war.getSide2Players().contains(p.getName())) {
|
} else if (war.getSide2Players().contains(p.getName())) {
|
||||||
TABHook.assignSide2WarSuffix(p, war);
|
TABHook.assignSide2WarSuffix(p, war);
|
||||||
if (!colorRemoved) {
|
if (!colorRemoved) {
|
||||||
|
|||||||
Reference in new issue
Block a user