Package org.randomgd.bukkit.workers.util

Examples of org.randomgd.bukkit.workers.util.WorkerCreator


      cancelEvent = give(info, player, stack, material);
      reassign = !cancelEvent;
    }

    if (reassign) {
      WorkerCreator creator = PROFESSION_TRIGGER.get(material);
      if (creator != null) {
        Villager.Profession profession = creator.getProfession();
        if ((profession != null)
            && (!(profession.equals(villager.getProfession()) && (info != null)))) {
          // It's ok, we can convert it !
          if (!player.hasPermission(creator.getPermission())) {
            player.sendMessage(NO_JOB_PERMISSION_MESSAGE);
            return cancelEvent;
          }
          villager.setProfession(profession);
          info = creator.create();
          info.setConfiguration(configurationHandler);
          workerStack.put(id, info);
          player.sendMessage(creator.getMessage());
          cancelEvent = true;
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.randomgd.bukkit.workers.util.WorkerCreator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.