From 84b2906e3e85abc20f2fdb1269e612b79a0f4553 Mon Sep 17 00:00:00 2001 From: HappyPikachu Date: Mon, 30 Jul 2018 16:19:30 -0400 Subject: [PATCH] Allow for * and Op permissions, fixes #440 --- src/main/java/me/blackvein/quests/Quests.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/blackvein/quests/Quests.java b/src/main/java/me/blackvein/quests/Quests.java index 19817dd85..e7866b0d7 100644 --- a/src/main/java/me/blackvein/quests/Quests.java +++ b/src/main/java/me/blackvein/quests/Quests.java @@ -3777,16 +3777,21 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener } /** - * Checks if player cannot use Quests + * Checks if player CANNOT use Quests * * @param uuid the entity UUID to be checked * @return {@code true} if entity has no permission */ public boolean checkQuester(UUID uuid) { Player p = Bukkit.getPlayer(uuid); + if (p.isOp()) { + return false; + } try { for (PermissionAttachmentInfo pm : p.getEffectivePermissions()) { - if (pm.getPermission().startsWith("quests")) { + if (pm.getPermission().startsWith("quests") + || pm.getPermission().equals("*") + || pm.getPermission().equals("*.*")) { return false; } }