Add missing permission checks

This commit is contained in:
PikaMug 2020-02-03 06:08:08 -05:00
parent 26c39ec186
commit f9c663b18a

View File

@ -519,6 +519,7 @@ public class CmdExecutor implements CommandExecutor {
}
private boolean questsTop(final CommandSender cs, String[] args) {
if (cs.hasPermission("quests.top")) {
if (args.length > 2) {
cs.sendMessage(ChatColor.YELLOW + Lang.get("COMMAND_TOP_USAGE"));
} else {
@ -577,10 +578,12 @@ public class CmdExecutor implements CommandExecutor {
}
});
}
}
return true;
}
private void questsStats(final CommandSender cs, String[] args) {
if (cs.hasPermission("quests.stats")) {
OfflinePlayer target;
if (args != null) {
target = getPlayer(args[1]);
@ -628,9 +631,11 @@ public class CmdExecutor implements CommandExecutor {
cs.sendMessage(ChatColor.YELLOW + Lang.get("completedQuestsTitle"));
cs.sendMessage(completed);
}
}
@SuppressWarnings("deprecation")
private void questsJournal(final Player player) {
if (((Player) player).hasPermission("quests.journal")) {
Quester quester = plugin.getQuester(player.getUniqueId());
QuestsCommandPreQuestsJournalEvent preEvent = new QuestsCommandPreQuestsJournalEvent(quester);
plugin.getServer().getPluginManager().callEvent(preEvent);
@ -678,6 +683,7 @@ public class CmdExecutor implements CommandExecutor {
player.sendMessage(ChatColor.YELLOW + Lang.get(player, "journalNoRoom"));
}
}
}
private void questsQuit(final Player player, String[] args) {
if (((Player) player).hasPermission("quests.quit")) {