Cuberite Forum
[ScoreBoard with cuberite] - Printable Version

+- Cuberite Forum (
+-- Forum: Cuberite (
+--- Forum: Discussion (
+--- Thread: [ScoreBoard with cuberite] (/thread-3214.html)

[ScoreBoard with cuberite] - Yann - 01-06-2019

Hello ! I would like to do a simple scoreboard to display username, userrank and number of connected players but even with the documentation I don't understand how they work.
(I've tried checking source code but I don't see why all cScoreboard functions aren't working)

Here is the error I always got:

LUA: Plugins/ValeaCore/main.lua:8: error in function 'AddPlayerScore'.
    argument #1 is 'string'; 'cScoreboard' expected.

Thank's for the help you will give ^^

RE: [ScoreBoard with cuberite] - Yann - 01-06-2019

I made this code that run but I don't see any scoreboard :/
---Main file

PLUGIN = nil

function Initialize(Plugin)

   cPluginManager:AddHook(cPluginManager.HOOK_WORLD_TICK, scoreBoardTask);

   PLUGIN = Plugin;
   LOG(Plugin:GetName()..' loaded in version '..Plugin:GetVersion());

   return true


function OnDisable(Plugin)
   LOG(Plugin:GetName().. 'disabled');

--Scoreboard file

function updateScoreBoard(World)
   World:GetScoreBoard():RegisterObjective('cos', 'Joueurs en ligne:', 4);
   World:GetScoreBoard():SetDisplay('cos', 2);
   World:GetScoreBoard():SetDisplay('cos', 0)

function scoreBoardTask(World, TimeDelta)

I know that scoreBoardTask is running becasue is tried logging ^^

RE: [ScoreBoard with cuberite] - Yann - 01-06-2019

So finally it prints well but I need to press tab to display it :/
That's strange :c

Is there any way to emulate this press ?

Also, I would like to have something that looks like this (see attachment) but I don't see how I can do it
Thanks for the hekp you'll give :p

RE: [ScoreBoard with cuberite] - Cl1608Ho - 01-06-2019

That's a screenshot of an abused scoreboard. Fake "players" with fake "scores" on the right

RE: [ScoreBoard with cuberite] - Yann - 01-06-2019

This screenshot is from a famous french server running on bukkit.
I just wanted help to make the same scoreboard (set a title, display custom names...)