#(Stewe) Is there a way for the tablist update event to detect if it was caused by denizen or vanil
41 messages · Page 1 of 1 (latest)
(Stewe) Is there a way for the tablist update event to detect if it was caused by denizen or vanil
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
theres no need to detect if it was caused by denizen command, since youre the one firing it..?
if you know what i mean
i want to filter out the ones that are caused by denizen
for example:
- determine passively cancelled
- update tablist with custom stuff```
this wouldnt work because it is cancelling itself in a loop
!xyproblem
Your question seems to be an XY Problem - you're asking about your attempted solution rather than your original problem.
Read in detail about the XY Problem here: http://xyproblem.info/
For an example of an XY Problem we've seen in Denizen, the question "how do I make an event for when a flag expires" has no answer, but the same question asked with full background detail will be something more like "I have this script: [LINK HERE], which sets a 3 minute cooldown flag on a player for when they use an ability. I want the player to be notified when the cooldown completes - how do I do this?" which we can then answer quite effectively (in this example, all that was needed was a simple wait command, no events or flag-listening or anything).
check if it's a command that you have a script for
but definitely xy problem still, im just guessing what you might need lol
i want to have a custom tablist and i dont want the player to receive tablist updates, only tablist updates from the -tablist command should be allowed the others not
i dont know how to describe it so well
If you want to modify it in the event like that example you posted, use the event's determinations instead of cancelling and using the command
Otherwise, please explain what are you actually trying to do instead of what's your attempted solution
is there not a way to temporarily disable an event, just for running one command? or a way to make events only fire if they are not caused by a command in denizen?
You are still asking about you attempted solution, for us to efficiently help you we need to know what are you actually trying to do ;-;
i just want to know if something like that is possible, ignore what im trying to do pls
E.g. I am making the names of all players in the tab list red using the event, but I also have a special case where I want them to be green while in a specific area, how can I do that?
That's a bad mindset for getting support - we want to help and need to know what are you doing so that we can give good advice, what you're suggesting is a bad practice and likely way overcomplicated then what you actually need
All the helpers (and quite a few users) are experienced with building larger systems like that, which is why we always want to know your actual goal so that we can give you proper advice and help you build a good setup for yourself, we don't want to leave you with bad practices and unstable stuff that may break on future updates
alr let me try to explain it
I want to have a seamless fake tab shown to all players in the server which are not staff (to make it simpler in this case op). When a staff player joins for example, all other players don't sees it and the packet will be cancelled (the packet which adds the player to the tablist), but all other staff members see the person joining.
But this wont be the only thing i want to be able to manage (no only if players join or leave) but also names and gamemodes should be customizable.
Now my solution was to disable all packets regarding tab updates and making a custom tablist update so that i have everything of tabs under control. But since cancelling any tab event also cancells the -tablist command, i cant get it to work.
is this clear enough? (pls yes)
can you help me with this? or is my request still bad
No need to ping / ask for a person specifically, I personally had to go do something but the entire helper team is available & can see the thread
But if I understood you correctly, you shouldn't need the tablist command at all - correct me if I misunderstood, but you can just
on tablist update:
- if !<context.sent_to.is_staff> && <context.player_its_about.is_staff>
- cancel
- modify anything else you'd like here
(Pseudo-code, obviously)
And for the name in the tablist specifically, there is
!m player_list_name
Sets the entry that is shown in the 'player list' that is shown when pressing tab.
PlayerTag
ElementTag
<PlayerTag.list_name> Returns the name of the player as shown in the player list.