use of at.haha007.edenclient.utils.PlayerUtils.sendModMessage in project EdenClient by HahaOO7.
the class Nuker method removeCommand.
private ArgumentBuilder<ClientCommandSource, ?> removeCommand() {
LiteralArgumentBuilder<ClientCommandSource> cmd = literal("remove");
cmd.then(argument("type", StringArgumentType.word()).suggests((context, builder) -> {
for (Block block : filter) {
builder.suggest(Registry.BLOCK.getId(block).getPath());
}
return builder.buildFuture();
}).executes(context -> {
String name = context.getArgument("type", String.class);
Identifier identifier = new Identifier(name);
filter.remove(Registry.BLOCK.get(identifier));
PlayerUtils.sendModMessage("Removed " + name);
return 1;
}));
return cmd;
}
Aggregations