mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Simplify CommandBase's onCommand
Added some TODOs to do Replaced "dynamic" regex with cached Patterns
This commit is contained in:
30 files changed
+122
-106
No files matched your search
@@ -21,10 +21,10 @@ import java.util.Set;
|
||||
public class WarpCommand extends CommandBase {
|
||||
|
||||
@Override
|
||||
protected boolean onCommand(Player p, Command command, String label, String[] args) {
|
||||
protected void onCommand(Player p, Command command, String label, String[] args) {
|
||||
if (!HuskHomes.getSettings().doWarpCommand()) {
|
||||
MessageManager.sendMessage(p, "error_command_disabled");
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
if (args.length == 1) {
|
||||
String warpName = args[0];
|
||||
@@ -37,7 +37,6 @@ public class WarpCommand extends CommandBase {
|
||||
} else {
|
||||
ListHandler.displayWarpList(p, 1);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static class Tab implements TabCompleter {
|
||||
|
||||
Reference in new issue
Block a user