mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-26 18:47:40 +01:00
Merge pull request #4015 from JurgenKuyper/v3.0
implemented hide if spectator
This commit is contained in:
commit
b181607e5a
@ -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
|
||||
|
@ -191,12 +191,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -191,12 +191,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -191,12 +191,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -201,6 +201,13 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -196,12 +196,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
||||
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if (player != null) {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
return plugin.getSortWeight(getName());
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1327,10 +1327,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator()
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -68,6 +68,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1286,10 +1286,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1295,10 +1295,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1313,10 +1313,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1293,10 +1293,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1300,10 +1300,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1300,10 +1300,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1302,10 +1302,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1300,10 +1300,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1308,6 +1308,13 @@ public class DynmapPlugin
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
Integer wt = sortWeights.get(getName());
|
||||
if (wt != null)
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -1302,10 +1302,17 @@ public class DynmapPlugin
|
||||
}
|
||||
@Override
|
||||
public boolean isInvisible() {
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
if(player != null) {
|
||||
return player.isInvisible();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.isSpectator();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
@ -22,14 +22,7 @@ import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.CustomChart;
|
||||
import org.bstats.json.JsonObjectBuilder;
|
||||
import org.bstats.json.JsonObjectBuilder.JsonObject;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.ChunkSnapshot;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
@ -109,7 +102,6 @@ import org.dynmap.common.chunk.GenericMapChunkCache;
|
||||
import org.dynmap.hdmap.HDMap;
|
||||
import org.dynmap.markers.MarkerAPI;
|
||||
import org.dynmap.modsupport.ModSupportImpl;
|
||||
import org.dynmap.renderer.DynmapBlockState;
|
||||
import org.dynmap.utils.MapChunkCache;
|
||||
import org.dynmap.utils.Polygon;
|
||||
import org.dynmap.utils.VisibilityLimit;
|
||||
@ -768,6 +760,13 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isSpectator() {
|
||||
if(player != null) {
|
||||
return player.getGameMode() == GameMode.SPECTATOR;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public int getSortWeight() {
|
||||
Integer wt = sortWeights.get(getName());
|
||||
if (wt != null)
|
||||
|
@ -80,6 +80,8 @@ components:
|
||||
# hideifundercover: 14
|
||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||
hideifsneaking: false
|
||||
# optional, if true, players that are in spectator mode will be hidden
|
||||
hideifspectator: false
|
||||
# If true, player positions/status is protected (login with ID with dynmap.playermarkers.seeall permission required for info other than self)
|
||||
protected-player-info: false
|
||||
# If true, hide players with invisibility potion effects active
|
||||
|
Loading…
Reference in New Issue
Block a user