mirror of
https://github.com/PikaMug/Quests.git
synced 2025-02-02 05:31:33 +01:00
Correct permission check, fixes #379
This commit is contained in:
parent
e4664a6de9
commit
f8f0f515bb
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>3.3.1</version>
|
||||
<version>3.3.2</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -3777,19 +3777,19 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether player meets criteria to use Quests
|
||||
* Checks if player cannot use Quests
|
||||
*
|
||||
* @param uuid the entity UUID to be checked
|
||||
* @return {@code true} if UUID is blacklisted
|
||||
* @return {@code true} if entity has no permission
|
||||
*/
|
||||
public boolean checkQuester(UUID uuid) {
|
||||
Player p = Bukkit.getPlayer(uuid);
|
||||
for (PermissionAttachmentInfo pm : p.getEffectivePermissions()) {
|
||||
if (pm.getPermission().startsWith("quests")) {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean checkList(List<?> list, Class<?> c) {
|
||||
|
Loading…
Reference in New Issue
Block a user