if (!NPCDataManager.pathEditors.containsKey(player)) {
player.sendMessage(ChatColor.GRAY
+ "You must be editing your NPC's path.");
return;
}
WaypointModifierType modifier = WaypointModifierType.value(args
.getString(1).toUpperCase());
if (modifier == null) {
player.sendMessage(ChatColor.GRAY + "Invalid modifier type.");
return;
}
if (!PermissionManager.hasPermission(player,
"citizens.waypoints.modifier." + modifier.name().toLowerCase())) {
player.sendMessage(MessageUtils.noPermissionsMessage);
return;
}
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));
}