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.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of redinzane redinzane Apr 13, 2014 at 14:38 UTC - 0 likes

    @NolifeM: Go

    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.

  • Avatar of NolifeM NolifeM Apr 10, 2014 at 16:21 UTC - 0 likes

    It seen it doesn't work on MCPC+

  • Avatar of CommodoreAlpha CommodoreAlpha Feb 04, 2014 at 00:49 UTC - 0 likes

    @redinzane: Go

    Maybe you can find a way to distinguish NPCs from normal players? Perhaps by adding an optional hook into the Citizens API.

    Sure, I'd love to include my server IP here. But it's under construction, and I wouldn't want to get sued for players wandering inside and getting hit by a random beam of steel floating about. And no, I doubt plugins would make very good lawyers either. I've never seen a plugin that forced you to sign a contract do so well.

  • Avatar of redinzane redinzane Feb 03, 2014 at 14:07 UTC - 0 likes

    @amoKona: Go

    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.

  • Avatar of amoKona amoKona Feb 03, 2014 at 09:35 UTC - 0 likes

    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 !

  • Avatar of pilvimaa pilvimaa Jan 30, 2014 at 01:18 UTC - 0 likes

    @redinzane: Go

    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.

  • Avatar of redinzane redinzane Jan 28, 2014 at 19:46 UTC - 0 likes

    @pilvimaa: Go

    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?

  • Avatar of pilvimaa pilvimaa Jan 27, 2014 at 14:16 UTC - 0 likes

    I've been testing now with 30 users and:

      updatecooldown: 10
      sneakdistance: 208
      los: true
    

    No tps drop of any kind. I'm getting normal performance.

  • Avatar of redinzane redinzane Jan 24, 2014 at 16:55 UTC - 0 likes

    @pilvimaa: Go

    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.

  • Avatar of pilvimaa pilvimaa Jan 22, 2014 at 23:09 UTC - 0 likes

    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.

Facts

Date created
May 30, 2013
Categories
Last update
Jan 29, 2014
Development stage
Release
License
GNU General Public License version 2 (GPLv2)
Curse link
PlayerHider
Downloads
1,470
Recent files

Authors