From 36b112ef0c7c1b016246d34a3a05ac27dfd3a626 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Sun, 29 Jul 2012 11:07:43 -0500 Subject: [PATCH] Add test to see if player info protect - warn if visibility-by-faction is set --- .../java/org/dynmap/factions/DynmapFactionsPlugin.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java b/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java index ed8630f..4639c52 100644 --- a/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java +++ b/src/main/java/org/dynmap/factions/DynmapFactionsPlugin.java @@ -699,10 +699,13 @@ public class DynmapFactionsPlugin extends JavaPlugin { playersets = cfg.getBoolean("visibility-by-faction", false); if(playersets) { try { - markerapi.getPlayerSets(); /* Test if API available on dynmap */ + if(!api.testIfPlayerInfoProtected()) { + playersets = false; + info("Dynmap does not have player-info-protected enabled - visibility-by-faction will have no effect"); + } } catch (Exception x) { playersets = false; - log.info("Dynmap does not support function needed for 'visibilitybyfaction' - need to upgrade"); + info("Dynmap does not support function needed for 'visibilitybyfaction' - need to upgrade"); } } updatePlayerSets();