Depends exactly on how you want it to happen, because there's a couple of different ways. I recommend using what the kill command uses (you can have a look at CommandKill) which is Entity#onKillCommand.
Depends exactly on how you want it to happen, because there's a couple of different ways. I recommend using what the kill command uses (you can have a look at CommandKill) which is Entity#onKillCommand.
Thank you! It works!
But when player dead, forge said "Player*** fell out of the world". I don't want to show it. Please help me!
Then I suggest having a look at what the method does, and manually call the methods it uses to kill the player so that you're not sending the chat message.
Hi, all.
I want to kill the player. What should I do?
Forge, MCP, or?
Depends exactly on how you want it to happen, because there's a couple of different ways. I recommend using what the kill command uses (you can have a look at CommandKill) which is Entity#onKillCommand.
Thank you! It works!
But when player dead, forge said "Player*** fell out of the world". I don't want to show it. Please help me!
[forge 1.7.10-10.13.4.1614]
Then I suggest having a look at what the method does, and manually call the methods it uses to kill the player so that you're not sending the chat message.
Did you try getting the player entity and setting it's health to 0?
Not doing mc modding that much anymore because I am making a full blown game that does not have limitations that mc has. (rip Magiology for now)
I may come back if MC fixes it's rendering pipeline.
Thank you! I was forgetting about it...