So over the past few days I've been experimenting with the functions folder trying to get a better understanding of it. and so far I've managed to make a scoreboard of some time. (i know.. really?) but i figured it would probably be the easiest thing to learn about. any who, I've gotten to the point that the system recognizes that whenever someone pops on, on the world they show up there. now I'm trying to implement a system where the "Player Offline" tag disappears from the list. is there a way to do it? and if so how! I would really appreciate the help...
#Working on Functions is fun..
1 messages · Page 1 of 1 (latest)
Here's my notes on Player Offline Removal. You should be able to figure how to implement it into your function.
Create some scoreboards. Replace custom with whatever scoreboard you want displayed on the sidebar or pause menu list.
To be typed in chat:
scoreboard objectives add custom dummy
scoreboard objectives add customDisplay dummy “Custom”
scoreboard objectives setdisplay sidebar customDisplay
The first command is RUA, the rest are CUA.
scoreboard players add @a custom 0
scoreboard players reset * customDisplay
execute as @a run scoreboard players operation @s customDisplay = @s custom
@astral stone cool! I tried what you suggested and it technically worked but I just removed me from the list lol
Is there a fix for it?
Did you make a customDisplay objective? Did you set it to the sidebar? The scoreboard operation makes the customDisplay equal to custom, your main objective that you add or remove scores from.
Is this a function that is only ran once on setup?
These three need to be in tick.json
scoreboard players add @a bank 0
scoreboard players reset * bankdisplay
execute as @a run scoreboard players operation @s bankdisplay = @s bank
Well I plan to have it on tick.json so that it is constantly ran but for right now I haven't added it to it
Yea make a player_offline.mcfunction and put those three commands in there and add it to tick.json.
Anything in the content log?
in the compiler? the logs there arent saying anything that is wrong with it
even when i load it it isnt giving me any errors
@astral stone I appricate the help! i just figured it out. aparrently it wasnt liking that so i had to incoperate some more ontop of that.
scoreboard objectives add bankdisplay dummy "§a§lBank Account§r"
scoreboard objectives setdisplay sidebar bankdisplay descending
scoreboard players add @a bankdisplay 0
scoreboard players reset * bankdisplay
execute as @a run scoreboard players operation @s bankdisplay = @s bank
execute as @a run scoreboard players set @s bankdisplay 0
execute as @a run scoreboard players operation @s bankdisplay = @s bank```
glad you got it fixed, I was making a function pack and trying it out, lol.
no problem lol
found the error
Do
scoreboard players add @a bank 0
Not
scoreboard players add @a bankdisplay 0
That way it is only three commands in the mcfunction