03-15-2023, 10:34 AM
Since Minecraft, by default, limits the username to 16 characters, it is impossible to create "prefixes" correctly using cPlayer:SetCustomName(name) function. In Bukkit/Minecraft vanilla this is quickly resolved with scoreboard teams using prefix/sufix, which characters limit is 32
As I'm new to Cuberite I tried to do the same in it, but without success. So after many tries i decided to look at the source code on GitHub and noticed that the team prefix on the scoreboard is not used anywhere in the code.
So, is there any way to do this in Cuberite?
As I'm new to Cuberite I tried to do the same in it, but without success. So after many tries i decided to look at the source code on GitHub and noticed that the team prefix on the scoreboard is not used anywhere in the code.
So, is there any way to do this in Cuberite?
Code:
function LoadScoreboard(Player)
-- Scoreboard
Scoreboard = Player:GetWorld():GetScoreBoard()
if Scoreboard:GetTeam("Admin") == nil then
Scoreboard:RegisterTeam("Admin", "Admin", "§c[Admin]", "")
end
Scoreboard:GetTeam("Admin"):AddPlayer(Player:GetName())
end