mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 07:05:51 +01:00
Add missing permission checks
This commit is contained in:
parent
26c39ec186
commit
f9c663b18a
@ -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")) {
|
||||
|
Loading…
Reference in New Issue
Block a user