From 9b935c53e9d4545e7d46c6b5f33c1d9e40799cac Mon Sep 17 00:00:00 2001 From: Zrips Date: Wed, 3 May 2023 12:04:00 +0300 Subject: [PATCH] Lets accept Null as command perform return for more control over it --- .../com/gamingmesh/jobs/commands/Cmd.java | 2 +- .../jobs/commands/JobsCommands.java | 13 +++- .../jobs/commands/list/archive.java | 8 +-- .../gamingmesh/jobs/commands/list/area.java | 2 +- .../jobs/commands/list/blockinfo.java | 2 +- .../gamingmesh/jobs/commands/list/bonus.java | 2 +- .../gamingmesh/jobs/commands/list/boost.java | 2 +- .../com/gamingmesh/jobs/commands/list/bp.java | 2 +- .../gamingmesh/jobs/commands/list/browse.java | 2 +- .../jobs/commands/list/clearownership.java | 2 +- .../jobs/commands/list/convert.java | 2 +- .../gamingmesh/jobs/commands/list/demote.java | 2 +- .../jobs/commands/list/edititembonus.java | 2 +- .../jobs/commands/list/editjobs.java | 2 +- .../jobs/commands/list/editpoints.java | 2 +- .../jobs/commands/list/editquests.java | 2 +- .../gamingmesh/jobs/commands/list/employ.java | 2 +- .../jobs/commands/list/entitylist.java | 2 +- .../gamingmesh/jobs/commands/list/exp.java | 2 +- .../jobs/commands/list/explored.java | 2 +- .../gamingmesh/jobs/commands/list/fire.java | 2 +- .../jobs/commands/list/fireall.java | 2 +- .../gamingmesh/jobs/commands/list/give.java | 2 +- .../gamingmesh/jobs/commands/list/glog.java | 2 +- .../jobs/commands/list/grantxp.java | 2 +- .../gamingmesh/jobs/commands/list/gtop.java | 2 +- .../gamingmesh/jobs/commands/list/info.java | 2 +- .../jobs/commands/list/itembonus.java | 2 +- .../jobs/commands/list/iteminfo.java | 2 +- .../gamingmesh/jobs/commands/list/join.java | 2 +- .../gamingmesh/jobs/commands/list/leave.java | 2 +- .../jobs/commands/list/leaveall.java | 2 +- .../gamingmesh/jobs/commands/list/level.java | 2 +- .../gamingmesh/jobs/commands/list/limit.java | 2 +- .../gamingmesh/jobs/commands/list/log.java | 2 +- .../jobs/commands/list/ownedblocks.java | 2 +- .../jobs/commands/list/placeholders.java | 2 +- .../jobs/commands/list/playerinfo.java | 2 +- .../gamingmesh/jobs/commands/list/points.java | 2 +- .../jobs/commands/list/promote.java | 2 +- .../gamingmesh/jobs/commands/list/quests.java | 2 +- .../gamingmesh/jobs/commands/list/reload.java | 2 +- .../jobs/commands/list/removexp.java | 2 +- .../commands/list/resetexploreregion.java | 2 +- .../jobs/commands/list/resetlimit.java | 2 +- .../jobs/commands/list/resetquest.java | 2 +- .../jobs/commands/list/resetquesttotal.java | 2 +- .../jobs/commands/list/schedule.java | 2 +- .../gamingmesh/jobs/commands/list/shop.java | 2 +- .../jobs/commands/list/signupdate.java | 2 +- .../jobs/commands/list/skipquest.java | 2 +- .../gamingmesh/jobs/commands/list/stats.java | 59 ++++++++++--------- .../gamingmesh/jobs/commands/list/toggle.java | 2 +- .../gamingmesh/jobs/commands/list/top.java | 2 +- .../jobs/commands/list/transfer.java | 2 +- .../jobs/commands/list/version.java | 2 +- 56 files changed, 98 insertions(+), 88 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/commands/Cmd.java b/src/main/java/com/gamingmesh/jobs/commands/Cmd.java index 08b9f84f..f2b4e6cc 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/Cmd.java +++ b/src/main/java/com/gamingmesh/jobs/commands/Cmd.java @@ -5,5 +5,5 @@ import org.bukkit.command.CommandSender; import com.gamingmesh.jobs.Jobs; public interface Cmd { - boolean perform(Jobs plugin, CommandSender sender, String[] args); + Boolean perform(Jobs plugin, CommandSender sender, String[] args); } diff --git a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java index 2f7c199f..4ba9d72e 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java +++ b/src/main/java/com/gamingmesh/jobs/commands/JobsCommands.java @@ -114,7 +114,12 @@ public class JobsCommands implements CommandExecutor { return true; } - return cmdClass.perform(plugin, sender, myArgs) || help(sender, 1); + Boolean result = cmdClass.perform(plugin, sender, myArgs); + + if (result != null && !result) + sendUsage(sender, cmd); + + return result == null || !result ? false : true; } private static String[] reduceArgs(String[] args) { @@ -417,6 +422,10 @@ public class JobsCommands implements CommandExecutor { * @return the message */ public String jobStatsMessage(JobProgression jobProg) { + return jobStatsMessage(jobProg, true); + } + + public String jobStatsMessage(JobProgression jobProg, boolean progressBar) { boolean isMaxLevelReached = jobProg.getLevel() == jobProg.getJob().getMaxLevel(); String path = "command.stats.output." + (isMaxLevelReached ? "max-level" : "message"); @@ -428,7 +437,7 @@ public class JobsCommands implements CommandExecutor { "%jobxp%", Math.round(jobProg.getExperience() * 100.0) / 100.0, "%jobmaxxp%", jobProg.getMaxExperience(), "%titlename%", title == null ? "Unknown" : title.getName()); - return " " + (isMaxLevelReached ? "" : jobProgressMessage(jobProg.getMaxExperience(), jobProg.getExperience())) + " " + message; + return " " + (isMaxLevelReached ? "" : progressBar ? jobProgressMessage(jobProg.getMaxExperience(), jobProg.getExperience()) : "") + " " + message; } public String jobProgressMessage(double max, double current) { diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/archive.java b/src/main/java/com/gamingmesh/jobs/commands/list/archive.java index fe05db70..d5256354 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/archive.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/archive.java @@ -16,11 +16,11 @@ import net.Zrips.CMILib.RawMessages.RawMessage; public class archive implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { JobsPlayer jPlayer = null; if (args.length >= 1) { if (!Jobs.hasPermission(sender, "jobs.command.admin.archive", true)) { - return true; + return null; } jPlayer = Jobs.getPlayerManager().getJobsPlayer(args[0]); @@ -31,13 +31,13 @@ public class archive implements Cmd { if (jPlayer == null) { if (args.length >= 1) sender.sendMessage(Jobs.getLanguage().getMessage("general.error.noinfoByPlayer", "%playername%", args[0])); - return true; + return null; } Set allJobs = jPlayer.getArchivedJobs().getArchivedJobs(); if (allJobs.isEmpty()) { sender.sendMessage(Jobs.getLanguage().getMessage("command.archive.error.nojob")); - return true; + return null; } sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getDisplayName())); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/area.java b/src/main/java/com/gamingmesh/jobs/commands/list/area.java index 30637c39..5e5c8a2c 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/area.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/area.java @@ -20,7 +20,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class area implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/blockinfo.java b/src/main/java/com/gamingmesh/jobs/commands/list/blockinfo.java index 2aa7c03d..10b3dbff 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/blockinfo.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/blockinfo.java @@ -18,7 +18,7 @@ public class blockinfo implements Cmd { @Override @SuppressWarnings("deprecation") - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/bonus.java b/src/main/java/com/gamingmesh/jobs/commands/list/bonus.java index f176ed45..abefff10 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/bonus.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/bonus.java @@ -21,7 +21,7 @@ import net.Zrips.CMILib.RawMessages.RawMessage; public class bonus implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/boost.java b/src/main/java/com/gamingmesh/jobs/commands/list/boost.java index 2a18584c..6b78dfa1 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/boost.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/boost.java @@ -16,7 +16,7 @@ import net.Zrips.CMILib.Time.timeModifier; public class boost implements Cmd { @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { Double rate = null; Long timeDuration = null; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/bp.java b/src/main/java/com/gamingmesh/jobs/commands/list/bp.java index d026c992..b88b1ab0 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/bp.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/bp.java @@ -23,7 +23,7 @@ public class bp implements Cmd { @SuppressWarnings("deprecation") @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/browse.java b/src/main/java/com/gamingmesh/jobs/commands/list/browse.java index 20f0ebdd..c7ef76f1 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/browse.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/browse.java @@ -17,7 +17,7 @@ import net.Zrips.CMILib.RawMessages.RawMessage; public class browse implements Cmd { @Override - public boolean perform(Jobs plugin, CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, final String[] args) { boolean senderIsPlayer = sender instanceof Player; if (Jobs.getGCManager().BrowseUseNewLook) { diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/clearownership.java b/src/main/java/com/gamingmesh/jobs/commands/list/clearownership.java index b1dbb7de..bf0e51e4 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/clearownership.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/clearownership.java @@ -18,7 +18,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class clearownership implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { JobsPlayer jPlayer = null; String location = null; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/convert.java b/src/main/java/com/gamingmesh/jobs/commands/list/convert.java index d7b64544..ac46d08e 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/convert.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/convert.java @@ -14,7 +14,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class convert implements Cmd { @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (sender instanceof Player) { CMIMessages.sendMessage(sender, LC.info_FromConsole); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/demote.java b/src/main/java/com/gamingmesh/jobs/commands/list/demote.java index ce86a1ef..66d02cd4 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/demote.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/demote.java @@ -13,7 +13,7 @@ import net.Zrips.CMILib.Colors.CMIChatColor; public class demote implements Cmd { @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (args.length < 3) { Jobs.getCommandManager().sendUsage(sender, "demote"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/edititembonus.java b/src/main/java/com/gamingmesh/jobs/commands/list/edititembonus.java index 19a314c4..75672d98 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/edititembonus.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/edititembonus.java @@ -35,7 +35,7 @@ public class edititembonus implements Cmd { } @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java b/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java index 34451021..27623960 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java @@ -27,7 +27,7 @@ public class editjobs implements Cmd { @SuppressWarnings("deprecation") @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (!(sender instanceof Player)) return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/editpoints.java b/src/main/java/com/gamingmesh/jobs/commands/list/editpoints.java index 05c3aed8..e2ad2485 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/editpoints.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/editpoints.java @@ -12,7 +12,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class editpoints implements Cmd { @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (args.length != 3) { Jobs.getCommandManager().sendUsage(sender, "editpoints"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java b/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java index 4a2acfb0..21f6f007 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java @@ -50,7 +50,7 @@ public class editquests implements Cmd { static HashMap> tempObjectives = new HashMap>(); @Override - public boolean perform(Jobs plugin, final CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, String[] args) { int page = 0; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/employ.java b/src/main/java/com/gamingmesh/jobs/commands/list/employ.java index d7e6e575..ef623b12 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/employ.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/employ.java @@ -11,7 +11,7 @@ import com.gamingmesh.jobs.container.JobsPlayer; public class employ implements Cmd { @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (args.length < 2) { Jobs.getCommandManager().sendUsage(sender, "employ"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/entitylist.java b/src/main/java/com/gamingmesh/jobs/commands/list/entitylist.java index 7c890ce4..ec5a3dcb 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/entitylist.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/entitylist.java @@ -11,7 +11,7 @@ import net.Zrips.CMILib.Colors.CMIChatColor; public class entitylist implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length != 0) { Jobs.getCommandManager().sendUsage(sender, "entitylist"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/exp.java b/src/main/java/com/gamingmesh/jobs/commands/list/exp.java index 4a4a1fc6..0205b987 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/exp.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/exp.java @@ -21,7 +21,7 @@ public class exp implements Cmd { Random rand = new Random(); @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (args.length < 4) { Jobs.getCommandManager().sendUsage(sender, "exp"); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/explored.java b/src/main/java/com/gamingmesh/jobs/commands/list/explored.java index 67cdc125..0d609391 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/explored.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/explored.java @@ -14,7 +14,7 @@ import com.gamingmesh.jobs.container.PlayerInfo; public class explored implements Cmd { @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (!(sender instanceof Player)) return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/fire.java b/src/main/java/com/gamingmesh/jobs/commands/list/fire.java index 8abeed29..fceb6594 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/fire.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/fire.java @@ -11,7 +11,7 @@ import com.gamingmesh.jobs.container.JobsPlayer; public class fire implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length < 2) { Jobs.getCommandManager().sendUsage(sender, "fire"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/fireall.java b/src/main/java/com/gamingmesh/jobs/commands/list/fireall.java index 05c5442e..6ff808b5 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/fireall.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/fireall.java @@ -15,7 +15,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class fireall implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length < 1) { Jobs.getCommandManager().sendUsage(sender, "fireall"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/give.java b/src/main/java/com/gamingmesh/jobs/commands/list/give.java index 5ef59a05..4e90ebec 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/give.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/give.java @@ -27,7 +27,7 @@ public class give implements Cmd { } @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { Player player = null; Job job = null; actions name = null; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/glog.java b/src/main/java/com/gamingmesh/jobs/commands/list/glog.java index c1dd523e..9392d267 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/glog.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/glog.java @@ -22,7 +22,7 @@ import net.Zrips.CMILib.Time.CMITimeManager; public class glog implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length != 0) { Jobs.getCommandManager().sendUsage(sender, "glog"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/grantxp.java b/src/main/java/com/gamingmesh/jobs/commands/list/grantxp.java index 709ada3b..6416125c 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/grantxp.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/grantxp.java @@ -12,7 +12,7 @@ import com.gamingmesh.jobs.container.JobsPlayer; public class grantxp implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length < 3) { Jobs.getCommandManager().sendUsage(sender, "grantxp"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/gtop.java b/src/main/java/com/gamingmesh/jobs/commands/list/gtop.java index 00bcf410..26f7a309 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/gtop.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/gtop.java @@ -19,7 +19,7 @@ import net.Zrips.CMILib.Scoreboards.CMIScoreboard; public class gtop implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/info.java b/src/main/java/com/gamingmesh/jobs/commands/list/info.java index 7143fa6d..3da731b6 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/info.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/info.java @@ -15,7 +15,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class info implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/itembonus.java b/src/main/java/com/gamingmesh/jobs/commands/list/itembonus.java index 6e247260..ba1c787c 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/itembonus.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/itembonus.java @@ -27,7 +27,7 @@ import net.Zrips.CMILib.RawMessages.RawMessage; public class itembonus implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/iteminfo.java b/src/main/java/com/gamingmesh/jobs/commands/list/iteminfo.java index 3cf23e5e..d9bea691 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/iteminfo.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/iteminfo.java @@ -19,7 +19,7 @@ public class iteminfo implements Cmd { @Override @SuppressWarnings("deprecation") - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/join.java b/src/main/java/com/gamingmesh/jobs/commands/list/join.java index 048b8a8c..eeeebce6 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/join.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/join.java @@ -16,7 +16,7 @@ import net.Zrips.CMILib.RawMessages.RawMessage; public class join implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/leave.java b/src/main/java/com/gamingmesh/jobs/commands/list/leave.java index b097c468..65fad255 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/leave.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/leave.java @@ -15,7 +15,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class leave implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/leaveall.java b/src/main/java/com/gamingmesh/jobs/commands/list/leaveall.java index 7b3c9e7f..3076f123 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/leaveall.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/leaveall.java @@ -17,7 +17,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class leaveall implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/level.java b/src/main/java/com/gamingmesh/jobs/commands/list/level.java index e9b2d4da..c0bf5d1e 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/level.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/level.java @@ -17,7 +17,7 @@ public class level implements Cmd { } @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (args.length < 4) { Jobs.getCommandManager().sendUsage(sender, "level"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/limit.java b/src/main/java/com/gamingmesh/jobs/commands/list/limit.java index 343c63b4..f23dec61 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/limit.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/limit.java @@ -17,7 +17,7 @@ import net.Zrips.CMILib.Time.CMITimeManager; public class limit implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length != 0 && args.length != 1) { Jobs.getCommandManager().sendUsage(sender, "limit"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/log.java b/src/main/java/com/gamingmesh/jobs/commands/list/log.java index 52f22058..903fc1ca 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/log.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/log.java @@ -23,7 +23,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class log implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player) && args.length != 1) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/ownedblocks.java b/src/main/java/com/gamingmesh/jobs/commands/list/ownedblocks.java index 31624d61..62516c77 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/ownedblocks.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/ownedblocks.java @@ -26,7 +26,7 @@ import net.Zrips.CMILib.RawMessages.RawMessage; public class ownedblocks implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { JobsPlayer jPlayer = null; if (args.length >= 1) { if (!Jobs.hasPermission(sender, "jobs.command.admin.ownedblocks", true)) diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/placeholders.java b/src/main/java/com/gamingmesh/jobs/commands/list/placeholders.java index b9f53e37..cedc88e6 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/placeholders.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/placeholders.java @@ -16,7 +16,7 @@ import net.Zrips.CMILib.RawMessages.RawMessage; public class placeholders implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { boolean isPlayer = sender instanceof Player; Player player = isPlayer ? (Player) sender : null; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/playerinfo.java b/src/main/java/com/gamingmesh/jobs/commands/list/playerinfo.java index 3aed487b..84ccf0bb 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/playerinfo.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/playerinfo.java @@ -10,7 +10,7 @@ import com.gamingmesh.jobs.container.JobsPlayer; public class playerinfo implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length < 2) { Jobs.getCommandManager().sendUsage(sender, "playerinfo"); Jobs.getCommandManager().sendValidActions(sender); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/points.java b/src/main/java/com/gamingmesh/jobs/commands/list/points.java index 6800b743..a640cb3d 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/points.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/points.java @@ -14,7 +14,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class points implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length != 0 && args.length != 1) { Jobs.getCommandManager().sendUsage(sender, "points"); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/promote.java b/src/main/java/com/gamingmesh/jobs/commands/list/promote.java index d588202b..04084435 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/promote.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/promote.java @@ -11,7 +11,7 @@ import com.gamingmesh.jobs.container.JobsPlayer; public class promote implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length < 3) { Jobs.getCommandManager().sendUsage(sender, "promote"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/quests.java b/src/main/java/com/gamingmesh/jobs/commands/list/quests.java index f53d5dc6..805d8120 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/quests.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/quests.java @@ -23,7 +23,7 @@ import net.Zrips.CMILib.Time.CMITimeManager; public class quests implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, String[] args) { if (!Jobs.getGCManager().DailyQuestsEnabled) { LC.info_FeatureNotEnabled.sendMessage(sender); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/reload.java b/src/main/java/com/gamingmesh/jobs/commands/list/reload.java index bc20c934..0fc70d90 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/reload.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/reload.java @@ -8,7 +8,7 @@ import com.gamingmesh.jobs.commands.Cmd; public class reload implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { Jobs.reload(); sender.sendMessage(Jobs.getLanguage().getMessage("general.admin.success")); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/removexp.java b/src/main/java/com/gamingmesh/jobs/commands/list/removexp.java index 6aaeb528..a26890c9 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/removexp.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/removexp.java @@ -11,7 +11,7 @@ import com.gamingmesh.jobs.container.JobsPlayer; public class removexp implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length < 3) { Jobs.getCommandManager().sendUsage(sender, "removexp"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/resetexploreregion.java b/src/main/java/com/gamingmesh/jobs/commands/list/resetexploreregion.java index 4eed1a05..ecb2eb53 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/resetexploreregion.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/resetexploreregion.java @@ -11,7 +11,7 @@ public class resetexploreregion implements Cmd { private static String REGEX = "^[0-9a-zA-Z_-]+$"; @Override - public boolean perform(Jobs plugin, CommandSender sender, String[] args) { + public Boolean perform(Jobs plugin, CommandSender sender, String[] args) { if (args.length != 2 || !WORLD.equals(args[0])) { Jobs.getCommandManager().sendUsage(sender, "resetexploreregion"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/resetlimit.java b/src/main/java/com/gamingmesh/jobs/commands/list/resetlimit.java index 6bf6d018..794f1c6d 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/resetlimit.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/resetlimit.java @@ -8,7 +8,7 @@ import com.gamingmesh.jobs.container.JobsPlayer; public class resetlimit implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length != 1) { Jobs.getCommandManager().sendUsage(sender, "resetlimit"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/resetquest.java b/src/main/java/com/gamingmesh/jobs/commands/list/resetquest.java index d3fee368..d3bcf71a 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/resetquest.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/resetquest.java @@ -16,7 +16,7 @@ import net.Zrips.CMILib.Locale.LC; public class resetquest implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!Jobs.getGCManager().DailyQuestsEnabled) { LC.info_FeatureNotEnabled.sendMessage(sender); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/resetquesttotal.java b/src/main/java/com/gamingmesh/jobs/commands/list/resetquesttotal.java index 6157158d..c35206bf 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/resetquesttotal.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/resetquesttotal.java @@ -16,7 +16,7 @@ import net.Zrips.CMILib.Locale.LC; public class resetquesttotal implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!Jobs.getGCManager().DailyQuestsEnabled) { LC.info_FeatureNotEnabled.sendMessage(sender); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/schedule.java b/src/main/java/com/gamingmesh/jobs/commands/list/schedule.java index 10d5daf8..cb7fac49 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/schedule.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/schedule.java @@ -13,7 +13,7 @@ import com.gamingmesh.jobs.commands.Cmd; public class schedule implements Cmd { @Override - public boolean perform(final Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(final Jobs plugin, final CommandSender sender, final String[] args) { if (args.length < 2) { Jobs.getCommandManager().sendUsage(sender, "schedule"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/shop.java b/src/main/java/com/gamingmesh/jobs/commands/list/shop.java index 3d2e569d..07c719fc 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/shop.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/shop.java @@ -11,7 +11,7 @@ import net.Zrips.CMILib.Locale.LC; public class shop implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!Jobs.getGCManager().jobsshopenabled) { LC.info_FeatureNotEnabled.sendMessage(sender); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/signupdate.java b/src/main/java/com/gamingmesh/jobs/commands/list/signupdate.java index cc345a24..29357564 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/signupdate.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/signupdate.java @@ -10,7 +10,7 @@ import com.gamingmesh.jobs.container.Job; public class signupdate implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!Jobs.getGCManager().SignsEnabled) return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/skipquest.java b/src/main/java/com/gamingmesh/jobs/commands/list/skipquest.java index 427c4670..0c63b33e 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/skipquest.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/skipquest.java @@ -18,7 +18,7 @@ import net.Zrips.CMILib.Locale.LC; public class skipquest implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!Jobs.getGCManager().DailyQuestsEnabled) { LC.info_FeatureNotEnabled.sendMessage(sender); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/stats.java b/src/main/java/com/gamingmesh/jobs/commands/list/stats.java index 3ac24194..87a37459 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/stats.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/stats.java @@ -8,6 +8,7 @@ import com.gamingmesh.jobs.commands.Cmd; import com.gamingmesh.jobs.commands.JobsCommands; import com.gamingmesh.jobs.container.JobProgression; import com.gamingmesh.jobs.container.JobsPlayer; +import com.gamingmesh.jobs.i18n.Language; import net.Zrips.CMILib.Locale.LC; import net.Zrips.CMILib.Messages.CMIMessages; @@ -16,42 +17,42 @@ import net.Zrips.CMILib.RawMessages.RawMessage; public class stats implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { - JobsPlayer jPlayer = null; - if (args.length >= 1) { - if (!Jobs.hasPermission(sender, "jobs.command.admin.stats", true)) - return true; - jPlayer = Jobs.getPlayerManager().getJobsPlayer(args[0]); - } else if (sender instanceof Player) - jPlayer = Jobs.getPlayerManager().getJobsPlayer((Player) sender); + JobsPlayer jPlayer = null; + if (args.length >= 1) { + if (!Jobs.hasPermission(sender, "jobs.command.admin.stats", true)) + return true; + jPlayer = Jobs.getPlayerManager().getJobsPlayer(args[0]); + } else if (sender instanceof Player p) + jPlayer = Jobs.getPlayerManager().getJobsPlayer(p); - if (jPlayer == null) { - if (args.length >= 1) - CMIMessages.sendMessage(sender, LC.info_NoInformation); - else - Jobs.getCommandManager().sendUsage(sender, "stats"); - return true; - } + if (jPlayer == null) { + if (args.length >= 1) + CMIMessages.sendMessage(sender, LC.info_NoInformation); + else + Jobs.getCommandManager().sendUsage(sender, "stats"); + return true; + } - if (jPlayer.progression.isEmpty()) { - sender.sendMessage(Jobs.getLanguage().getMessage("command.stats.error.nojob")); - return true; - } + if (jPlayer.progression.isEmpty()) { + Language.sendMessage(sender, "command.stats.error.nojob"); + return true; + } - sender.sendMessage(Jobs.getLanguage().getMessage("general.info.toplineseparator", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getDisplayName())); + Language.sendMessage(sender, "general.info.toplineseparator", "%playername%", jPlayer.getName(), "%playerdisplayname%", jPlayer.getDisplayName()); - String leftClick = Jobs.getLanguage().getMessage("command.info.gui.leftClick"); + String leftClick = Jobs.getLanguage().getMessage("command.info.gui.leftClick"); - String pref = JobsCommands.LABEL + " " + info.class.getSimpleName() + " "; + String pref = JobsCommands.LABEL + " " + info.class.getSimpleName() + " "; - for (JobProgression jobProg : jPlayer.getJobProgression()) { - for (String msg : Jobs.getCommandManager().jobStatsMessage(jobProg).split("\n")) { - new RawMessage().addText(msg).addHover(leftClick).addCommand(pref + jobProg.getJob().getName()).show(sender); - } - } + for (JobProgression jobProg : jPlayer.getJobProgression()) { + for (String msg : Jobs.getCommandManager().jobStatsMessage(jobProg, sender instanceof Player).split("\n")) { + new RawMessage().addText(msg).addHover(leftClick).addCommand(pref + jobProg.getJob().getName()).show(sender); + } + } - sender.sendMessage(Jobs.getLanguage().getMessage("general.info.separator")); - return true; + Language.sendMessage(sender, "general.info.separator"); + return true; } } diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/toggle.java b/src/main/java/com/gamingmesh/jobs/commands/list/toggle.java index 3aa83c9e..3869cc3f 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/toggle.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/toggle.java @@ -15,7 +15,7 @@ import net.Zrips.CMILib.Messages.CMIMessages; public class toggle implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (!(sender instanceof Player)) { CMIMessages.sendMessage(sender, LC.info_Ingame); return false; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/top.java b/src/main/java/com/gamingmesh/jobs/commands/list/top.java index 573d4179..09a1a3e2 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/top.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/top.java @@ -21,7 +21,7 @@ import net.Zrips.CMILib.Scoreboards.CMIScoreboard; public class top implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length != 1 && args.length != 2) { Jobs.getCommandManager().sendUsage(sender, "top"); diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/transfer.java b/src/main/java/com/gamingmesh/jobs/commands/list/transfer.java index 5f8c44ad..91ee0ce9 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/transfer.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/transfer.java @@ -11,7 +11,7 @@ import com.gamingmesh.jobs.container.JobsPlayer; public class transfer implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { if (args.length < 3) { Jobs.getCommandManager().sendUsage(sender, "transfer"); return true; diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/version.java b/src/main/java/com/gamingmesh/jobs/commands/list/version.java index 0bca2436..ebe8c6a6 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/version.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/version.java @@ -18,7 +18,7 @@ import net.milkbowl.vault.economy.Economy; public class version implements Cmd { @Override - public boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { + public Boolean perform(Jobs plugin, final CommandSender sender, final String[] args) { Bukkit.getScheduler().runTaskAsynchronously(plugin, new Runnable() { @Override