mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-07-02 18:53:43 +00:00
We can't damage and kill, so we will just kill to make everyone happy, and the event pointless.
This commit is contained in:
parent
3a60191a9d
commit
705efc6002
|
@ -3,7 +3,6 @@ package com.earth2me.essentials.commands;
|
|||
import static com.earth2me.essentials.I18n._;
|
||||
import com.earth2me.essentials.User;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.event.entity.EntityDamageEvent;
|
||||
|
||||
|
||||
public class Commandsuicide extends EssentialsCommand
|
||||
|
@ -16,9 +15,6 @@ public class Commandsuicide extends EssentialsCommand
|
|||
@Override
|
||||
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
|
||||
{
|
||||
EntityDamageEvent ede = new EntityDamageEvent(user.getBase(), EntityDamageEvent.DamageCause.SUICIDE, 1000);
|
||||
server.getPluginManager().callEvent(ede);
|
||||
user.damage(1000);
|
||||
user.setHealth(0);
|
||||
user.sendMessage(_("suicideMessage"));
|
||||
user.setDisplayNick();
|
||||
|
|
Loading…
Reference in a new issue