Code cleanup
This commit is contained in:
parent
cc574c3450
commit
ffa7c3f850
3 changed files with 2 additions and 6 deletions
|
@ -79,9 +79,6 @@ public class CommandCaller implements CommandExecutor {
|
|||
@Override
|
||||
public boolean onCommand(CommandSender sender, Command command,
|
||||
String alias, String[] args) {
|
||||
// TODO: Test if path exists, if not,
|
||||
// go up one level, and
|
||||
// finally fallback to args.length==0
|
||||
String path = command.getName();
|
||||
for (String arg : args)
|
||||
path += "/" + arg;
|
||||
|
@ -91,7 +88,6 @@ public class CommandCaller implements CommandExecutor {
|
|||
path = path.substring(0, path.lastIndexOf('/'));
|
||||
argc++;
|
||||
cmd = commands.get(path);
|
||||
System.out.println(path);
|
||||
}
|
||||
if (cmd == null) {
|
||||
sender.sendMessage("§cInternal error: Command not registered to CommandCaller");
|
||||
|
|
|
@ -4,7 +4,7 @@ import io.github.norbipeti.thebuttonmcchat.commands.ucmds.UCommandBase;
|
|||
|
||||
public abstract class AdminCommandBase extends UCommandBase {
|
||||
|
||||
public abstract String[] GetHelpText(String alias); //TODO: Require permissionű
|
||||
public abstract String[] GetHelpText(String alias); //TODO: Require permission
|
||||
|
||||
@Override
|
||||
public String GetUCommandPath() {
|
||||
|
|
|
@ -26,7 +26,7 @@ public class UpdatePlugin extends AdminCommandBase {
|
|||
URL url;
|
||||
try {
|
||||
url = new URL(
|
||||
"https://github.com/NorbiPeti/thebuttonmcchat/raw/master/TheButtonMCChat.jar"); //TODO: Save with this name
|
||||
"https://github.com/NorbiPeti/thebuttonmcchat/raw/master/TheButtonMCChat.jar");
|
||||
FileUtils.copyURLToFile(url, new File(
|
||||
"plugins/TheButtonMCChat.jar"));
|
||||
sender.sendMessage("Updating done!");
|
||||
|
|
Loading…
Reference in a new issue