#StaffPlus Placeholder [JavaScript]
1 messages ยท Page 1 of 1 (latest)
Hey there
anybody know how to help me with the creation of the JavaScript placeholder?
I need for staffplus plugin, example:
Staffmode: On
?imgur
You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.
could use changeoutput
-papi changeoutput
bit simpler than javascript
smh papi bot doesn't work here
how can I do that mr Cj
Should i write that in chat or?
%changeoutput_<options>_input:<input>_matcher:<matcher>_ifmatch:<output-if-matched>_else:<output-if-not-matched>%
i put that in TAB config
but how i dont understand
take a look at some examples on the github https://github.com/Kqliber/Expansion-ChangeOutput#examples
So thic can basicaly
if im in /staff [true]
It will write True
if I type /staff [off]
it will say Off
?
I think cj might've misunderstood what you want. He thought that there is already a placeholder and you just need to change the output. For example if the placeholder would return true, you would want it to say &3Yes instead.
But if I am correct, StaffPlus doesn't already have a placeholder that returns true or false if the player is in staff mode and you want one made. If this is the case, this isn't really possible with the javascript expansion. At least not since a few versions ago. You can't load java classes anymore. You would need an actual java expansion made for this.
"It is time. This has to be one of the most requested feature placeholder API support and I finally got around to doing it. Currently there are 3 placeholders.
%staffplus_staff_in_mode%
%staffplus_vanished%
and finally
%staffplus_staff_online%
All of these return the users name. If you can think of more to add just suggest them and what you'd like the actual name of it to be"
These are all the staffplus placeholders, i asked for those a while ago and it got added after like 3/4 years ago: Where i also asked for a check if a person was in staffmode: https://github.com/Qballl/StaffPlus/issues/108
Maybe you could ask them again in their discord or on their github but i dont feel like they will add it any time soon
%staffplus_staff_in_mode% this returns a list of all online people with staff mode enabled?
Yeah
...
So you can check for a number and if that is higher then 0 you can do some things
Wait. Number? Not list?
so
It kinda sucks
they implemented it shittily
yeah very
So, it doesn't even give you like BlitzOffline, cj for example?
I see your github post
it gives you 2 instead?
you said:
%staffplus_vanish% = Whether the player is vanished.
%staffplus_staff_mode% = Whether the player is in staff-mode.
%staffplus_online_staff% = Amount of online staff.
They said "nah"
it gives this
Yeah i know my english is not the best but i was pretty clear there right
๐
@viral whale not sure anymore what %staffplus_staff_in_mode% gives as a return but you can maybe try something with that
Ojox test the placeholders and tell us what they return
if they return a list like BlitzOffline, cj89898 or a number like 2
But i think the way I did "fix" this was enabling vanish by SuperVanish when enabling staffmode and when i left staffmode disable vanish. And then check for %supervanish_isvanished% what it returns
You're correct
it doesnt have placeholders StaffPlus
Altough im looking at my config right now which says this:
'%staffplus_is_vanished%':
"true": '&aEnabled'
"false": '&cDisabled'
So it could be it has a right placeholder
I don't see anything about placeholderapi either
in the source code
well, about providing placeholders*
but it was mentioned in the update that Florens copied
this one is the one they quoted
Hmm, well I thought that I would add these
[Staff Online]
[Is player (admin) in staff mode {true/false}]
I searched for the placeholders for staffplus but I couldnt find any
the github hasn't been updated i see
yep I think they won't saw a similar post for this on their discord but still nothing
thats why I thought If its possible through JavaScript
yep
gonna try it rn
gimme a sec
lol
probably
i had to decompile the source to check lol
sad they can't even use papi booleans yes/no
if (params.equalsIgnoreCase("staff_in_mode")) {
StringBuilder sb = new StringBuilder();
sb.append("Staff currently in mode: ");
(StaffPlus.get()).modeCoordinator.getModeUsers().stream().forEach(user -> sb.append(Bukkit.getPlayer(user).getName() + ", "));
return sb.toString();
}
this is probably the stupidest placeholder I've seen
I have this in my last server' config
"in mode"
so... It's possible?
Ooh and thanks guys for the fast support ๐ฅ
gonna try it in a few mins
So there is also %staffplus_is_vanished%
had to go back joining that discord server but found it lol
staff_in_mode - list of staff in mode
vanished - list of users in vanish
num_vanished - number of users in vanish
staff_online - list of staff online
num_staff_online - number of staff online
online - users online (excluding vanished)
num_online - number of users online excluding vanished
rank_prefix - rank prefix
is_in_mode - true/false if user is in mode
is_vanished - true/false if user is in vanish
Are those all the placeholders they have?
this is the current list I got from the latest plugin .jar
ya
Ill ask if they can add them to their page
%staffplus_num_staff_online% i think
ye ye thats what i ment sorry
@spring raven btw it works ๐
Nice
nope
it works only for this
What do you mean exactly
this placeholder doesnt work
Like only staff or only players or both?
it just displays the %placeholder%
%staffplus_num_staff_online% <- it displays it like that
%staffplus_num_staff_online%
That should be it
It maybe could be that it does not work. Not all my configs are 100% ๐
everything works only this doesnt
for the placeholders
- ''
- ' &6โ &eAdministration'
- ' &6โ &7Staffmode: &f%staffplus_is_in_mode%'
- ' &6โ &7Rank: &f%vault_group%'
- ' &6โ &7Online: &f%staffplus_num_staff_online%'
- ' &6โ &7Vanished: &f%staffplus_is_vanished%'
- ''
I mentioned it in the staffplus discord. Lets see what the dev is gonna do.
Okay thanks ๐ฅ ๐
Florens if you will have the time, if you wanna check out also #1044277970317086740 ๐
Can't do much about that. CJ is already helping you and he can help you better then I can.
Okay bosses, you know how things go! ๐ฅ
Oh yea ik, but I'm so excited 'bout that feature I mean honestly looks dope
It for sure looks cool, that's why I asked to them if they could add placeholders x)
This is the error to the placeholder
the one by ZNAMY
or the scoreboard i mean
Nice and good dev
โ like the devs from HelpChat ๐ ๐ด
no seriously rlly thankful
You can change the values if you want btw
To yes or no for example
instead of false or true
its nice this way so it doesnt really matter but yeah
in the TAB plugin or in the placeholderAPI
or in StaffPlus
In the tab plugin
placeholder-output-replacements:
'%staffplus_is_vanished%':
"true": '&aEnabled'
"false": '&cDisabled'
Like i had this for example
And in the TAB plugin
We are going off topic here i dont know if thats a problem? @flat jasper
I dont mind I mean youre keeping it professional so..
I think its not a problem
Most of the time forum posts are there so people that have the same issue can find an answer while looking on the internet
So then its nice to not go off topic but this is discord
I understand it's okay โ
Anything new about the online placeholser