PlayerHider
PlayerHider
PlayerHider is a plugin that shows players further than a configurable distance as sneaking to make underground bases harder to spot. It also (as of 0.4) features Line of Sight hiding for players within the configured distance. This is done via Packet Manipulation through ProtocolLib which shouldn't trigger any Anti-Cheating Measures or interfere with other plugins.
It uses code from Sneaky:
Sneaky (C) 2013 Kristian S. Stangeland, Licensed under the GNU GPL2, available at http://dev.bukkit.org/server-mods/sneaky/ It also uses (as of 0.5) Plugin-Metrics by Hidendra, available here: https://github.com/Hidendra/Plugin-Metrics
Dependencies
This plugin requires ProtocolLib to function!
Features
- Shows players further than the specified distance away from a player as sneaking to that player
- If LoS is turned on, shows players within that distance as sneaking if they are behind objects
- Can be hidden for operators, admins, moderators...
Planned Features
- Currently no planned features in the near future. Let me know if you want anything.
Commands
There are no commands, currently.
Permissions
- playerhider.hide.autosneak: Hides the autosneaking for that player, everyone appears normal to them.
Config
Very easy to configure, disable and reeanble the plugin for changes to take effect:
- updatecooldown: The plugins tickrate in milliseconds, from 0 for as often as possible (only use this for v0.5 or newer and on servers running at a good tickrate) up to technically infinity (though I recommend 1000 for once a second as a default for weak servers). This affects both LoS and distance based hiding.
- sneakdistance: Players further apart than this distance (in blocks) are shown as sneaking to each other. If LoS is active players who are within that distance from each other are checked for visibility and are shown as sneaking if they are not visible to each other. You can set this pretty high, but this will increase server load if many players are within the distance from each other. This should be a negligible on any servers maintaining the deafult tickrate but might be a concern on weaker servers.
- LoS: This turns Line of Sight hiding on or off, default off, set true to turn it on.
Features: friend system like when u add friend u see every time him (sorry for my bad english)
i dont understand usage of this plugin...
i want to stop wallhack for gun pvp server...
Does this plugin shows players behind blocks or hides them?
@olegikoligik
If it was possible don't you think I would have done it? The only way I could have done it differently is to completely vanish the player.
Though if you have set the hiding distance to something high, have LoS based hiding on and the cooldown to something low you should rarely see people sneaking unnecessarily anyway. Do you want some help in setting up the config?
It is possible that the nickname hide without animation "sneak"?
@redinzane
thx,it's kind of u,it's problem with ProtocolLib
@NolifeM
I wouldn't expect it to, really. I use the ProtocolLib plugin which uses some very specific aspects of bukkit's network stuff and features of it probably break when too much is changed.
Though if you'd supply some more info on what exactly does not work, I'll see if it's worthwhile looking into a fix.
It seen it doesn't work on MCPC+
@redinzane
Maybe you can find a way to distinguish NPCs from normal players? Perhaps by adding an optional hook into the Citizens API.
@amoKona
I will look into it but can't make any promises. I'm guessing it's due to the NPCs being treated like players when created but not being treated as players when asking bukkit for all online players (which I use to update players). If it is so, there's few things I can do, but I'll try.
Hey ! i'm having an issue with npcs, i was testing your plugin on my server, and it works great with players, but for a non-op player npcs are either always normal even out of sight, or always sneaking when i create an npc out of sight of the player, even when i'm in front of the npc, he'll just stay in sneak mode ! If you could fix that it would be great i love this plugin and i really don't want to change it for another, not just for that, thanks in advance !
@redinzane
Mostly they like to be in groups. Many people hang out at spawn. Perhaps 10-15 people at one place.
Considering all this I would say your plugin gives out great performance with little overhead.
TPS stays steadily at 20.
@pilvimaa
updatecooldown at 10? Damn, that's (up to) 100 times a second. Btw, I would not recommend setting this lower than your tickrate, that would cause problems.
As a statistical question, if you don't mind answering, do your players tend to bunch up or spread out (are they usually within the set sneakdistance of each other?). If they do, how large would these groupings be?
I've been testing now with 30 users and:
No tps drop of any kind. I'm getting normal performance.
@pilvimaa
Thanks for the performance test, as I don't Admin I couldn't test for big loads and large playercounts (most I tested was 3). Also, yes I'm currently using a bukkit function to check LoS that does not ignore transparent blocks (might change that after exams in March, but don't expect that any earlier if at all, no promises there) and players beyond the sneak distance are still shown as sneaking when LoS is on, that's intended.
If your performance allows it, feel free to increase the sneak distance further, it's defaulted at 32 because at that point vanilla Minecraft no longer displays nametags for sneaking players even if they are in sight.
I cranked the sneakdistance up to 208 and I have LoS on. With about 30 users online, absolutely zero performance hit and works like a charm.
I'm not sure if this is a bug or a feature but it seems that even with LoS enabled players beyond the specified distance are shown as sneaking even when they are not behind anything.
If I don't want to see sneaking players who are not behind something - is it intended that I increase the sneakdistance setting beyond the rendering range of the server or is this a bug?
In my case the rendering range for players is 208 blocks ... but it could bring problems if I crank up the sneakdistance setting that much, or.. ?
I will try it now and see what happens, but I would like to have better understanding of this.
Seems to work just fine with Spigot 1.7.2. I haven't yet had the chance to test the load with 30 users but I doubt it will have any perceivable hit on performance of the server.
You forgot to ignore opaque blocks like glass and dyed glass. But it doesn't really matter. I am very excited about this.
A big thank you is in order :-)
If I find any flaws/issues I'll be sure to report back but so far it seems to work flawlessly.
@Rkaynjehll
It is already updated as of yesterday. I'm just waiting on some site administrator to approve the file. LoS is in, 1.7 may work but is unconfirmed.
Really looking forward to those LoS features with interest :-)