mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
Fix item drop on trade signs, if player inventory is full.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1257 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
e08bba4db3
commit
5fbee1f39e
@ -94,7 +94,10 @@ public class EssentialsEcoPlayerListener extends PlayerListener
|
||||
}
|
||||
else if (i1 != null)
|
||||
{
|
||||
user.getInventory().addItem(i1);
|
||||
Map<Integer, ItemStack> leftOver = user.getInventory().addItem(i1);
|
||||
for (ItemStack itemStack : leftOver.values()) {
|
||||
user.getWorld().dropItem(user.getLocation(), itemStack);
|
||||
}
|
||||
user.updateInventory();
|
||||
}
|
||||
r1 = 0;
|
||||
@ -122,8 +125,12 @@ public class EssentialsEcoPlayerListener extends PlayerListener
|
||||
|
||||
if (m2)
|
||||
user.giveMoney(q2);
|
||||
else
|
||||
user.getInventory().addItem(qi2);
|
||||
else {
|
||||
Map<Integer, ItemStack> leftOver = user.getInventory().addItem(qi2);
|
||||
for (ItemStack itemStack : leftOver.values()) {
|
||||
user.getWorld().dropItem(user.getLocation(), itemStack);
|
||||
}
|
||||
}
|
||||
|
||||
user.updateInventory();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user