1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-24 15:23:20 +02: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:
md_5
2012-05-05 20:01:18 +10:00
parent 810d44dbad
commit d54a1bb9bd

View File

@@ -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();