• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • Minecraft 1.16.220 Update + Bug/Crash Fixes
    Added MCPE 1.16.220 version and fixed crashes for multiple plugins. You can view the full changelist here.
  • Forum Updates - 4/11/2021
    Various changes have been made to the forums and a few categories. You can view the full changelist here.

Custom Superbar/HUD

Warning!
Hello , there have been no replies in this thread for more than 30 days.
Please make sure you have a valid reason before you reply to this thread or you may face moderation action.
#1
This will allow you to have a custom HUD that only certain players have access to. Commands are as follows:

/hud <new hud> Set the new HUD. For a list of tags or a new command for list of tags, reply and request it below.
/hudgo This is an automatic command that does NOT need to be manually used but still has protection so only the SAME certain users can use it. It loads the previous people so you don't need the write the usernames again.
/stophud Once again this command only works for the certain users that will be loaded so you don't need to type them out again. This just stops the cycle of the HUD so there will be no HUD for anyone.

So here is the code for all three commands. it's not tested so if there's any bugs please point them out.
CODE
Code:
cmd create hud Edit the HUD, OP's only.
cmd add hud let %allowed% = array(\"Person1\",\"Person2\")
cmd add hud save %allowed%
cmd add hud if %p% in %allowed% then goto 5
cmd add hud message %p% §l§cELITE§e-§6PVP §r§a§l> §r§fYou lack permissions to use this command, please contact SuperNoob if you feel you need access to this command.
cmd add hud exit
cmd add hud /cmd kill hudgo
cmd add hud let %hud% = join(%args%[1+], \" \")
cmd add hud save %hud%
cmd add hud /hudgo
cmd add hud message %p% §l§cELITE§e-§6PVP §r§a§l> §r§fYou edited the server's HUD!
cmd add hud exit
cmd create hudgo Go for HUD
cmd add hudgo load %allowed%
cmd add hudgo load %hud%
cmd add hudgo if %p% in %allowed then goto 5
cmd add hudgo message %p% §l§cELITE§e-§6PVP §r§a§l> §r§fYou lack permissions to use this command, please contact SuperNoob if you feel you need access to this command.
cmd add hudgo exit
cmd add hudgo let %online% = onlineplayers()
cmd add hudgo popup %online% %hud%
cmd add hudgo sleep 1
cmd add hudgo goto 6
cmd create stophud Stop the HUD
cmd add stophud load %allowed%
cmd add stophud if %p% in %allowed% then goto 5
cmd add stophud message %p% §l§cELITE§e-§6PVP §r§a§l> §r§fYou lack permissions to use this command, please contact SuperNoob if you feel you need access to this command.
cmd add stophud exit
cmd add stophud kill hudgo
cmd add stophud message %p% §l§cELITE§e-§6PVP §r§a§l> §r§fYou stopped the HUD for everybody.
cmd add stophud exit
 

Null45

Coal Miner
#2
at the "stophud" command the last line "kill hudgo" It's supposed to be "cmd kill" but using that will make all the commands to stop running so if you have another command looping it will kill it too.
 

madhon

MadCommands Dev
#4
No need to manage permissions inside the command, you can just add or remove permission cmd.run.hud.

As an alternative, this is hud command I am using on my server as a personal HUD great for admins and builders:

Code:
cmd edit hud 0 # Display current coordinates and looking direction on the player's screen
cmd edit hud 1 load %hud%
cmd edit hud 2 if %args%[1] = \"on\" then goto 10
cmd edit hud 3 if %args%[1] != \"off\" then goto 19
cmd edit hud 4 let %hud%[%p%] = \"off\"
cmd edit hud 5 save %hud%
cmd edit hud 6 exit

cmd edit hud 10 let %hud%[%p%] = \"on\"
cmd edit hud 11 save %hud%
cmd edit hud 12 let %directions% = array(\"SW\", \"W\", \"NW\", \"N\", \"NE\", \"E\", \"SE\", \"S\")

cmd edit hud 20 let %xx% = int(10 * %x%) / 10
cmd edit hud 21 let %yy% = int(10 * %y%) / 10
cmd edit hud 22 let %zz% = int(10 * %z%) / 10
cmd edit hud 23 let %dir% = int((%yaw% - 22.5) / 45)
cmd edit hud 24 if %yaw% < 22.5 then let %dir% = 7
cmd edit hud 25 popup %p% (%level% + \" [\" + %xx% + \", \" + %yy% + \", \" + %zz% + \"] -> \" + %directions%[%dir%] + \" (\" + int(%yaw%) + \"°)\")
cmd edit hud 26 sleep 1
cmd edit hud 27 if %p% notin onlineplayers() then exit
cmd edit hud 28 load %hud%
cmd edit hud 29 if %hud%[%p%] = \"on\" then goto 20
Simply use /hud on to enable HUD and /hud off to disable it.

You can also simply run /hud without parameters from your login trigger to restore hud after logging out and logging back in.