Add test to see if player info protect - warn if visibility-by-faction is set
This commit is contained in:
		@@ -699,10 +699,13 @@ public class DynmapFactionsPlugin extends JavaPlugin {
 | 
				
			|||||||
        playersets = cfg.getBoolean("visibility-by-faction", false);
 | 
					        playersets = cfg.getBoolean("visibility-by-faction", false);
 | 
				
			||||||
        if(playersets) {
 | 
					        if(playersets) {
 | 
				
			||||||
            try {
 | 
					            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) {
 | 
					            } catch (Exception x) {
 | 
				
			||||||
                playersets = false;
 | 
					                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();
 | 
					        updatePlayerSets();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user