Skip to content

Commit

Permalink
Death Docket Patch
Browse files Browse the repository at this point in the history
Dropped XP > TotalXP
Restore XP on Ticket use.
  • Loading branch information
ShakeforProtein committed Sep 28, 2019
1 parent 81a4bc6 commit 129a8a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.ShakeforProtein</groupId>
<artifactId>TreeboTeleport</artifactId>
<version>0.1.11</version>
<version>0.1.12</version>
<packaging>jar</packaging>

<name>TreeboTeleport</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
p.getInventory().addItem(deathYaml.getItemStack("inventory.slot_" + i));
i++;
}
p.setTotalExperience(deathYaml.getInt("experience"));
deathYaml.set("used", true);
try {
deathYaml.save(deathFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public boolean onPlayerDeath(PlayerDeathEvent e) {

Player p = e.getEntity();
Location loc = e.getEntity().getLocation();
int droppedXP = e.getDroppedExp();
int droppedXP = p.getTotalExperience();
String deathMessage = e.getDeathMessage();

List<ItemStack> itemList = e.getDrops();
Expand Down

0 comments on commit 129a8a2

Please sign in to comment.