mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-23 09:37:51 +01:00
Add deprecation warnings.
Also remove the nodes from config if unused.
This commit is contained in:
parent
de386fb4d8
commit
f883899cfe
@ -178,6 +178,11 @@ public void loadConfiguration() {
|
||||
simulateSponge = getBoolean("simulation.sponge.enable", false);
|
||||
spongeRadius = Math.max(1, getInt("simulation.sponge.radius", 3)) - 1;
|
||||
redstoneSponges = getBoolean("simulation.sponge.redstone", false);
|
||||
if (simulateSponge) {
|
||||
log.warning("Sponge simulation is deprecated for removal in a future version. We recommend using CraftBook's sponge simulation instead.");
|
||||
} else {
|
||||
config.removeProperty("simulation.sponge");
|
||||
}
|
||||
|
||||
pumpkinScuba = getBoolean("default.pumpkin-scuba", false);
|
||||
disableHealthRegain = getBoolean("default.disable-health-regain", false);
|
||||
@ -237,6 +242,11 @@ public void loadConfiguration() {
|
||||
|
||||
signChestProtection = getBoolean("chest-protection.enable", false);
|
||||
disableSignChestProtectionCheck = getBoolean("chest-protection.disable-off-check", false);
|
||||
if (signChestProtection) {
|
||||
log.warning("Sign-based chest protection is deprecated for removal in a future version. See https://worldguard.enginehub.org/en/latest/chest-protection/ for details.");
|
||||
} else {
|
||||
config.removeProperty("chest-protection");
|
||||
}
|
||||
|
||||
disableCreatureCropTrampling = getBoolean("crops.disable-creature-trampling", false);
|
||||
disablePlayerCropTrampling = getBoolean("crops.disable-player-trampling", false);
|
||||
|
@ -93,6 +93,12 @@ public void load() {
|
||||
String sqlUsername = config.getString("regions.sql.username", "worldguard");
|
||||
String sqlPassword = config.getString("regions.sql.password", "worldguard");
|
||||
String sqlTablePrefix = config.getString("regions.sql.table-prefix", "");
|
||||
if (!useSqlDatabase) {
|
||||
config.removeProperty("regions.sql");
|
||||
} else {
|
||||
log.warning("SQL support for WorldGuard region storage is deprecated for removal in a future version. Please migrate to YAML storage.");
|
||||
log.warning("For details, see https://worldguard.enginehub.org/en/latest/regions/storage/");
|
||||
}
|
||||
|
||||
DataSourceConfig dataSourceConfig = new DataSourceConfig(sqlDsn, sqlUsername, sqlPassword, sqlTablePrefix);
|
||||
SQLDriver sqlDriver = new SQLDriver(dataSourceConfig);
|
||||
|
Loading…
Reference in New Issue
Block a user