Potential fix for #381 and #383

This commit is contained in:
HappyPikachu 2018-04-28 22:19:02 -04:00
parent f8f0f515bb
commit eb5998a179

View File

@ -3784,10 +3784,14 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
*/
public boolean checkQuester(UUID uuid) {
Player p = Bukkit.getPlayer(uuid);
for (PermissionAttachmentInfo pm : p.getEffectivePermissions()) {
if (pm.getPermission().startsWith("quests")) {
return false;
try {
for (PermissionAttachmentInfo pm : p.getEffectivePermissions()) {
if (pm.getPermission().startsWith("quests")) {
return false;
}
}
} catch (NullPointerException ne) {
// User has no permissions
}
return true;
}