@@ -121,15 +121,6 @@ void testSetId() throws InterruptedException {
121121 Assertions .assertEquals (id , backpack .getId ());
122122 }
123123
124- @ Test
125- @ DisplayName ("Test backpacks opening to Players" )
126- void testOpenBackpack () throws InterruptedException {
127- Player player = server .addPlayer ();
128- PlayerBackpack backpack = openMockBackpack (player , "TEST_OPEN_BACKPACK" , 27 );
129- InventoryView view = player .getOpenInventory ();
130- Assertions .assertEquals (backpack .getInventory (), view .getTopInventory ());
131- }
132-
133124 @ Test
134125 @ DisplayName ("Test backpacks not disturbing normal item dropping" )
135126 void testBackpackDropNormalItem () throws InterruptedException {
@@ -146,11 +137,10 @@ void testBackpackDropNormalItem() throws InterruptedException {
146137 private boolean isAllowed (String id , ItemStack item ) throws InterruptedException {
147138 Player player = server .addPlayer ();
148139 Inventory inv = openMockBackpack (player , id , 9 ).getInventory ();
149- InventoryView playerInv = InventoryViewWrapper .wrap (player .getOpenInventory ());
150140
151141 int slot = 7 ;
152142 inv .setItem (slot , item );
153- InventoryClickEvent event = new InventoryClickEvent (playerInv , SlotType .CONTAINER , slot , ClickType .LEFT , InventoryAction .PICKUP_ONE );
143+ InventoryClickEvent event = new InventoryClickEvent (player . getOpenInventory () , SlotType .CONTAINER , slot , ClickType .LEFT , InventoryAction .PICKUP_ONE );
154144 listener .onClick (event );
155145 return !event .isCancelled ();
156146 }
0 commit comments