Tablist stuff.
Hey Bensku, if you have used the expression:
[the] (player|tab)[ ]list name[s] of %players%
%players%'[s] (player|tab)[ ]list name[s]
For set the name of the player in the tablist, if you put a name more longer than 16 characters, the name is shortened to the max character limit.
If you can fix this, because I don't want install other addon like SkRayFall or Skellett only for this fixed feature.
Image

And also, a way for set the header and footer of the tablist ?)
If any want the the script I'm using in that image, here is it: https://www.spigotmc.org/resources/tab-1-3-skquery-skrayfall.27486/
Interesting. I'll see if this can be fixed using Spigot API.
It is not possible to send tablist name that is longer than 16 characters. See https://www.spigotmc.org/threads/max-tablist-name-length.150818 for explanation.
However, using scoreboards you can skip this limitation. Team name length is unlimited. Sadly Skript has not support for scoreboards and will not get it by me in near future.
If someone wants to hack around this (using no NMS code ofc), help is welcome.
You should check the class of SkRayFall or Skellett: https://github.com/eyesniper2/skRayFall/blob/master/src/main/java/net/rayfall/eyesniper2/skrayfall/generaleffects/EffSetPlayerListName.java
https://github.com/TheLimeGlass/Skellett/blob/master/src/com/gmail/thelimeglass/Effects/EffSetTabName.java
Both use same Bukkit API method as Skript does. At least it looks like this when checking code.
Sorry if I'm wrong (I'm unfamiliar with Java) but comparing the codes:
#Skript code
((Player) o).setPlayerListName(s == null ? "" : s.length() > 16 ? s.substring(0, 16) : s);
#Others
player.getSingle(evt).setPlayerListName(name.getSingle(evt).replace("\"", ""));
The thing is, In the Skript code is the substring(0, 16) method, so, this is limiting the name to 16 characters. @bensku
Oops. Sorry, checked too quickly. Apparently this method is used in more than on places in Skript.
So it's possibly to solve?
Also sorry for close and open the thread, clicked on the wrong button haha.
It's fixed on the dev19, so I close the issue.
I reopen the issue because you can't set the tablist name of a variable, for example:
function animatedTabName(player: player, name: text):
loop length of {_name} times:
set {_name::*} to subtext of {_name} from 1 to loop-num
while {_player} is online:
loop {_name::*}:
if loop-value is "&":
delete {_name::%loop-index%}
else:
set tablist name of {_player} to colored loop-value
wait 3 ticks
But it return:
the player list name of {_player} can't be set to anything.
I don't know why, I never used that effect because the first bug I've said on this issue. If you can fix it @bensku .
MundoSk has this now.
Oh, really? I'll see it (Don't joined to the forums a long time ago u.u)
@bensku the dev20 is out but the bug explained above (can't set the player's tablist name if the player is a variable), if you can fix it...
This isn't fixed at all yet, as @JKGamerxD reported a while ago, you can't set the tablist name of a player variable. This gets fixed if you parse the variable as a player then set their name like this:
set {_test} to first element out of all players
set ({_test} parsed as player)'s tablist name to "testing"
But that shouldn't be the case.
Closing this since the bug explained here isn't related to this expression specifically (it is a parser bug).