Fix quest completion on missing or invalid permission worlds

This commit is contained in:
PikaMug 2020-05-19 16:01:47 -04:00
parent b63d7be408
commit b4d11ff9c3

View File

@ -721,7 +721,7 @@ public class Quest {
if (rews.getPermissions().isEmpty() == false) { if (rews.getPermissions().isEmpty() == false) {
int index = 0; int index = 0;
for (String s : rews.getPermissions()) { for (String s : rews.getPermissions()) {
if (rews.getPermissionWorlds() != null) { if (rews.getPermissionWorlds() != null && rews.getPermissionWorlds().size() > index) {
p.sendMessage("- " + ChatColor.DARK_GREEN + s + " (" + rews.getPermissionWorlds().get(index) p.sendMessage("- " + ChatColor.DARK_GREEN + s + " (" + rews.getPermissionWorlds().get(index)
+ ")"); + ")");
} else { } else {