Skip to content

Commit

Permalink
Remove broken example
Browse files Browse the repository at this point in the history
I blame Crosby on this one >:[
  • Loading branch information
Big-Iron-Cheems committed May 3, 2024
1 parent 12c03fb commit c9ef8da
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/main/java/com/example/addon/commands/CommandExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
import meteordevelopment.meteorclient.commands.Command;
import net.minecraft.command.CommandSource;
import net.minecraft.command.argument.EntityArgumentType;
import net.minecraft.entity.player.PlayerEntity;

import static com.mojang.brigadier.Command.SINGLE_SUCCESS;

Expand All @@ -32,12 +30,5 @@ public void build(LiteralArgumentBuilder<CommandSource> builder) {
info("hi, " + argument);
return SINGLE_SUCCESS;
})));

builder.then(literal("player").then(argument("playerArgument", EntityArgumentType.player()).executes(context -> {
PlayerEntity player = context.getArgument("playerArgument", PlayerEntity.class);
String playerName = player.getGameProfile().getName();
info("hi, " + playerName);
return SINGLE_SUCCESS;
})));
}
}

0 comments on commit c9ef8da

Please sign in to comment.