Fix
This commit is contained in:
@@ -5,8 +5,8 @@ import io.izzel.taboolib.module.locale.TLocale;
|
||||
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
||||
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
||||
import io.izzel.taboolib.module.command.base.BaseCommand;
|
||||
import io.izzel.taboolib.module.command.base.CommandArgument;
|
||||
import io.izzel.taboolib.module.command.base.CommandRegister;
|
||||
import io.izzel.taboolib.module.command.base.Argument;
|
||||
import io.izzel.taboolib.module.command.base.SubCommand;
|
||||
import io.izzel.taboolib.util.ArrayUtil;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -18,8 +18,7 @@ import org.bukkit.entity.Player;
|
||||
* @Since 2018-07-04 21:32
|
||||
*/
|
||||
@BaseCommand(
|
||||
name = "taboolibexecute",
|
||||
aliases = {"texecute"},
|
||||
name = "tExecute",
|
||||
permission = "taboolib.admin"
|
||||
)
|
||||
public class TabooLibExecuteCommand extends BaseMainCommand {
|
||||
@@ -29,7 +28,7 @@ public class TabooLibExecuteCommand extends BaseMainCommand {
|
||||
return TLocale.asString("COMMANDS.TEXECUTE.COMMAND-TITLE");
|
||||
}
|
||||
|
||||
@CommandRegister(priority = 1)
|
||||
@SubCommand(priority = 1)
|
||||
BaseSubCommand chat = new BaseSubCommand() {
|
||||
|
||||
@Override
|
||||
@@ -43,10 +42,10 @@ public class TabooLibExecuteCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[] {
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TEXECUTE.CHAT.ARGUMENTS.0")),
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TEXECUTE.CHAT.ARGUMENTS.1"))
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[] {
|
||||
new Argument(TLocale.asString("COMMANDS.TEXECUTE.CHAT.ARGUMENTS.0")),
|
||||
new Argument(TLocale.asString("COMMANDS.TEXECUTE.CHAT.ARGUMENTS.1"))
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,7 +60,7 @@ public class TabooLibExecuteCommand extends BaseMainCommand {
|
||||
}
|
||||
};
|
||||
|
||||
@CommandRegister(priority = 1)
|
||||
@SubCommand(priority = 1)
|
||||
BaseSubCommand command = new BaseSubCommand() {
|
||||
@Override
|
||||
public String getLabel() {
|
||||
@@ -79,10 +78,10 @@ public class TabooLibExecuteCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[] {
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TEXECUTE.COMMAND.ARGUMENTS.0")),
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TEXECUTE.COMMAND.ARGUMENTS.1"))
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[] {
|
||||
new Argument(TLocale.asString("COMMANDS.TEXECUTE.COMMAND.ARGUMENTS.0")),
|
||||
new Argument(TLocale.asString("COMMANDS.TEXECUTE.COMMAND.ARGUMENTS.1"))
|
||||
};
|
||||
}
|
||||
|
||||
@@ -101,7 +100,7 @@ public class TabooLibExecuteCommand extends BaseMainCommand {
|
||||
}
|
||||
};
|
||||
|
||||
@CommandRegister(priority = 2)
|
||||
@SubCommand(priority = 2)
|
||||
BaseSubCommand commandAsOp = new BaseSubCommand() {
|
||||
|
||||
@Override
|
||||
@@ -120,10 +119,10 @@ public class TabooLibExecuteCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[] {
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TEXECUTE.COMMAND-AS-OP.ARGUMENTS.0")),
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TEXECUTE.COMMAND-AS-OP.ARGUMENTS.1"))
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[] {
|
||||
new Argument(TLocale.asString("COMMANDS.TEXECUTE.COMMAND-AS-OP.ARGUMENTS.0")),
|
||||
new Argument(TLocale.asString("COMMANDS.TEXECUTE.COMMAND-AS-OP.ARGUMENTS.1"))
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import io.izzel.taboolib.module.locale.TLocaleLoader;
|
||||
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
||||
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
||||
import io.izzel.taboolib.module.command.base.BaseCommand;
|
||||
import io.izzel.taboolib.module.command.base.CommandArgument;
|
||||
import io.izzel.taboolib.module.command.base.CommandRegister;
|
||||
import io.izzel.taboolib.module.command.base.Argument;
|
||||
import io.izzel.taboolib.module.command.base.SubCommand;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -22,8 +22,7 @@ import java.util.stream.IntStream;
|
||||
* @since 2018-04-22 14:36:28
|
||||
*/
|
||||
@BaseCommand(
|
||||
name = "tabooliblocale",
|
||||
aliases = {"taboolocale", "tlocale"},
|
||||
name = "tLocale",
|
||||
permission = "taboolib.admin"
|
||||
)
|
||||
public class TabooLibLocaleCommand extends BaseMainCommand {
|
||||
@@ -33,7 +32,7 @@ public class TabooLibLocaleCommand extends BaseMainCommand {
|
||||
return TLocale.asString("COMMANDS.TLOCALE.COMMAND-TITLE");
|
||||
}
|
||||
|
||||
@CommandRegister
|
||||
@SubCommand
|
||||
BaseSubCommand send = new BaseSubCommand() {
|
||||
|
||||
@Override
|
||||
@@ -47,11 +46,11 @@ public class TabooLibLocaleCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[] {
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TLOCALE.SEND.ARGUMENTS.0")),
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TLOCALE.SEND.ARGUMENTS.1")),
|
||||
new CommandArgument(TLocale.asString("COMMANDS.TLOCALE.SEND.ARGUMENTS.2"), false)
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[] {
|
||||
new Argument(TLocale.asString("COMMANDS.TLOCALE.SEND.ARGUMENTS.0")),
|
||||
new Argument(TLocale.asString("COMMANDS.TLOCALE.SEND.ARGUMENTS.1")),
|
||||
new Argument(TLocale.asString("COMMANDS.TLOCALE.SEND.ARGUMENTS.2"), false)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import io.izzel.taboolib.module.locale.TLocale;
|
||||
import io.izzel.taboolib.module.command.base.BaseCommand;
|
||||
import io.izzel.taboolib.module.command.base.BaseMainCommand;
|
||||
import io.izzel.taboolib.module.command.base.BaseSubCommand;
|
||||
import io.izzel.taboolib.module.command.base.CommandArgument;
|
||||
import io.izzel.taboolib.module.command.base.CommandRegister;
|
||||
import io.izzel.taboolib.module.command.base.Argument;
|
||||
import io.izzel.taboolib.module.command.base.SubCommand;
|
||||
import io.izzel.taboolib.util.plugin.PluginLoadState;
|
||||
import io.izzel.taboolib.util.plugin.PluginLoadStateType;
|
||||
import io.izzel.taboolib.util.plugin.PluginUnloadState;
|
||||
@@ -27,8 +27,7 @@ import java.util.stream.Collectors;
|
||||
* @Since 2018-05-07 20:14
|
||||
*/
|
||||
@BaseCommand(
|
||||
name = "taboolibplugin",
|
||||
aliases = {"tabooplugin", "tplugin"},
|
||||
name = "tPlugin",
|
||||
permission = "taboolib.admin"
|
||||
)
|
||||
public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
@@ -38,7 +37,7 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
return TLocale.asString("COMMANDS.TPLUGIN.COMMAND-TITLE");
|
||||
}
|
||||
|
||||
@CommandRegister(priority = 1)
|
||||
@SubCommand(priority = 1)
|
||||
BaseSubCommand load = new BaseSubCommand() {
|
||||
|
||||
@Override
|
||||
@@ -52,8 +51,8 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[] {new CommandArgument(TLocale.asString("COMMANDS.TPLUGIN.LOAD.ARGUMENTS.0"), true)};
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[] {new Argument(TLocale.asString("COMMANDS.TPLUGIN.LOAD.ARGUMENTS.0"), true)};
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -88,7 +87,7 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
};
|
||||
|
||||
@CommandRegister(priority = 2)
|
||||
@SubCommand(priority = 2)
|
||||
BaseSubCommand unload = new BaseSubCommand() {
|
||||
|
||||
@Override
|
||||
@@ -102,8 +101,8 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[] {new CommandArgument(TLocale.asString("COMMANDS.TPLUGIN.UNLOAD.ARGUMENTS.0"), true, () -> {
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[] {new Argument(TLocale.asString("COMMANDS.TPLUGIN.UNLOAD.ARGUMENTS.0"), true, () -> {
|
||||
return java.util.Arrays.stream(Bukkit.getPluginManager().getPlugins()).map(Plugin::getName).collect(Collectors.toList());
|
||||
})};
|
||||
}
|
||||
@@ -132,7 +131,7 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
};
|
||||
|
||||
@CommandRegister(priority = 3)
|
||||
@SubCommand(priority = 3)
|
||||
BaseSubCommand reload = new BaseSubCommand() {
|
||||
|
||||
@Override
|
||||
@@ -146,8 +145,8 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[] {new CommandArgument(TLocale.asString("COMMANDS.TPLUGIN.RELOAD.ARGUMENTS.0"), true, () -> {
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[] {new Argument(TLocale.asString("COMMANDS.TPLUGIN.RELOAD.ARGUMENTS.0"), true, () -> {
|
||||
return Arrays.stream(Bukkit.getPluginManager().getPlugins()).map(Plugin::getName).collect(Collectors.toList());
|
||||
})};
|
||||
}
|
||||
@@ -167,7 +166,7 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
};
|
||||
|
||||
@CommandRegister(priority = 4)
|
||||
@SubCommand(priority = 4)
|
||||
BaseSubCommand info = new BaseSubCommand() {
|
||||
|
||||
@Override
|
||||
@@ -181,8 +180,8 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[] {new CommandArgument(TLocale.asString("COMMANDS.TPLUGIN.INFO.ARGUMENTS.0"), true, () -> {
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[] {new Argument(TLocale.asString("COMMANDS.TPLUGIN.INFO.ARGUMENTS.0"), true, () -> {
|
||||
return Arrays.stream(Bukkit.getPluginManager().getPlugins()).map(Plugin::getName).collect(Collectors.toList());
|
||||
})};
|
||||
}
|
||||
@@ -212,7 +211,7 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
};
|
||||
|
||||
@CommandRegister(priority = 5)
|
||||
@SubCommand(priority = 5)
|
||||
BaseSubCommand list = new BaseSubCommand() {
|
||||
|
||||
@Override
|
||||
@@ -226,8 +225,8 @@ public class TabooLibPluginCommand extends BaseMainCommand {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommandArgument[] getArguments() {
|
||||
return new CommandArgument[0];
|
||||
public Argument[] getArguments() {
|
||||
return new Argument[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user