Skip to content

Commit

Permalink
Fix entity death determination
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jun 3, 2015
1 parent 5d61773 commit e1e7c6f
Showing 1 changed file with 8 additions and 6 deletions.
Expand Up @@ -156,6 +156,13 @@ public void entityDeath(EntityDeathEvent event) {
event.setDroppedExp(0);
}

// XP
else if (aH.Argument.valueOf(determination)
.matchesPrimitive(aH.PrimitiveType.Integer)) {
int xp = Integer.valueOf(determination.substring(3));
event.setDroppedExp(xp);
}

// Drops
else if (aH.Argument.valueOf(determination).matchesArgumentList(dItem.class)) {
dList drops = dList.valueOf(determination);
Expand All @@ -168,12 +175,7 @@ else if (aH.Argument.valueOf(determination).matchesArgumentList(dItem.class)) {
}
}

// XP
else if (aH.Argument.valueOf(determination)
.matchesPrimitive(aH.PrimitiveType.Integer)) {
int xp = Integer.valueOf(determination.substring(3));
event.setDroppedExp(xp);
} else if (!determination.toUpperCase().equals("NONE")) {
else if (!determination.toUpperCase().equals("NONE")) {
if (event instanceof PlayerDeathEvent) {
subEvent.setDeathMessage(determination);
}
Expand Down

0 comments on commit e1e7c6f

Please sign in to comment.