mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-02 14:37:46 +01:00
Fix all removeItem()
This could fix some broken logging of selling items
This commit is contained in:
parent
ef063c255e
commit
ce9e630072
@ -169,7 +169,7 @@ public class Trade
|
||||
{
|
||||
throw new ChargeException(_("missingItems", getItemStack().getAmount(), getItemStack().getType().toString().toLowerCase(Locale.ENGLISH).replace("_", " ")));
|
||||
}
|
||||
user.getInventory().removeItem(getItemStack());
|
||||
user.getInventory().removeItem(getItemStack().clone());
|
||||
user.updateInventory();
|
||||
}
|
||||
if (command != null)
|
||||
|
@ -157,7 +157,7 @@ public class Commandsell extends EssentialsCommand
|
||||
// This should never happen.
|
||||
throw new IllegalStateException("Trying to remove more items than are available.");
|
||||
}
|
||||
user.getInventory().removeItem(ris);
|
||||
user.getInventory().removeItem(ris.clone());
|
||||
user.updateInventory();
|
||||
Trade.log("Command", "Sell", "Item", user.getName(), new Trade(ris, ess), user.getName(), new Trade(worth * amount, ess), user.getLocation(), ess);
|
||||
user.giveMoney(worth * amount);
|
||||
|
Loading…
Reference in New Issue
Block a user