Esempio n. 1
0
 /**
  * Changes the player's selected NPC's cape. A valid NPC must be a generic HumanEntity only.
  *
  * @param player
  * @param url
  */
 public void applyCape(NPC npc, String url) {
   LivingEntity entity = npc.getBukkitEntity();
   if (entity instanceof HumanEntity) {
     SpoutPlayer human = NpcManager.toSpoutPlayer(npc);
     human.setCape(url);
     saveCape(npc, url);
   }
 }
Esempio n. 2
0
 /**
  * Resets the player's selected NPC's cape. A valid NPC must be a generic HumanEntity only.
  *
  * @param player
  */
 public void removeCape(NPC npc) {
   LivingEntity entity = npc.getBukkitEntity();
   if (entity instanceof HumanEntity) {
     SpoutPlayer human = NpcManager.toSpoutPlayer(npc);
     human.resetCape();
     saveCape(npc, "default");
   }
 }