public Object answer(InvocationOnMock invocation) throws Exception {
Object arg = invocation.getArguments()[0];
if (arg instanceof BeforeItemPutInInventory) {
BeforeItemPutInInventory event = (BeforeItemPutInInventory) arg;
if (event.getSlot() == 1) {
event.consume();
}
}
return null;
}
}