use of com.voxelgameslib.voxelgameslib.api.role.Role in project VoxelGamesLibv2 by VoxelGamesLib.
the class VoxelGamesLib method registerCommandReplacements.
private void registerCommandReplacements() {
CommandReplacements rep = commandManager.getCommandReplacements();
rep.addReplacement("@gamemodes", gameHandler.getGameModes().stream().map(GameMode::getName).collect(Collectors.joining("|")));
rep.addReplacement("@locales", Arrays.stream(Locale.values()).map(locale -> locale.getName() + "|" + locale.getTag()).collect(Collectors.joining("|")));
rep.addReplacement("@roles", Arrays.stream(Role.values()).map(Role::getName).collect(Collectors.joining("|")));
rep.addReplacement("@stats", statsHandler.getStatTypes().stream().map(stat -> stat.getPrefix() + ":" + stat.name()).collect(Collectors.joining("|")));
rep.addReplacement("%user", "voxelgameslib.role.user");
rep.addReplacement("%premium", "voxelgameslib.role.premium");
rep.addReplacement("%moderator", "voxelgameslib.role.moderator");
rep.addReplacement("%admin", "voxelgameslib.role.admin");
}
Aggregations