Skip to content

Commit

Permalink
Fixes failures in obsidian cooping listener. (#1965)
Browse files Browse the repository at this point in the history
Failures happened after implementing #1964
  • Loading branch information
BONNe authored Apr 11, 2022
1 parent 9f163f0 commit b3e55a7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ public void setUp() throws Exception {
map.put("OBSIDIAN_SCOOPING", true);
when(ws.getWorldFlags()).thenReturn(map);

PlayerInventory playerInventory = mock(PlayerInventory.class);
when(playerInventory.getItemInMainHand()).thenReturn(item);
when(playerInventory.getItemInOffHand()).thenReturn(new ItemStack(Material.AIR));
when(p.getInventory()).thenReturn(playerInventory);

// Addon
when(iwm.getAddon(Mockito.any())).thenReturn(Optional.empty());
}
Expand Down

0 comments on commit b3e55a7

Please sign in to comment.