/** * Retrieves a World Configuration given the World. if the World Configuration is not loaded, it * will be loaded from the plugins/GriefPreventionData/WorldConfigs folder. If a file is not * present for the world, the template file will be used. The template file is configured in * config.yml, and defaults to _template.cfg in the given folder. if no template is found, a * default, empty configuration is created and returned. * * @param world World to retrieve configuration for. * @return WorldConfig representing the configuration of the given world. * @see getWorldCfg */ public WorldConfig getWorldCfg(World world) { return Configuration.getWorldConfig(world); }
/** * Retrieves a World Configuration given the World Name. If the World Configuration is not loaded, * it will be loaded from the plugins/GriefPreventionData/WorldConfigs folder. If a file is not * present, the template will be used and a new file will be created for the given name. * * @param worldname Name of world to get configuration for. * @return WorldConfig representing the configuration of the given world. */ public WorldConfig getWorldCfg(String worldname) { return Configuration.getWorldConfig(worldname); }
// determines whether creative anti-grief rules apply at a location public boolean creativeRulesApply(Location location) { // return this.config_claims_enabledCreativeWorlds.contains(location.getWorld().getName()); return Configuration.getWorldConfig(location.getWorld()).getCreativeRules(); }