Code cleanup

This commit is contained in:
Norbi Peti 2016-06-25 10:59:42 +02:00
parent cc574c3450
commit ffa7c3f850
3 changed files with 2 additions and 6 deletions

View file

@ -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");

View file

@ -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() {

View file

@ -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!");