Update to V1.11

Bugfix for an item duplication bug
Skipping V1.10 cause of an bukkit version detection bug
This commit is contained in:
Georg 2015-06-01 01:35:20 +02:00
parent 69bb88ba73
commit 361f33eccc
2 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>at.pcgamingfreaks</groupId>
<artifactId>MinePacks</artifactId>
<version>1.9</version>
<version>1.11</version>
<repositories>
<repository>
<id>in-project</id>

View File

@ -51,15 +51,17 @@ public class EventListener implements Listener
Player player = event.getEntity();
if (drop_on_death && !player.hasPermission("backpack.KeepOnDeath"))
{
Inventory BP = plugin.DB.getBackpack(player, false).getBackpack();
for (ItemStack i : BP.getContents())
Backpack backpack = plugin.DB.getBackpack(player, false);
Inventory bpinv = backpack.getBackpack();
for (ItemStack i : bpinv.getContents())
{
if (i != null)
{
player.getWorld().dropItemNaturally(player.getLocation(), i);
BP.remove(i);
bpinv.remove(i);
}
}
plugin.DB.SaveBackpack(backpack);
}
}