loot tracker: Use "an" prefix for monster names starting with vowels
This commit is contained in:
@@ -167,6 +167,8 @@ public class LootTrackerPlugin extends Plugin
|
||||
"H.A.M. Member", "Woman"
|
||||
);
|
||||
|
||||
private static final Set<Character> VOWELS = ImmutableSet.of('a', 'e', 'i', 'o', 'u');
|
||||
|
||||
@Inject
|
||||
private ClientToolbar clientToolbar;
|
||||
|
||||
@@ -403,7 +405,11 @@ public class LootTrackerPlugin extends Plugin
|
||||
|
||||
if (config.npcKillChatMessage())
|
||||
{
|
||||
lootReceivedChatMessage(items, "a " + name);
|
||||
final String prefix = VOWELS.contains(Character.toLowerCase(name.charAt(0)))
|
||||
? "an"
|
||||
: "a";
|
||||
|
||||
lootReceivedChatMessage(items, prefix + ' ' + name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user