Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private boolean isEquipped(Equipment.SLOTS slot, String... names){
- if(names == null || slot == null)
- return true;
- final int slotIndex = slot.getSlot().index();
- General.println("Desired slot: " + slotIndex + " " + slot.getSlot());
- return Equipment.find(item -> {
- int itemIndex = item.index();
- General.println("Checking item: " + item.name() + " in slot: " + itemIndex);
- return itemIndex == slotIndex &&
- Arrays.asList(names).contains(item.name());
- }).size() > 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement