Skip to content

Conversation

@Ryvu1
Copy link
Contributor

@Ryvu1 Ryvu1 commented Jan 12, 2026

No description provided.

.then(argument("name", StringArgumentType.word()).executes(context -> {
final var pos = BlockPosArgument.getLoadedBlockPos(context, "pos");
final var name = StringArgumentType.getString(context, "name");
ServerLevel level = context.getSource().getLevel();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

level variable should be used below if we're already creating it anyways. Currently seems to be unused?

final var pos = BlockPosArgument.getLoadedBlockPos(context, "pos");
final var name = StringArgumentType.getString(context, "name");
ServerLevel level = context.getSource().getLevel();
WaystonesAPI.placeWaystone(context.getSource().getLevel(), pos, WaystoneStyles.DEFAULT).ifPresent(waystone -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of always using WaystoneStyles.DEFAULT, there should be a parameter for the style to use

.then(Commands.literal("place")
.requires(BalmCommands.requirePermission(PERMISSION_WAYSTONES_ACTIVATE))
.then(argument("pos", BlockPosArgument.blockPos())
.then(argument("name", StringArgumentType.word()).executes(context -> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.word() limits it to a single word in a name, but waystone names can have multiple words too

}))))

.then(Commands.literal("place")
.requires(BalmCommands.requirePermission(PERMISSION_WAYSTONES_ACTIVATE))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should use its own permission rather than reusing the /waystones activate permission

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants