Scoreboard team prefix
#1
Question 
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?


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
Reply
Thanks given by:


Messages In This Thread
Scoreboard team prefix - by kazhiel - 03-15-2023, 10:34 AM
RE: Scoreboard team prefix - by NiLSPACE - 03-15-2023, 09:42 PM
RE: Scoreboard team prefix - by kazhiel - 03-16-2023, 03:49 AM
RE: Scoreboard team prefix - by NiLSPACE - 03-17-2023, 02:48 AM
RE: Scoreboard team prefix - by kazhiel - 03-17-2023, 04:14 AM



Users browsing this thread: 1 Guest(s)