Merge pull request #4015 from JurgenKuyper/v3.0
implemented hide if spectator
This commit is contained in:
commit
b181607e5a
48 changed files with 269 additions and 69 deletions
|
|
@ -12,6 +12,7 @@ public class ClientUpdateComponent extends Component {
|
|||
private int hideifshadow;
|
||||
private int hideifunder;
|
||||
private boolean hideifsneaking;
|
||||
private boolean hideifspectator;
|
||||
private boolean hideifinvisiblepotion;
|
||||
private boolean is_protected;
|
||||
public static boolean usePlayerColors;
|
||||
|
|
@ -24,6 +25,7 @@ public class ClientUpdateComponent extends Component {
|
|||
hideifshadow = configuration.getInteger("hideifshadow", 15);
|
||||
hideifunder = configuration.getInteger("hideifundercover", 15);
|
||||
hideifsneaking = configuration.getBoolean("hideifsneaking", false);
|
||||
hideifspectator = configuration.getBoolean("hideifspectator", false);
|
||||
hideifinvisiblepotion = configuration.getBoolean("hide-if-invisiblity-potion", true);
|
||||
is_protected = configuration.getBoolean("protected-player-info", false);
|
||||
usePlayerColors = configuration.getBoolean("use-name-colors", false);
|
||||
|
|
@ -100,6 +102,9 @@ public class ClientUpdateComponent extends Component {
|
|||
if((!hide) && hideifsneaking && p.isSneaking()) {
|
||||
hide = true;
|
||||
}
|
||||
if((!hide) && hideifspectator && p.isSpectator()) {
|
||||
hide = true;
|
||||
}
|
||||
if((!hide) && is_protected && (!see_all)) {
|
||||
if(e.user != null) {
|
||||
hide = !core.testIfPlayerVisibleToPlayer(e.user, p.getName());
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ public interface DynmapPlayer extends DynmapCommandSender {
|
|||
* @return true if sneaking
|
||||
*/
|
||||
public boolean isSneaking();
|
||||
|
||||
/**
|
||||
* get spectator gamemode
|
||||
* @return true if gamemode spectator
|
||||
*/
|
||||
public boolean isSpectator();
|
||||
/**
|
||||
* Get health
|
||||
* @return health points
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue