Posted June 25, 20214 yr why doesn't this command use the current player as the default target? private static final RiftCommand INSTANCE = new RiftCommand(); public static void register(@Nonnull CommandDispatcher<CommandSource> dispatcher) { dispatcher.register(literal("rift") .requires((commandSource) -> commandSource.hasPermission(2)) .then(argument("target", EntityArgument.player()) .executes(INSTANCE)) ); }
June 25, 20214 yr 7 minutes ago, TheOnlyTails said: why doesn't this command use the current player as the default target? since EntityArgument#player only uses the current player (the player which is execute the command), use EntityArgument#players to be able to choose from several players, or EntityArgument#entities to get all Entities Edited June 25, 20214 yr by Luis_ST
June 25, 20214 yr Author That's not my question. I want to make it so if I don't input a target, it will use the current player as a target instead (similar to /tp).
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.