forked from SteamWar/SteamWar
Format code
This commit is contained in:
@@ -84,8 +84,7 @@ public class SWCommand extends AbstractSWCommand<Chatter> {
|
||||
@Override
|
||||
public List<String> suggest(Invocation invocation) {
|
||||
String[] args = invocation.arguments();
|
||||
if (args.length == 0)
|
||||
args = new String[]{""};
|
||||
if (args.length == 0) args = new String[]{""};
|
||||
|
||||
return SWCommand.this.tabComplete(Chatter.of(invocation.source()), invocation.alias(), args);
|
||||
}
|
||||
@@ -99,8 +98,7 @@ public class SWCommand extends AbstractSWCommand<Chatter> {
|
||||
|
||||
@Override
|
||||
public void unregister() {
|
||||
if (command == null)
|
||||
return;
|
||||
if (command == null) return;
|
||||
|
||||
VelocityCore.getProxy().getCommandManager().unregister(name);
|
||||
DiscordBot.getCommands().remove(name);
|
||||
@@ -108,8 +106,7 @@ public class SWCommand extends AbstractSWCommand<Chatter> {
|
||||
|
||||
@Override
|
||||
public void register() {
|
||||
if (command == null)
|
||||
return;
|
||||
if (command == null) return;
|
||||
|
||||
VelocityCore.getProxy().getCommandManager().register(VelocityCore.getProxy().getCommandManager().metaBuilder(name).aliases(aliases).plugin(VelocityCore.get()).build(), command);
|
||||
DiscordBot.getCommands().put(name, this);
|
||||
|
||||
Reference in New Issue
Block a user