Never give our user object to other plugins!

This commit is contained in:
snowleo 2012-02-21 18:41:27 +01:00
parent cf7da7a83f
commit 9bd0c33fef

View File

@ -16,7 +16,7 @@ public class Commandsuicide extends EssentialsCommand
@Override @Override
public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception public void run(final Server server, final User user, final String commandLabel, final String[] args) throws Exception
{ {
EntityDamageEvent ede = new EntityDamageEvent(user, EntityDamageEvent.DamageCause.SUICIDE, 1000); EntityDamageEvent ede = new EntityDamageEvent(user.getBase(), EntityDamageEvent.DamageCause.SUICIDE, 1000);
server.getPluginManager().callEvent(ede); server.getPluginManager().callEvent(ede);
user.damage(1000); user.damage(1000);
user.setHealth(0); user.setHealth(0);