Package net.citizensnpcs.waypoints

Examples of net.citizensnpcs.waypoints.Waypoint


                player.sendMessage(ChatColor.GRAY + "Points can't be more than "
                        + StringUtils.wrap(Settings.getDouble("PathfindingRange"), ChatColor.GRAY)
                        + " blocks away from each other.");
                break;
            }
            session.insert(npc.getWaypoints(), new Waypoint(loc));
            event.getPlayer().sendMessage(
                    StringUtils.wrap("Added") + " waypoint at index " + StringUtils.wrap(session.getIndex()) + " ("
                            + StringUtils.wrap(loc.getBlockX()) + ", " + StringUtils.wrap(loc.getBlockY()) + ", "
                            + StringUtils.wrap(loc.getBlockZ()) + ") (" + StringUtils.wrap(npc.getWaypoints().size())
                            + " " + StringUtils.pluralise("waypoint", npc.getWaypoints().size()) + ")");
View Full Code Here


    }
    player.sendMessage(ChatColor.AQUA
        + StringUtils.listify(StringUtils.wrap(StringUtils
            .capitalise(modifier.name().toLowerCase()))
            + " chat editor" + ChatColor.AQUA));
    Waypoint waypoint = npc.getWaypoints().getLast();
    ConversationUtils.addConverser(player, modifier.create(waypoint));
  }
View Full Code Here

        }
        String read = profiles.getString(UID + BasicProperties.waypoints);
        if (!read.isEmpty()) {
            for (String str : read.split(";")) {
                String[] split = str.split(",");
                temp.add(new Waypoint(new Location(world, Double.parseDouble(split[0]), Double
                        .parseDouble(split[1]), Double.parseDouble(split[2]))));
            }
            return temp;
        }
        String path = "", root = "";
        WaypointModifier modifier = null;
        for (int key : profiles.getIntegerKeys(UID + BasicProperties.waypoints)) {
            root = UID + BasicProperties.waypoints + "." + key;
            Waypoint waypoint = new Waypoint(LocationUtils.loadLocation(profiles, root, true));

            waypoint.setDelay(profiles.getInt(root + ".delay"));

            if (profiles.keyExists(root + ".modifiers")) {
                root += ".modifiers";
                for (int innerKey : profiles.getIntegerKeys(root)) {
                    path = root + "." + innerKey;
                    modifier = WaypointModifierType.valueOf(profiles.getString(path + ".type")).create(
                            waypoint);
                    modifier.parse(profiles, path);
                    waypoint.addModifier(modifier);
                }
            }
            temp.add(waypoint);
        }
        return temp;
View Full Code Here

TOP

Related Classes of net.citizensnpcs.waypoints.Waypoint

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.