Implements the ability to customise and remove Player death messages.

By: Rigby <rigby@onarandombox.com>
This commit is contained in:
CraftBukkit/Spigot 2011-09-21 16:32:37 +01:00
parent f0d0cb2214
commit dec020c554

View file

@ -293,9 +293,9 @@ public class CraftEventFactory {
return event;
}
public static PlayerDeathEvent callPlayerDeathEvent(EntityPlayer victim, List<org.bukkit.inventory.ItemStack> drops) {
public static PlayerDeathEvent callPlayerDeathEvent(EntityPlayer victim, List<org.bukkit.inventory.ItemStack> drops, String deathMessage) {
CraftPlayer entity = (CraftPlayer)victim.getBukkitEntity();
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0);
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
org.bukkit.World world = entity.getWorld();
Bukkit.getServer().getPluginManager().callEvent(event);