@@ -121,15 +121,6 @@ void testSetId() throws InterruptedException {
121
121
Assertions .assertEquals (id , backpack .getId ());
122
122
}
123
123
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
-
133
124
@ Test
134
125
@ DisplayName ("Test backpacks not disturbing normal item dropping" )
135
126
void testBackpackDropNormalItem () throws InterruptedException {
@@ -146,11 +137,10 @@ void testBackpackDropNormalItem() throws InterruptedException {
146
137
private boolean isAllowed (String id , ItemStack item ) throws InterruptedException {
147
138
Player player = server .addPlayer ();
148
139
Inventory inv = openMockBackpack (player , id , 9 ).getInventory ();
149
- InventoryView playerInv = InventoryViewWrapper .wrap (player .getOpenInventory ());
150
140
151
141
int slot = 7 ;
152
142
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 );
154
144
listener .onClick (event );
155
145
return !event .isCancelled ();
156
146
}
0 commit comments