Skip to content

Commit

Permalink
Removed test
Browse files Browse the repository at this point in the history
  • Loading branch information
divios committed Dec 23, 2021
1 parent ea9f7c8 commit a200afd
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions src/main/java/io/github/divios/jcommands/JCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.Arrays;

@SuppressWarnings("unused")
public final class JCommands extends JavaPlugin{
public final class JCommands {

private static JavaPlugin providerPlugin;

Expand All @@ -22,32 +22,4 @@ static void registerCommand(JCommand command) {
new JCommandListener(providerPlugin, command);
}

@Override
public void onEnable() {
register(this);

JCommand.create("jcommand")
.withAliases("jcmd", "jc")
.assertPermission("jcommands.admin")
.assertUsage("<nothing>")
.withArguments(new BooleanArgument())
.withSubcommands(JCommand.create("spawn")
.withArguments(new PlayerArgument())
.assertUsage("<player>")
.executesPlayer((player, values) -> values.get(1).getAsPlayer().sendMessage("spawn was executed"))
)
.withSubcommands(JCommand.create("open")
.assertUsage("<shop>")
.withArguments(new StringArgument()
.overrideSuggestions(() -> Arrays.asList("drops", "block", "equipment"), true)
)
.executesPlayer((player, values) -> player.sendMessage(values.get(0).getAsString()))
)
.executesPlayer((player, values) -> {
player.sendMessage("default was executed");
})
.register();

}

}

0 comments on commit a200afd

Please sign in to comment.