@Override public Boolean setupOperation(SignShopArguments ssArgs) { if (ssArgs.getContainables().isEmpty()) { ssArgs .getPlayer() .get() .sendMessage(SignShopConfig.getError("chest_missing", ssArgs.getMessageParts())); return false; } ItemStack[] isTotalItems = getRecords(ssArgs.getContainables().get()); if (isTotalItems.length == 0) { ssArgs .getPlayer() .get() .sendMessage(SignShopConfig.getError("chest_empty", ssArgs.getMessageParts())); return false; } ssArgs.getItems().set(isTotalItems); ssArgs.setMessagePart("!items", itemUtil.itemStackToString(ssArgs.getItems().get())); return true; }
@Override public Boolean checkRequirements(SignShopArguments ssArgs, Boolean activeCheck) { ItemStack[] isTotalItems = getRecords(ssArgs.getContainables().get()); if (isTotalItems.length == 0) { ssArgs .getPlayer() .get() .sendMessage(SignShopConfig.getError("chest_empty", ssArgs.getMessageParts())); return false; } return true; }