Add hideifsneaking option for hiding players that are sneaking/crouching

This commit is contained in:
Mike Primm 2012-01-04 21:59:18 -06:00
parent 98a1f32e0f
commit a8c1558e3c
2 changed files with 6 additions and 0 deletions

View File

@ -35,6 +35,7 @@ public class ClientUpdateComponent extends Component {
String worldName = world.getName();
int hideifshadow = configuration.getInteger("hideifshadow", 15);
int hideifunder = configuration.getInteger("hideifundercover", 15);
boolean hideifsneaking = configuration.getBoolean("hideifsneaking", false);
s(u, "confighash", plugin.getConfigHashcode());
@ -67,6 +68,8 @@ public class ClientUpdateComponent extends Component {
hide = true;
}
}
if(hideifsneaking && p.isSneaking())
hide = true;
/* Don't leak player location for world not visible on maps, or if sendposition disbaled */
DynmapWorld pworld = MapManager.mapman.worldsLookup.get(p.getWorld().getName());

View File

@ -35,6 +35,8 @@ components:
# hideifshadow: 4
# # Optional - make player hidden when they are under cover (#=sky light level,0=underground,15=open to sky)
# hideifundercover: 14
# # (Optional) if true, players that are crouching/sneaking will be hidden
# hideifsneaking: false
#- class: org.dynmap.JsonFileClientUpdateComponent
# writeinterval: 1
# sendhealth: true
@ -47,6 +49,7 @@ components:
# require-player-login-ip: false
# hideifshadow: 0
# hideifundercover: 0
# hideifsneaking: false
- class: org.dynmap.SimpleWebChatComponent
allowchat: true