Parkour

Parkour

570k Downloads

Toggling player visibility breaks players who were invisible prior outside of parkour.

mibby opened this issue ยท 26 comments

commented

Compiled as of d3cbb66

Players who toggle player visibility are able to see those who were invisible prior to joining, such as staff members who went invisible to watch over another player.

  • Player1 (staff) /vanishes.
  • Player2 joins parkour.
  • Player2 toggle hides all players, then toggle shows all players.
  • Player2 leaves parkour.
  • Player2 is now able to see Player1 who was originally vanished.

In my case, I use VanishNoPacket (https://dev.bukkit.org/projects/vanish) in conjunction with ProtocolLib to force certain players vanished and for staff members to hide from others. It to my knowledge hides players by removing the player packet directly so hack clients can't see sent nearby player packets. When someone toggles hidden players within parkour, it allows vanished players to be shown to that player. Thus;

  1. Would it be possible to respect current invisible / vanished players not handled by Parkour to not refresh / display them when someone toggles all players visible when they shouldn't have access to seeing those players?

  2. Would it be possible for Parkour to only toggle players invisible / visible who are actually part of parkour mode / of that parkour course instead of everyone globally?

commented

I've gone for option 2 as it makes the most sense without over complicating things.
Will test then commit.

commented

@A5H73Y This doesn't seem to be working.

    HideAll:
      Material: BONE
      Global: false

Toggling the bone with two people in the same course, players don't vanish (or reappear, but can't test that since they don't vanish to begin with on toggle). Also noticed you can't spam click the tool a second after using it, slight cooldown on it?

commented

That is bizarre, I tested with 1 other player and it seemed to work, so I will look into it.
Yes I added a 1 second cool down, just in case.

commented

@A5H73Y Bump. A fix would be nice as soon as possible. :( Lots of reports of it not working (toggling players hidden who are part of the same parkour course / in parkour mode) when global is set to false.

commented

That would be ideal behavior, however it isn't hiding any players who are in parkour mode whatsoever with global set to false.

I had 2 players join the same parkour course, then try to toggle hide players. They didn't see the other person vanish at all.

commented

Wait, have we misunderstood each other? By the way your describing, it sounds like it's working.
If global is on, it will hide / show ALL players on the server
If global is off, it will hide / show players who are in Parkour mode..?

commented

@steve4744 are you able to recreate this? I'm not. :/

commented

Ok, I've got global set to false. With both players playing on the same course:
If I click the bone, the other player goes invisible (although she can still see me). Click again she is visible again. The reverse is also if she uses the bone.

If we both click the bone, then we are both invisble at the same time.

So I dont have a problem with it - seems to work as I would expect.

Edit: I don't have the vanish plugin that @mibby has on his server. Sounds like there might be some conflict.

commented

Hm, every time I test on my production server, it is 100% broken with shift interact and global disabled - doesn't toggle anyone part of parkour. I'll setup a test environment tomorrow and record reproduction steps with minimal plugins.

commented

@A5H73Y Sorry, been busy. Here is a video reproducing the problem. Tested and compiled Parkour as of commit 90aec0c (4.1 release build).

  • With global disabled, showed that players not part of parkour do not toggle (Good)
  • Showed players both part of the same parkour course do not toggle (Bad)
  • Re-enabled global and reloaded parkour from console, showed global toggles all players (Good, but not intended behavior I'd like - I would like it so only players part of parkour can toggle others inside parkour rather than everyone globally)
commented

I tested by removing every plugin one at a time. The conflict seems to be with EssentialsXChat for whatever reason.

I use EssentialsX dev 473. All EssentialsX jars work fine with the exception of the chat one installed. Perhaps the way you are looking for players by name causes it to break?

https://github.com/drtshock/Essentials
https://ci.drtshock.net/job/EssentialsX/

commented
commented

Not sure how that is related. I don't have an issue with people randomly vanishing, just Parkour can't toggle players in a parkour course invisible with the global vanish setting disabled when Essentials Chat is installed.

commented

True - its a different issue but there appears to be a conflict between EssentialsX and VnP according to the last couple of posts. The workaround for him was to remove the vanish part from the plugin.yml of EssentialsX. Just thought it might be worth trying.

commented

The conflict issue has nothing to do with VanishNoPacket and Essentials though. It breaks outright with just EssentialsChat installed presumably because of the way names are looked up in Parkour.

commented

Yes, you could be correct. If another plugin somehow changes their name to what Parkour expects then things go wrong, I test my plugin on a vanilla server so I am usually confident that problems are caused by 3rd party plugins.
Looking at https://github.com/A5H73Y/Parkour/blob/master/src/main/java/me/A5H73Y/Parkour/Utilities/Utils.java#L875-L885 (specifically line 879)
Could you debug to see if the names differ and are not matching, thus making the plugin think they're not playing Parkour? @mibby @steve4744
Hope this helps.

commented

@A5H73Y

Could you debug to see if the names differ and are not matching, thus making the plugin think they're not playing Parkour?

How would I go about testing that? Can you provide me a debug build that outputs the exact name of all players it is attempting to toggle when using the tool?

Also perhaps would it be better to use or fallback to getDisplayName or even just Player.getName rather than the playerlist name if what is breaking it is users being colored based on prefix?

commented

@A5H73Y Any update? :(

commented

Very quickly created a (hopeful) fix version for you, because I'm working on upgrading the dev build website at the moment.
https://www.dropbox.com/s/p0xo8m9hh8bu05l/Parkour.jar?dl=0

commented

@mibby did it work?

commented

@A5H73Y Sorry, busy week for me. That version does seem to fix the problem. However if you toggle players who are part of that course invisible and they leave the arena, they stay invisible for that player. You can't toggle them visible again with the tool since it is arena specific - not global. You'll need to make it so visibility is forced re-enabled for the person who toggled when a player leaves the parkour course when invisible.

commented

I'm confident that's what it should be doing; I will look into why it isn't showing the player.

commented

Perhaps you are resetting all vanished players back visible when you as a player leave the parkour course but not when those who are toggled invisible to you decide to leave? Since you didn't have local toggling before, it made sense to only force reappear everyone when you left the course.

commented

Bump.

commented

Hey mibby, it's hard to diagnose the problem when I don't understand what it is.
If you could add me either on skype: iA5H73Y or join the ParkourSupport Discord server: Click here

commented

@A5H73Y I'm receiving reports that this is apparently still broken. With local toggling, players are able to toggle vanished people, i.e. staff not part of the course, visible.

I'm guessing the local parkour player list is broken and toggling everyone regardless of playing state with global disabled?

Edit: Actually I believe this is caused by you forcing everyone visible when leaving a parkour course.
0d8884d So if staff were vanished prior to a person playing, joining and leaving parkour will force them visible.