mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-28 21:56:28 +01:00
Show help on qa subcommand lacking args
This commit is contained in:
parent
ae70523ac6
commit
67b8018f93
@ -69,6 +69,10 @@ public class QuestadminFinishCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_FINISH_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.finish")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -68,6 +68,10 @@ public class QuestadminGiveCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_GIVE_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.give")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -66,6 +66,10 @@ public class QuestadminGivepointsCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_GIVEPOINTS_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.givepoints")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -69,6 +69,10 @@ public class QuestadminNextstageCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_NEXTSTAGE_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.nextstage")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -66,6 +66,10 @@ public class QuestadminPointsCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_POINTS_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.points")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -66,6 +66,10 @@ public class QuestadminPointsallCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_POINTSALL_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.pointsall")) {
|
||||
final int amount;
|
||||
try {
|
||||
|
@ -69,6 +69,10 @@ public class QuestadminQuitCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_QUIT_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.quit")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -69,6 +69,10 @@ public class QuestadminRemoveCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_REMOVE_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") && cs.hasPermission("quests.admin.remove")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -68,6 +68,10 @@ public class QuestadminResetCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_RESET_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.reset")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -70,6 +70,10 @@ public class QuestadminSetstageCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_SETSTAGE_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.setstage")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -67,6 +67,10 @@ public class QuestadminStatsCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_STATS_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") && cs.hasPermission("quests.admin.stats")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
@ -66,6 +66,10 @@ public class QuestadminTakepointsCommand extends QuestsSubCommand {
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender cs, String[] args) {
|
||||
if (args.length == 1) {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("COMMAND_QUESTADMIN_TAKEPOINTS_HELP"));
|
||||
return;
|
||||
}
|
||||
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.takepoints")) {
|
||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||
if (target == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user