Guest User

Untitled

a guest
Nov 5th, 2012
98
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public boolean hasRequiredItems(CommandSender sender) {
  2.         if (sender instanceof Player) {
  3.         Player player = (Player) sender;
  4.             int remainingMatches = getItems().size();
  5.         for (JobItem jobItem : getItems()) {
  6.         if (player.getInventory().getContents().contains(jobItem.toItemStack()) && --remainingMatches == 0) {
  7.             return true;
  8.         }
  9.         }
  10.         }
  11.     return sender instanceof ConsoleCommandSender;
  12.     }
RAW Paste Data