use of com.voxelgameslib.voxelgameslib.components.map.MapInfo in project VoxelGamesLibv2 by VoxelGamesLib.
the class VoteFeature method confirmVote.
/**
* Confirms a vote for a map
*/
private void confirmVote(@Nonnull User voter, @Nonnull Integer mapId) {
if (votes.containsKey(voter.getUuid())) {
Lang.msg(voter, LangKey.VOTE_ALREADY_VOTED);
} else {
MapInfo mapInfo = availableMaps.get(mapId);
if (mapInfo == null) {
Lang.msg(voter, LangKey.VOTE_UNKNOWN_MAP, mapId);
return;
}
votes.put(voter.getUuid(), mapId);
Lang.msg(voter, LangKey.VOTE_SUBMITTED, mapInfo.getDisplayName(), mapId);
}
}
Aggregations