mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-25 12:15:59 +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
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.finish")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -68,6 +68,10 @@ public class QuestadminGiveCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.give")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -66,6 +66,10 @@ public class QuestadminGivepointsCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.givepoints")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -69,6 +69,10 @@ public class QuestadminNextstageCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.nextstage")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -66,6 +66,10 @@ public class QuestadminPointsCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.points")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -66,6 +66,10 @@ public class QuestadminPointsallCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.pointsall")) {
|
||||||
final int amount;
|
final int amount;
|
||||||
try {
|
try {
|
||||||
|
@ -69,6 +69,10 @@ public class QuestadminQuitCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.quit")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -69,6 +69,10 @@ public class QuestadminRemoveCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") && cs.hasPermission("quests.admin.remove")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -68,6 +68,10 @@ public class QuestadminResetCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.reset")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -70,6 +70,10 @@ public class QuestadminSetstageCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.setstage")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -67,6 +67,10 @@ public class QuestadminStatsCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") && cs.hasPermission("quests.admin.stats")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
@ -66,6 +66,10 @@ public class QuestadminTakepointsCommand extends QuestsSubCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(CommandSender cs, String[] args) {
|
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")) {
|
if (cs.hasPermission("quests.admin.*") || cs.hasPermission("quests.admin.takepoints")) {
|
||||||
OfflinePlayer target = getOfflinePlayer(args[1]);
|
OfflinePlayer target = getOfflinePlayer(args[1]);
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user