13
0
geforkt von Mirrors/Paper

Implements the ability to customise and disable Player death messages.

By: Rigby <rigby@onarandombox.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2011-09-21 16:33:29 +01:00
Ursprung e66d7aba10
Commit 039898c280

Datei anzeigen

@ -1,6 +1,7 @@
package org.bukkit.event.entity; package org.bukkit.event.entity;
import java.util.List; import java.util.List;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -9,10 +10,30 @@ import org.bukkit.inventory.ItemStack;
*/ */
public class PlayerDeathEvent extends EntityDeathEvent { public class PlayerDeathEvent extends EntityDeathEvent {
private int newExp = 0; private int newExp = 0;
private String deathMessage = "";
public PlayerDeathEvent(Player player, List<ItemStack> drops, int droppedExp, int newExp) { public PlayerDeathEvent(Player player, List<ItemStack> drops, int droppedExp, int newExp, String deathMessage) {
super(player, drops, droppedExp); super(player, drops, droppedExp);
this.newExp = newExp; this.newExp = newExp;
this.deathMessage = deathMessage;
}
/**
* Set the death message that will appear to everyone on the server.
*
* @param deathMessage Message to appear to other players on the server.
*/
public void setDeathMessage(String deathMessage) {
this.deathMessage = deathMessage;
}
/**
* Get the death message that will appear to everyone on the server.
*
* @return Message to appear to other players on the server.
*/
public String getDeathMessage() {
return this.deathMessage;
} }
/** /**