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 kill command #107

Merged
merged 4 commits into from
Oct 1, 2024
Merged

Add kill command #107

merged 4 commits into from
Oct 1, 2024

Conversation

Alerty2
Copy link
Contributor

@Alerty2 Alerty2 commented Sep 29, 2024

This change adds the /kill command to the server. However, it only makes the sound, shows the particles and the player can't move anymore instead of properly dying. This happens because the command calls the kill function on entity/mod.rs which only does that.

@Snowiiii
Copy link
Owner

Hey, Thanks for the PR :D. I currently did not implemented respawning, thats the reason the Player is proberbly stuck. Btw you forgot to format thats the reason CI is mad.

@Alerty2
Copy link
Contributor Author

Alerty2 commented Sep 30, 2024

Perfect, I've just formatted the code, thank you for the advice!

Comment on lines 22 to 24
target.send_system_message(
TextComponent::text("You have been killed.").color_named(NamedColor::Red),
);
Copy link
Owner

Choose a reason for hiding this comment

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

Vanilla does not send a message to the killed target. We also should not

@Alerty2
Copy link
Contributor Author

Alerty2 commented Oct 1, 2024

Ok ,done. I confused and written kick instead of kill but only on the name of the commit.

@Snowiiii
Copy link
Owner

Snowiiii commented Oct 1, 2024

Looks good to me then. We should definitely add support for killing entites as well not only players in the future.

@Snowiiii Snowiiii merged commit 0603060 into Snowiiii:master Oct 1, 2024
5 checks passed
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