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

Setting player.health to 0 bugs #1485

Open
PeakDominance opened this issue Jan 29, 2025 · 3 comments
Open

Setting player.health to 0 bugs #1485

PeakDominance opened this issue Jan 29, 2025 · 3 comments

Comments

@PeakDominance
Copy link

I wanted to kill players by setting the player.health variable to 0 or a negative value, however it displays the default Minecraft death screen for them and after they click Respawn it spawns them on some vanilla world. Setting max-health to 0 or negative actually sets it to half a heart, so maybe it could be the same with health if proper killing isn't an option?

@Pablete1234
Copy link
Member

Under which context are you attempting to kill players?

The main concern is how this will look in terms of death message and such. Should it be a separate death? should it act like combat-log where it tries to use your previous damage as the reason for your death? etc

@PeakDominance
Copy link
Author

Under which context are you attempting to kill players?

The main concern is how this will look in terms of death message and such. Should it be a separate death? should it act like combat-log where it tries to use your previous damage as the reason for your death? etc

I don't have a context right now, because I've realised it wouldn't work for what I was trying to do. Namely, I wanted to find a better way of increasing map's void level than setting players' health to 1 + teleporting them into the deep void and that would just have no way to display the correct death message. Since it can be used for many things I think the most appropriate message would be the generic one

@Pablete1234
Copy link
Member

If we were to use the generic message, that means no killrewards for kills at all. Knocking people into the void would not reward anything

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

No branches or pull requests

2 participants