From 02171d54dd551a9a6b5dd7d2e11f795bed1e0ae0 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Mon, 4 May 2020 23:24:31 -0400 Subject: [PATCH] Correct issue with unspecified permission worlds, fixes #1284 --- main/src/main/java/me/blackvein/quests/Quest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/me/blackvein/quests/Quest.java b/main/src/main/java/me/blackvein/quests/Quest.java index 1dfee5737..761d5863d 100644 --- a/main/src/main/java/me/blackvein/quests/Quest.java +++ b/main/src/main/java/me/blackvein/quests/Quest.java @@ -499,7 +499,10 @@ public class Quest { for (int i = 0; i < rews.getPermissions().size(); i++) { if (plugin.getDependencies().getVaultPermission() != null) { String perm = rews.getPermissions().get(i); - String world = rews.getPermissionWorlds().get(i); + String world = null; + if (i < rews.getPermissionWorlds().size()) { + world = rews.getPermissionWorlds().get(i); + } if (world == null || world.equals("null")) { plugin.getDependencies().getVaultPermission().playerAdd(null, player, perm); } else {