示例#1
0
  public void setMyPet(MyPet myPet) {
    if (myPet != null) {
      super.setMyPet(myPet);
      final MySkeleton mySkeleton = (MySkeleton) myPet;
      final EntityMySkeleton entityMySkeleton = this;

      this.setWither(mySkeleton.isWither());

      MyPetPlugin.getPlugin()
          .getServer()
          .getScheduler()
          .runTaskLater(
              MyPetPlugin.getPlugin(),
              new Runnable() {
                public void run() {
                  if (mySkeleton.getStatus() == PetState.Here) {
                    for (EquipmentSlot slot : EquipmentSlot.values()) {
                      if (mySkeleton.getEquipment(slot) != null) {
                        entityMySkeleton.setPetEquipment(
                            slot.getSlotId(), mySkeleton.getEquipment(slot));
                      }
                    }
                  }
                }
              },
              5L);
    }
  }
示例#2
0
  public void setMyPet(MyPet myPet) {
    if (myPet != null) {
      super.setMyPet(myPet);

      this.setColor(getMyPet().getColor().getWoolData());
      this.setSheared(getMyPet().isSheared());
      this.setBaby(getMyPet().isBaby());
    }
  }