mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 10:35:15 +01:00
Fix message amount display error when buying from admin shops
Also fix that the stock items were modified when buying from the admin shop
This commit is contained in:
parent
53ae07b779
commit
28fb5cbeff
@ -32,6 +32,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import static com.Acrobot.Breeze.Utils.BlockUtil.isSign;
|
||||
@ -203,7 +204,7 @@ public class PlayerInteract implements Listener {
|
||||
ItemStack[] items = InventoryUtil.getItemsStacked(item);
|
||||
|
||||
if (adminShop) {
|
||||
ownerInventory = new AdminInventory(items);
|
||||
ownerInventory = new AdminInventory(action == buy ? Arrays.stream(items).map(ItemStack::clone).toArray(ItemStack[]::new) : new ItemStack[0]);
|
||||
}
|
||||
|
||||
TransactionType transactionType = (action == buy ? BUY : SELL);
|
||||
|
Loading…
Reference in New Issue
Block a user