mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 19:25:15 +01:00
Add hideifsneaking option for hiding players that are sneaking/crouching
This commit is contained in:
parent
98a1f32e0f
commit
fde86f1170
@ -35,6 +35,7 @@ public class ClientUpdateComponent extends Component {
|
|||||||
String worldName = world.getName();
|
String worldName = world.getName();
|
||||||
int hideifshadow = configuration.getInteger("hideifshadow", 15);
|
int hideifshadow = configuration.getInteger("hideifshadow", 15);
|
||||||
int hideifunder = configuration.getInteger("hideifundercover", 15);
|
int hideifunder = configuration.getInteger("hideifundercover", 15);
|
||||||
|
boolean hideifsneaking = configuration.getBoolean("hideifsneaking", false);
|
||||||
|
|
||||||
s(u, "confighash", plugin.getConfigHashcode());
|
s(u, "confighash", plugin.getConfigHashcode());
|
||||||
|
|
||||||
@ -67,6 +68,8 @@ public class ClientUpdateComponent extends Component {
|
|||||||
hide = true;
|
hide = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(hideifsneaking && p.isSneaking())
|
||||||
|
hide = true;
|
||||||
|
|
||||||
/* Don't leak player location for world not visible on maps, or if sendposition disbaled */
|
/* Don't leak player location for world not visible on maps, or if sendposition disbaled */
|
||||||
DynmapWorld pworld = MapManager.mapman.worldsLookup.get(p.getWorld().getName());
|
DynmapWorld pworld = MapManager.mapman.worldsLookup.get(p.getWorld().getName());
|
||||||
|
@ -35,6 +35,8 @@ components:
|
|||||||
# hideifshadow: 4
|
# hideifshadow: 4
|
||||||
# # Optional - make player hidden when they are under cover (#=sky light level,0=underground,15=open to sky)
|
# # Optional - make player hidden when they are under cover (#=sky light level,0=underground,15=open to sky)
|
||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
|
# hideifsneaking: false
|
||||||
#- class: org.dynmap.JsonFileClientUpdateComponent
|
#- class: org.dynmap.JsonFileClientUpdateComponent
|
||||||
# writeinterval: 1
|
# writeinterval: 1
|
||||||
# sendhealth: true
|
# sendhealth: true
|
||||||
@ -47,6 +49,7 @@ components:
|
|||||||
# require-player-login-ip: false
|
# require-player-login-ip: false
|
||||||
# hideifshadow: 0
|
# hideifshadow: 0
|
||||||
# hideifundercover: 0
|
# hideifundercover: 0
|
||||||
|
# hideifsneaking: false
|
||||||
|
|
||||||
- class: org.dynmap.SimpleWebChatComponent
|
- class: org.dynmap.SimpleWebChatComponent
|
||||||
allowchat: true
|
allowchat: true
|
||||||
|
Loading…
Reference in New Issue
Block a user