use of com.griefdefender.api.clan.Rank in project GDHooks by bloodmc.
the class GDHooks method registerClanCompletions.
public void registerClanCompletions() {
this.commandManager.getCommandCompletions().registerCompletion("gdclans", c -> {
Set<String> tags = new HashSet<>();
for (Clan clan : this.clanProvider.getAllClans()) {
tags.add(clan.getTag());
}
return ImmutableSet.copyOf(tags);
});
this.commandManager.getCommandCompletions().registerCompletion("gdclanranks", c -> {
Set<String> ranks = new HashSet<>();
for (Clan clan : this.clanProvider.getAllClans()) {
for (Rank rank : clan.getRanks()) {
ranks.add(rank.getName().toLowerCase());
}
}
return ImmutableSet.copyOf(ranks);
});
}
Aggregations