use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class ForceFieldExpansion method reloadConfig.
@Override
public void reloadConfig() {
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.reload("config.yml");
ListenerForceField listenerForceField = getListenerForceField();
listenerForceField.unregister();
listenerForceField.removeProtocol();
listenerForceField.clearData();
registerForceFieldListener();
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class ForceFieldExpansion method onLoad.
@Override
public void onLoad() {
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.saveDefault("config.yml");
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class TownyRegionHandler method isSafeZone.
@Override
public boolean isSafeZone(Player player, Location location, TagType tagType) {
if (tagType != TagType.PLAYER) {
return false;
}
RegionExpansion expansion = getExpansion();
ConfigurationManager configurationManager = expansion.getConfigurationManager();
YamlConfiguration configuration = configurationManager.get("config.yml");
TownBlock townBlock = getTownBlock(location);
if (townBlock == null) {
return false;
}
if (configuration.getBoolean("prevent-all-town-entries", false)) {
if (isOwnTown(townBlock, player)) {
return true;
}
}
TownyWorld townyWorld = townBlock.getWorld();
if (townyWorld == null || townyWorld.isForcePVP()) {
return false;
}
Town town;
try {
town = townBlock.getTown();
if (town == null || town.isPVP() || town.isAdminEnabledPVP() || town.hasActiveWar()) {
return false;
}
} catch (NotRegisteredException ex) {
return false;
}
PluginManager pluginManager = Bukkit.getPluginManager();
if (pluginManager.isPluginEnabled("FlagWar")) {
if (FlagWarAPI.isUnderAttack(town)) {
return false;
}
}
TownyPermission townBlockPermissions = townBlock.getPermissions();
return !townBlockPermissions.pvp;
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class LoggerExpansion method reloadConfig.
@Override
public void reloadConfig() {
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.reload("config.yml");
}
use of com.github.sirblobman.api.configuration.ConfigurationManager in project CombatLogX by SirBlobman.
the class LoggerExpansion method onLoad.
@Override
public void onLoad() {
ConfigurationManager configurationManager = getConfigurationManager();
configurationManager.saveDefault("config.yml");
}
Aggregations