Advertisement
FALSkills

Untitled

Oct 24th, 2020
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. private boolean isEquipped(Equipment.SLOTS slot, String... names){
  2. if(names == null || slot == null)
  3. return true;
  4. final int slotIndex = slot.getSlot().index();
  5. General.println("Desired slot: " + slotIndex + " " + slot.getSlot());
  6. return Equipment.find(item -> {
  7. int itemIndex = item.index();
  8. General.println("Checking item: " + item.name() + " in slot: " + itemIndex);
  9. return itemIndex == slotIndex &&
  10. Arrays.asList(names).contains(item.name());
  11. }).size() > 0;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement