Problem RemoteEntities

Discussion in 'Plugin Development' started by Plugers11, May 6, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Plugers11

    Player don't moving to location ;/


    public static void spawnNPC(String name, Location loc){
    CreateEntityContext c = Main.manager
    .prepareEntity(RemoteEntityType.Human)
    .asPushable(true)
    .asStationary(false)
    .atLocation(loc)
    .withName(name);

    RemoteEntity re = c.create();
    re.setName(name);

    String world = (String) Config.getConfig("pvp").get("Misje.Misja1.Swiat");
    double x = (double) Config.getConfig("pvp").get("Misje.Misja1.X");
    double y = (double) Config.getConfig("pvp").get("Misje.Misja1.Y");
    double z = (double) Config.getConfig("pvp").get("Misje.Misja1.Z");
    float yaw = (float) Config.getConfig("pvp").get("Misje.Misja1.Yaw");
    float pitch = (float) Config.getConfig("pvp").get("Misje.Misja1.Pitch");

    Location loc1 = new Location(Bukkit.getWorld(world), x,y,z,yaw, pitch);

    re.move(loc1);
    re.setSpeed(2.0D);
    }
     
Thread Status:
Not open for further replies.

Share This Page