Solved Tablist Header and footer

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Oh, try this new one and see if it works, I ran it on my test server and it works fine
Nope, does not work for me. But maybe this could help: Once i tried to do a scoreboard skript (Which actually is very easy and used to work on my previous server) and it didn't work, also no errors ingame. Then it tried THIS:

code_language.skript:
options:
    FileLoc: plugins/ScoreboardX/
    ConsolePrefix: &7[&aSimpleBoard&7] &r
    VarPrefix: SimpleBoard
    version: 1.0.1
function SimpleBoardYMLSave(file: text = "none", empty: integer = 0):
    if {_file} is "config":
        set {_nodes::*} to yaml nodes with keys "%{_file}%" from file "{@FileLoc}%{_file}%.yml"
        loop {_nodes::*}:
            set {{@VarPrefix}::%{_file}%::%loop-value%} to yaml value "%{_file}%.%loop-value%" from file "{@FileLoc}%{_file}%.yml"
    else:
        set {_nodes::*} to yaml nodes with keys "config" from file "{@FileLoc}config.yml"
        loop {_nodes::*}:
            set {{@VarPrefix}::config::%loop-value%} to yaml value "config.%loop-value%" from file "{@FileLoc}config.yml"
function SimpleBoardYML(file: text, data: text, node: text = "empty", object: text = "empty") :: text:
    if {_file} is "config":
        if {_data} is "write" or "set":
            set yaml value "%{_file}%.%{_node}%" from file "{@FileLoc}%{_file}%.yml" to "%{_object}%"
            SimpleBoardYMLSave("%{_file}%")
            exit
        if {_data} is "listadd":
            add "%{_object}%" to yaml list "%{_file}%.%{_node}%" from file "{@FileLoc}%{_file}%.yml"
            SimpleBoardYMLSave("%{_file}%")
            exit
        if {_data} is "listremove":
            remove "%{_object}%" from yaml list "%{_file}%.%{_node}%" from file "{@FileLoc}%{_file}%.yml"
            SimpleBoardYMLSave("%{_file}%")
            exit
function SimpleBoardYMLKeys(file: text, data: text, node: text = "empty") :: objects:
    if {_file} is "config":
        if {_data} is "keys":
            return yaml nodes with keys "%{_file}%.%{_node}%" from file "{@FileLoc}%{_file}%.yml"
        else if {_data} is "readlist":
            return yaml list "%{_file}%.%{_node}%" from file "{@FileLoc}%{_file}%.yml"
on script load:
    if file exists at "{@FileLoc}config.yml" is false:
        message "{@ConsolePrefix}&cGenerating config.yml" to console
        if {{@VarPrefix}::config::saveFiles} is "true":
            loop {{@VarPrefix}::config::*}:
                set yaml value "%loop-index%" from file "{@FileLoc}config.yml" to "%loop-value%"
        else:
            delete {{@VarPrefix}::config::*}
            SimpleBoardYML("config", "write", "version", "{@version}")
            SimpleBoardYML("config", "write", "saveFiles", "false")
            SimpleBoardYML("config", "write", "ScoreboardUpdate", "10")
            SimpleBoardYML("config", "listadd", "Scoreboard", "&6Player: &f%%player%%")
            SimpleBoardYML("config", "listadd", "Scoreboard", "&6Deaths: &f%%{example.variable}%%")
            SimpleBoardYML("config", "listadd", "Scoreboard", "&6Health: &f%%player's health%%")
            SimpleBoardYML("config", "write", "ScoreboardTitleUpdate", "5")
            SimpleBoardYML("config", "listadd", "ScoreboardTitle", "&cExample scoreboard")
            SimpleBoardYML("config", "listadd", "ScoreboardTitle", "&6Example scoreboard")
    SimpleBoardYMLSave()
function SimpleBoardDeleteBoard(p: player):
    loop 15 times:
        delete the id based score "%{_p}%Slot%loop-number%" in stylish scoreboard "Simple-%{_p}%"
    delete stylish scoreboard "Simple-%{_p}%"
on quit:
    SimpleBoardDeleteBoard(player)
on join:
    if stylish scoreboard "Simple-%player%" exists:
        SimpleBoardDeleteBoard(player)
    if stylish scoreboard "Simple-%player%" is not set:
        add "&a", "&b", "&c", "&d", "&e", "&1", "&2", "&3", "&4", "&5", "&6", "&7", "&8", "&9" and "&f" to {_d::*}
        create new stylish scoreboard named "Simple-%player%"
        set {_title::*} to SimpleBoardYMLKeys("config", "readlist", "ScoreboardTitle")
        set {_board::*} to SimpleBoardYMLKeys("config", "readlist", "Scoreboard")
        set title of stylish scoreboard "Simple-%player%" to "%{_title::1}%"
        set stylish scoreboard of player to "Simple-%player%"
        set {_slot} to size of {_board::*}
        loop {_board::*}:
            evaluate "set {_s} to ""%loop-value%"""
            create a new id based score "%player%Slot%{_slot}%" with text "%{_d::%{_slot}%}%%{_s}%" slot {_slot} for stylish scoreboard "Simple-%player%"
            subtract 1 from {_slot}
        while player is online:
            loop "%{{@VarPrefix}::config::ScoreboardUpdate}%" parsed as integer times:
                wait a tick
            loop {_title::*}:
                evaluate "set {_t} to ""%loop-value%"""
                set title of stylish scoreboard "Simple-%player%" to "%{_t}%"
                loop "%{{@VarPrefix}::config::ScoreboardTitleUpdate}%" parsed as integer times:
                    wait a tick
            set {_slot} to size of {_board::*}
            loop {_board::*}:
                evaluate "set {_s} to ""%loop-value%"""
                set the text of id "%player%Slot%{_slot}%" to "%{_d::%{_slot}%}%%{_s}%"
                subtract 1 from {_slot}

