Fixes failures in obsidian cooping listener. (#1965)

Failures happened after implementing #1964
This commit is contained in:
BONNe 2022-04-11 08:23:13 +03:00 committed by GitHub
parent 9f163f0572
commit b3e55a7b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,6 +153,11 @@ public class ObsidianScoopingListenerTest {
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());
}