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 /plot visit [player] command #38

Merged
merged 2 commits into from
May 9, 2021

Conversation

tyler569
Copy link
Contributor

@tyler569 tyler569 commented May 7, 2021

This adds the ability to visit a player's claimed plot.

To accomplish this, I add a new function to database that can find a
plot's x, z coordinates by name, a new option to handle_plot_command,
and new entries to the completion tree.

I tested this to work for multiple players, and it does not break if
someone has multiple plots, though you will always only go to one.

This adds the ability to visit a player's claimed plot.

To accomplish this, I add a new function to `database` that can find a
plot's x, z coordinates by name, a new option to handle_plot_command,
and new entries to the completion tree.

I tested this to work for multiple players, and it does not break if
someone has multiple plots, though you will always only go to one.
@AL1L
Copy link
Contributor

AL1L commented May 7, 2021

How does it handle if a player has more than one plot? It just get the first one it finds?

Copy link
Contributor

@AL1L AL1L left a comment

Choose a reason for hiding this comment

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

Well... it works

Comment on lines -619 to +628
// 40: /p auto
// 40: /p middle
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of scope ;) I'll let it slide haha

@tyler569
Copy link
Contributor Author

tyler569 commented May 8, 2021

Currently, if a player has more than one plot /p v player will take you to the first one SQLite returns, likely the first one they claimed. We could make it any with /p v player [number] or something and some more complicated SQL, but I see that more as an improvement for later than super necessary. I can work on it if people feel differently though.

I've updated the branch to check argument count.

@StackDoubleFlow StackDoubleFlow merged commit 7dd0ad7 into MCHPR:master May 9, 2021
@tyler569 tyler569 deleted the plot_visit branch May 12, 2021 06:04
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