Package dretax.simpleskins.citizens

Source Code of dretax.simpleskins.citizens.CitizensOneSupport

package dretax.simpleskins.citizens;

import org.bukkit.entity.Player;
import org.getspout.spoutapi.SpoutManager;
import org.getspout.spoutapi.player.SpoutPlayer;

import net.citizensnpcs.api.CitizensManager;
import net.citizensnpcs.resources.npclib.HumanNPC;


public class CitizensOneSupport {
 
  public SpoutPlayer getCitizenAsPlayer(int id) {
    SpoutPlayer sp = null;
    HumanNPC npc = CitizensManager.getNPC(id);
    if(npc != null) {
      if(npc.getPlayer() instanceof Player) {
        sp = SpoutManager.getPlayer((Player) npc.getPlayer());
      }
    }
    return sp;
  }

}
TOP

Related Classes of dretax.simpleskins.citizens.CitizensOneSupport

TOP
Copyright © 2018 www.massapi.com. 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.