and it worked
 
okay im going to start up a test 1.8.8 server and see if I can get this working
[doublepost=1525374954,1525374325][/doublepost]Ok here are the results from my test.
MineCraft version: Spigot 1.8.8 ([12:12:33 INFO]: This server is running CraftBukkit version git-Spigot-21fe707-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT))
Skript Version: [12:12:50 INFO]: Skript version 2.2-dev35b (Bensku)
SkRayFall Version: [12:13:13 INFO]: skRayFall version 1.9.12

Tablist containing this:
code_language.skript:
on join:
    set tab header to "header" and footer to "footer" for player

On /sk reload tablist:
>sk reload tablist
[12:13:45 INFO]: [Skript] Reloading tablist.sk...
[12:13:45 INFO]: [Skript] Successfully reloaded tablist.sk.

So with that being said, I have no clue why it is not working for you. I have the most current version of spigot 1.8.8, the most current version of Skript and as far as I know the most current version of SkRayFall

I have no clue why its not working for you and it works fine for me.
 
okay im going to start up a test 1.8.8 server and see if I can get this working
[doublepost=1525374954,1525374325][/doublepost]Ok here are the results from my test.
MineCraft version: Spigot 1.8.8 ([12:12:33 INFO]: This server is running CraftBukkit version git-Spigot-21fe707-e1ebe52 (MC: 1.8.8) (Implementing API version 1.8.8-R0.1-SNAPSHOT))
Skript Version: [12:12:50 INFO]: Skript version 2.2-dev35b (Bensku)
SkRayFall Version: [12:13:13 INFO]: skRayFall version 1.9.12

Tablist containing this:
code_language.skript:
on join:
    set tab header to "header" and footer to "footer" for player

On /sk reload tablist:
>sk reload tablist
[12:13:45 INFO]: [Skript] Reloading tablist.sk...
[12:13:45 INFO]: [Skript] Successfully reloaded tablist.sk.

So with that being said, I have no clue why it is not working for you. I have the most current version of spigot 1.8.8, the most current version of Skript and as far as I know the most current version of SkRayFall

I have no clue why its not working for you and it works fine for me.
Well, at least you tried it. I also don't know why it is not working for me. Guess i am "special" :emoji_stuck_out_tongue: Well, have to do my server without it. I don't want to use normal plugins :/ Well, at least i am trying to avoid them ^^
 
which version of SkRayFall are you using?
Im determined to make this work.
I have tried older versions, still cant figure it out
 
This is mind boggling.
I even put your WHOLE skript folder into my server and it runs without error,
Can you please tell me which other addons you are using?
I am starting to wonder if something is conflicting with it
[doublepost=1525376095,1525375879][/doublepost]Another thing I thought of

Where did you get your spigot.jar?
If its from your host.... are you able to add your own spigot.jar?
Im starting to wonder if its the spigot.jar that may not be working correctly
 
This is mind boggling.
I even put your WHOLE skript folder into my server and it runs without error,
Can you please tell me which other addons you are using?
I am starting to wonder if something is conflicting with it

Addons:
- MundoSK
-Skellet
-SkMorkaz
-SkQuery
-skRayFall
-TuSKe
-skDragon
.SkAction
.PirateSK
.SkStuff
-Umbaska
[doublepost=1525376203,1525376163][/doublepost]
This is mind boggling.
I even put your WHOLE skript folder into my server and it runs without error,
Can you please tell me which other addons you are using?
I am starting to wonder if something is conflicting with it
[doublepost=1525376095,1525375879][/doublepost]Another thing I thought of

Where did you get your spigot.jar?
If its from your host.... are you able to add your own spigot.jar?
Im starting to wonder if its the spigot.jar that may not be working correctly
Its from my Hoster, and i can add my own in it. But it is Paperspigot, so shouldn't it work?
 
OMG You.Are.My.Hero. Now it works! WOW, that an addon can destroy everything is crazy. Thanks!
 
RIGHT??? What the heck is with that?
It has happened to be before.
That felt like it took forever to solve, but I am glad we figured that out so you can make your tablist now :emoji_slight_smile:
 
RIGHT??? What the heck is with that?
It has happened to be before.
That felt like it took forever to solve, but I am glad we figured that out so you can make your tablist now :emoji_slight_smile:
Well, i would say: The Post was getting out of control :emoji_wink:
 
Status
Not open for further replies.