mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-18 23:27:44 +01:00
Allow for * and Op permissions, fixes #440
This commit is contained in:
parent
d924df597a
commit
84b2906e3e
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user