Skip to content

Commit

Permalink
Add context.xp
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Jan 31, 2017
1 parent 2ff22e1 commit cab3a3e
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -46,6 +46,7 @@ public class EntityDeathScriptEvent extends BukkitScriptEvent implements Listene
// <context.inventory> returns the dInventory of the entity if it was a player.
// <context.cause> returns an Element of the cause of the death. See <@link language damage cause> for a list of possible damage causes.
// <context.drops> returns a dList of all pending item drops.
// <context.xp> returns an Element of the amount of experience to be dropped.
//
// @Determine
// Element to change the death message.
Expand Down Expand Up @@ -201,6 +202,9 @@ else if (name.equals("cause") && cause != null) {
else if (name.equals("drops") && drops != null) {
return drops;
}
else if (name.equals("xp") && xp != null) {
return new Element(xp);
}
return super.getContext(name);
}

Expand Down

0 comments on commit cab3a3e

Please sign in to comment.