Gunpowder-MC / GunpowderUtilities

MIT License
3 stars 0 forks source link

Vanish improvements #6

Closed samolego closed 3 years ago

samolego commented 4 years ago

This commit should fix issue #5 and #7 . It's a simple mixin injection to the write method of the query packet class.

As seen in the picture, there are actually 2 players online, but Alex is vanished. showcase

Should the server ping show 1/2 players online (player is still kicked upon joining since it's actually full) or should the max player count be modified as well? (So it would show 1/1 players online on the client)

samolego commented 4 years ago

I was thinking more of the max player count number; maybe it would be best to show the actual number of max players if the server is not full. Otherwise, show the modified max count.

ghost commented 4 years ago

Would be nice to be able to configure gunpowder so that vanished players do not to count toward the max player count, so that cheaters would not get suspicious over a changing max player count.

samolego commented 4 years ago

So you mean it would allow more players than the max count (if we include vanished ones)?

What happens when a player disables vanish mode? It would then show x/y players on client, x being > y ...

ghost commented 4 years ago

So you mean it would allow more players than the max count (if we include vanished ones)?

What happens when a player disables vanish mode? It would then show x/y players on client, x being > y ...

This can happen in vanilla if an OP has the bypass player limit set to "true" in ops.json.

samolego commented 4 years ago

This can happen in vanilla if an OP has the bypass player limit set to "true" in ops.json.

Ah, ok, wasn't aware of this. I'll have another look into it then.

samolego commented 4 years ago

This is drafted again, since #7 needs to be fixed before this is merged. Otherwise, if player leaves while vanished, the vanished count isn't decreased.

samolego commented 4 years ago

This is now ready to be merged.

To sum it up: Fixes #5 and #7 by keeping the track of the vanished player count.

samolego commented 4 years ago

@i509VCB sorry for ping, but could you review this? Martmists said he's kinda burned out atm. Thanks.

i509VCB commented 4 years ago

@samolego if you poke me tomorrow in discord I can look then. I'd say in about 16 hours?

samolego commented 4 years ago

@samolego if you poke me tomorrow in discord I can look then. I'd say in about 16 hours?

Ok, thank you. 11 hrs from now on :-)

samolego commented 4 years ago

This is ready to be merged now I guess 😃 ?

samolego commented 4 years ago

Of course I assume you gave a real client and server a run to make sure this works.

Yep, it was tested in singleplayer(+ LAN) and server

Martmists-GH commented 3 years ago

@i509VCB if you could give this one last review

samolego commented 3 years ago

Sorry I was trying to rename branch to open another PR to fix #17 and messed things up