mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 12:15:53 +01:00
Make trader view work, with limitations
This commit is contained in:
parent
8864d89791
commit
a8f37635f8
@ -918,6 +918,13 @@ public class ShopTrait extends Trait {
|
||||
evt.setCancelled(true);
|
||||
if (evt.getSlotType() != SlotType.RESULT)
|
||||
return;
|
||||
// TODO: work around crafting slot limitations in minecraft
|
||||
player.getInventory().addItem(evt.getClickedInventory().getItem(0));
|
||||
evt.getClickedInventory().setItem(0, null);
|
||||
if (evt.getClickedInventory().getItem(1) != null) {
|
||||
player.getInventory().addItem(evt.getClickedInventory().getItem(1));
|
||||
evt.getClickedInventory().setItem(1, null);
|
||||
}
|
||||
trades.get(selectedTrade).onClick(shop, player, evt.getClick().isShiftClick(),
|
||||
lastClickedTrade == selectedTrade);
|
||||
lastClickedTrade = selectedTrade;
|
||||
|
Loading…
Reference in New Issue
Block a user