mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-02-23 02:52:38 +01:00
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:
parent
69bb88ba73
commit
361f33eccc
2
pom.xml
2
pom.xml
@ -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>
|
||||
|
@ -51,15 +51,17 @@ public void onDeath(PlayerDeathEvent event)
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user