[ScoreBoard with cuberite]
#2
I made this code that run but I don't see any scoreboard :/
Code:
---Main file

PLUGIN = nil

function Initialize(Plugin)
   --Initialisation
   Plugin:SetName('ValeaCore');
   Plugin:SetVersion(0.1);

   --Events
   cPluginManager:AddHook(cPluginManager.HOOK_WORLD_TICK, scoreBoardTask);

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

   return true

end

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


--Scoreboard file


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

function scoreBoardTask(World, TimeDelta)
   cRoot:Get():ForEachWorld(updateScoreBoard);
end

I know that scoreBoardTask is running becasue is tried logging ^^
Reply
Thanks given by:


Messages In This Thread
[ScoreBoard with cuberite] - by Yann - 01-06-2019, 10:31 AM
RE: [ScoreBoard with cuberite] - by Yann - 01-06-2019, 10:57 AM
RE: [ScoreBoard with cuberite] - by Yann - 01-06-2019, 11:03 AM
RE: [ScoreBoard with cuberite] - by ShadowCone - 01-06-2019, 05:40 PM
RE: [ScoreBoard with cuberite] - by Yann - 01-06-2019, 10:53 PM



Users browsing this thread: 2 Guest(s)