package ua.com.minersstudios.whomine.util.misc;
import lombok.*;
import lombok.experimental.UtilityClass;
import org.bukkit.entity.Player;
import org.bukkit.scoreboard.Scoreboard;
import org.bukkit.scoreboard.Team;
import static org.bukkit.Bukkit.getLogger;
@UtilityClass
public class PlayerNameHandler
{
/**
* Adds player to the "hide_tags" list {@link Team} and sets
* {@link Scoreboard} flag for a given player.
* @param player a player which nametag will be hidden
*/
public void hideNameTag(@NonNull final Player player)
{
getLogger().warning("hideNameTag: not implemented.");
}
/**
* Checks if given string is in the range of U+04XX symbols.
* Used for checking if player name is suitable.
* @param name string in question
* @return true - if each string's character is within the
* range, false otherwise
*/
public boolean isInCyrillicSetRange(@NonNull final String name)
{
return name.matches("[\u0400-\u04FF]+");
}
}