mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-28 03:27:36 +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 hideifshadow;
|
||||||
private int hideifunder;
|
private int hideifunder;
|
||||||
private boolean hideifsneaking;
|
private boolean hideifsneaking;
|
||||||
|
private boolean hideifspectator;
|
||||||
private boolean hideifinvisiblepotion;
|
private boolean hideifinvisiblepotion;
|
||||||
private boolean is_protected;
|
private boolean is_protected;
|
||||||
public static boolean usePlayerColors;
|
public static boolean usePlayerColors;
|
||||||
@ -24,6 +25,7 @@ public class ClientUpdateComponent extends Component {
|
|||||||
hideifshadow = configuration.getInteger("hideifshadow", 15);
|
hideifshadow = configuration.getInteger("hideifshadow", 15);
|
||||||
hideifunder = configuration.getInteger("hideifundercover", 15);
|
hideifunder = configuration.getInteger("hideifundercover", 15);
|
||||||
hideifsneaking = configuration.getBoolean("hideifsneaking", false);
|
hideifsneaking = configuration.getBoolean("hideifsneaking", false);
|
||||||
|
hideifspectator = configuration.getBoolean("hideifspectator", false);
|
||||||
hideifinvisiblepotion = configuration.getBoolean("hide-if-invisiblity-potion", true);
|
hideifinvisiblepotion = configuration.getBoolean("hide-if-invisiblity-potion", true);
|
||||||
is_protected = configuration.getBoolean("protected-player-info", false);
|
is_protected = configuration.getBoolean("protected-player-info", false);
|
||||||
usePlayerColors = configuration.getBoolean("use-name-colors", false);
|
usePlayerColors = configuration.getBoolean("use-name-colors", false);
|
||||||
@ -100,6 +102,9 @@ public class ClientUpdateComponent extends Component {
|
|||||||
if((!hide) && hideifsneaking && p.isSneaking()) {
|
if((!hide) && hideifsneaking && p.isSneaking()) {
|
||||||
hide = true;
|
hide = true;
|
||||||
}
|
}
|
||||||
|
if((!hide) && hideifspectator && p.isSpectator()) {
|
||||||
|
hide = true;
|
||||||
|
}
|
||||||
if((!hide) && is_protected && (!see_all)) {
|
if((!hide) && is_protected && (!see_all)) {
|
||||||
if(e.user != null) {
|
if(e.user != null) {
|
||||||
hide = !core.testIfPlayerVisibleToPlayer(e.user, p.getName());
|
hide = !core.testIfPlayerVisibleToPlayer(e.user, p.getName());
|
||||||
|
@ -44,6 +44,12 @@ public interface DynmapPlayer extends DynmapCommandSender {
|
|||||||
* @return true if sneaking
|
* @return true if sneaking
|
||||||
*/
|
*/
|
||||||
public boolean isSneaking();
|
public boolean isSneaking();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get spectator gamemode
|
||||||
|
* @return true if gamemode spectator
|
||||||
|
*/
|
||||||
|
public boolean isSpectator();
|
||||||
/**
|
/**
|
||||||
* Get health
|
* Get health
|
||||||
* @return health points
|
* @return health points
|
||||||
|
@ -191,12 +191,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -191,12 +191,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -191,12 +191,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -194,12 +194,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -201,6 +201,13 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -196,12 +196,18 @@ public class FabricPlayer extends FabricCommandSender implements DynmapPlayer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if (player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
return plugin.getSortWeight(getName());
|
return plugin.getSortWeight(getName());
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1328,7 +1328,14 @@ public class DynmapPlugin
|
|||||||
@Override
|
@Override
|
||||||
public boolean isInvisible() {
|
public boolean isInvisible() {
|
||||||
if(player != null) {
|
if(player != null) {
|
||||||
return player.isInvisible();
|
return player.isInvisible()
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator()
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -68,6 +68,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1292,6 +1292,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1301,6 +1301,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1319,6 +1319,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1299,6 +1299,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1306,6 +1306,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1306,6 +1306,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1308,6 +1308,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1306,6 +1306,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1308,6 +1308,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
@ -1308,6 +1308,13 @@ public class DynmapPlugin
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.isSpectator();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# 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.charts.CustomChart;
|
||||||
import org.bstats.json.JsonObjectBuilder;
|
import org.bstats.json.JsonObjectBuilder;
|
||||||
import org.bstats.json.JsonObjectBuilder.JsonObject;
|
import org.bstats.json.JsonObjectBuilder.JsonObject;
|
||||||
import org.bukkit.Bukkit;
|
import org.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.attribute.Attribute;
|
import org.bukkit.attribute.Attribute;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
@ -109,7 +102,6 @@ import org.dynmap.common.chunk.GenericMapChunkCache;
|
|||||||
import org.dynmap.hdmap.HDMap;
|
import org.dynmap.hdmap.HDMap;
|
||||||
import org.dynmap.markers.MarkerAPI;
|
import org.dynmap.markers.MarkerAPI;
|
||||||
import org.dynmap.modsupport.ModSupportImpl;
|
import org.dynmap.modsupport.ModSupportImpl;
|
||||||
import org.dynmap.renderer.DynmapBlockState;
|
|
||||||
import org.dynmap.utils.MapChunkCache;
|
import org.dynmap.utils.MapChunkCache;
|
||||||
import org.dynmap.utils.Polygon;
|
import org.dynmap.utils.Polygon;
|
||||||
import org.dynmap.utils.VisibilityLimit;
|
import org.dynmap.utils.VisibilityLimit;
|
||||||
@ -768,6 +760,13 @@ public class DynmapPlugin extends JavaPlugin implements DynmapAPI {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
if(player != null) {
|
||||||
|
return player.getGameMode() == GameMode.SPECTATOR;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public int getSortWeight() {
|
public int getSortWeight() {
|
||||||
Integer wt = sortWeights.get(getName());
|
Integer wt = sortWeights.get(getName());
|
||||||
if (wt != null)
|
if (wt != null)
|
||||||
|
@ -80,6 +80,8 @@ components:
|
|||||||
# hideifundercover: 14
|
# hideifundercover: 14
|
||||||
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
# # (Optional) if true, players that are crouching/sneaking will be hidden
|
||||||
hideifsneaking: false
|
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)
|
# 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
|
protected-player-info: false
|
||||||
# If true, hide players with invisibility potion effects active
|
# If true, hide players with invisibility potion effects active
|
||||||
|
Loading…
Reference in New Issue
Block a user