@Command( aliases = {"wp", "waypoint"}, usage = "modifier [type]", desc = "add a modifier", modifiers = {"modifier", "mod"}, min = 2, max = 2) public static void modifier(CommandContext args, Player player, HumanNPC npc) { if (!NPCDataManager.pathEditors.containsKey(player.getName())) { 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.generic( 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)); }
@Override public void addPermissions() { PermissionManager.addPerm("blacksmith.use.help"); PermissionManager.addPerm("blacksmith.use.status"); PermissionManager.addPerm("blacksmith.use.repair"); }