Do not check perms for non-players entities, fixes #453

This commit is contained in:
HappyPikachu 2018-08-09 14:14:51 -04:00
parent 063051cda2
commit 502ea53f9a
1 changed files with 4 additions and 1 deletions

View File

@ -3787,9 +3787,12 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
* Checks if player CANNOT use Quests
*
* @param uuid the entity UUID to be checked
* @return {@code true} if entity has no permission
* @return {@code true} if entity has no permission or is not a player
*/
public boolean checkQuester(UUID uuid) {
if (!(Bukkit.getPlayer(uuid) instanceof Player)) {
return true;
}
Player p = Bukkit.getPlayer(uuid);
if (p.isOp()) {
return false;