Minecraft Script] Player should have 5 lives and then be banned?

pi
4

Since I didn't find a suitable tutorial, I wrote a script as I thought, but of course it doesn't work. Can I improve the jmd? My goal is that if the number of deaths is greater than 4, that is 5, then you will be banned. I don't know how to do that.

Kind regards. MinimiTastisch

on death of player:

if death> 4:

make console execute command "kick% player% & cYou have been & 4banned & cas you have somehow & 4died & c."

wait 10 ticks

make console execute command "/ ban% player% & cYou have been & 4banned & cas you have somehow died."

Sn

So first of all you don't need to kick the player. If you ban him, he will be kicked automatically. You must save the deaths in a file (e.g. The config) so that the number of deaths survives a server restart (of course for each player individually).

The onPlayerDeath EventHandler is called when a player dies

@EventHandler
public void onPlayerDeath (PlayerDeathEvent event) {
// Here you have to see if the player has already died 4x
}

pi

But that is programming bukkit. I need a script

Sn

Ah sorry. Thought you were talking about bukkit. Unfortunately, I'm not familiar with scripts

pi

Ok thanks anyway, no problem