Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add confirmation messages to home and warp commands #27

Open
wants to merge 3 commits into
base: 1.21.x
Choose a base branch
from

Conversation

dinkley
Copy link

@dinkley dinkley commented Apr 9, 2024

Add README which reflects the mod's purpose, and links to download it since binaries aren't being shared as releases in the repo.

Add README which reflects the mod's purpose, and links to download it since binaries aren't being shared as releases in the repo.
Add documentation link
@dinkley
Copy link
Author

dinkley commented Apr 12, 2024

Also added confirmation messages to the /sethome, /delhome, /setwarp and /delwarp commands, not sure why it merged it with the same PR though.

WarpHandler.add(context.getSource().getPlayerOrException(), StringArgumentType.getString(context, "name"));
ServerPlayer player = context.getSource().getPlayerOrException();
String warpName = StringArgumentType.getString(context, "name");
WarpHandler.add(player, warpName);
Copy link
Member

Choose a reason for hiding this comment

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

this need to return if add returns false

Suggested change
WarpHandler.add(player, warpName);
if (!WarpHandler.add(player, warpName)) return 0;

HomeHandler.add(context.getSource().getPlayerOrException(), StringArgumentType.getString(context, "name"));
ServerPlayer player = context.getSource().getPlayerOrException();
String homeName = StringArgumentType.getString(context, "name");
HomeHandler.add(player, homeName);
Copy link
Member

Choose a reason for hiding this comment

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

this need to return if add returns false

Suggested change
HomeHandler.add(player, homeName);
if (!HomeHandler.add(player, homeName)) return 0;

@ThatGravyBoat ThatGravyBoat changed the title Add README for the repository Add confirmation messages to home and warp commands Apr 12, 2024
@ThatGravyBoat
Copy link
Member

Closes #26

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.

2 participants