if (args.getFlags().isEmpty()) {
Messaging.sendError(player, "No flag specified.");
return;
}
Guard guard = npc.getType("guard");
FlagList flagList = guard.getFlags();
Map<String, FlagInfo> flags;
String header = npc.getName() + "'s ";
if (args.hasFlag('g')) {
flags = flagList.getFlags(FlagType.GROUP);
header += "Group Flags";
} else if (args.hasFlag('m')) {
flags = flagList.getFlags(FlagType.MOB);
header += "Mob Flags";
} else if (args.hasFlag('p')) {
flags = flagList.getFlags(FlagType.PLAYER);
header += "Player Flags";
} else {
Messaging.sendError(player, "Specified flag not found.");
return;
}