mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-11 19:02:13 +01:00
Setting summary-on-start to false reduces much more clutter now
This commit is contained in:
parent
09a9bea3a7
commit
6e270d5ec3
@ -75,6 +75,7 @@ public class WorldConfiguration {
|
||||
private ChestProtection chestProtection = new SignChestProtection();
|
||||
|
||||
/* Configuration data start */
|
||||
public boolean summaryOnStart;
|
||||
public boolean opPermissions;
|
||||
public boolean fireSpreadDisableToggle;
|
||||
public boolean itemDurability;
|
||||
@ -189,7 +190,9 @@ public WorldConfiguration(WorldGuardPlugin plugin, String worldName, YAMLProcess
|
||||
config = new YAMLProcessor(configFile, true, YAMLFormat.EXTENDED);
|
||||
loadConfiguration();
|
||||
|
||||
plugin.getLogger().info("Loaded configuration for world '" + worldName + "'");
|
||||
if (summaryOnStart) {
|
||||
plugin.getLogger().info("Loaded configuration for world '" + worldName + "'");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean getBoolean(String node, boolean def) {
|
||||
@ -295,6 +298,7 @@ private void loadConfiguration() {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
summaryOnStart = getBoolean("summary-on-start", true);
|
||||
opPermissions = getBoolean("op-permissions", true);
|
||||
|
||||
itemDurability = getBoolean("protection.item-durability", true);
|
||||
@ -464,7 +468,9 @@ private void loadConfiguration() {
|
||||
this.blacklist = null;
|
||||
} else {
|
||||
this.blacklist = blist;
|
||||
plugin.getLogger().log(Level.INFO, "Blacklist loaded.");
|
||||
if (summaryOnStart) {
|
||||
plugin.getLogger().log(Level.INFO, "Blacklist loaded.");
|
||||
}
|
||||
|
||||
BlacklistLogger blacklistLogger = blist.getLogger();
|
||||
|
||||
@ -490,7 +496,7 @@ private void loadConfiguration() {
|
||||
}
|
||||
|
||||
// Print an overview of settings
|
||||
if (getBoolean("summary-on-start", true)) {
|
||||
if (summaryOnStart) {
|
||||
plugin.getLogger().log(Level.INFO, blockTNTExplosions
|
||||
? "(" + worldName + ") TNT ignition is blocked."
|
||||
: "(" + worldName + ") TNT ignition is PERMITTED.");
|
||||
|
@ -34,9 +34,6 @@
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
||||
import com.sk89q.bukkit.util.CommandsManagerRegistration;
|
||||
import com.sk89q.minecraft.util.commands.*;
|
||||
import com.sk89q.wepif.PermissionsResolverManager;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
@ -50,6 +47,15 @@
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
import com.sk89q.bukkit.util.CommandsManagerRegistration;
|
||||
import com.sk89q.minecraft.util.commands.CommandException;
|
||||
import com.sk89q.minecraft.util.commands.CommandPermissionsException;
|
||||
import com.sk89q.minecraft.util.commands.CommandUsageException;
|
||||
import com.sk89q.minecraft.util.commands.CommandsManager;
|
||||
import com.sk89q.minecraft.util.commands.MissingNestedCommandException;
|
||||
import com.sk89q.minecraft.util.commands.SimpleInjector;
|
||||
import com.sk89q.minecraft.util.commands.WrappedCommandException;
|
||||
import com.sk89q.wepif.PermissionsResolverManager;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldguard.LocalPlayer;
|
||||
import com.sk89q.worldguard.bukkit.commands.GeneralCommands;
|
||||
@ -138,12 +144,12 @@ public void run() {
|
||||
LegacyWorldGuardMigration.migrateBlacklist(this);
|
||||
|
||||
try {
|
||||
// Load the configuration
|
||||
configuration.load();
|
||||
globalRegionManager.preload();
|
||||
// Load the configuration
|
||||
configuration.load();
|
||||
globalRegionManager.preload();
|
||||
} catch (FatalConfigurationLoadingException e) {
|
||||
e.printStackTrace();
|
||||
getServer().shutdown();
|
||||
e.printStackTrace();
|
||||
getServer().shutdown();
|
||||
}
|
||||
|
||||
// Migrate regions after the regions were loaded because
|
||||
|
@ -36,12 +36,11 @@
|
||||
import com.sk89q.worldguard.bukkit.ConfigurationManager;
|
||||
import com.sk89q.worldguard.bukkit.WorldConfiguration;
|
||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
||||
import com.sk89q.worldguard.protection.databases.ProtectionDatabaseException;
|
||||
import com.sk89q.worldguard.protection.databases.ProtectionDatabase;
|
||||
import com.sk89q.worldguard.protection.databases.YAMLDatabase;
|
||||
import com.sk89q.worldguard.protection.databases.MySQLDatabase;
|
||||
import com.sk89q.worldguard.protection.databases.ProtectionDatabase;
|
||||
import com.sk89q.worldguard.protection.databases.ProtectionDatabaseException;
|
||||
import com.sk89q.worldguard.protection.databases.YAMLDatabase;
|
||||
import com.sk89q.worldguard.protection.flags.StateFlag;
|
||||
import com.sk89q.worldguard.protection.managers.FlatRegionManager;
|
||||
import com.sk89q.worldguard.protection.managers.PRTreeRegionManager;
|
||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
||||
|
||||
@ -160,8 +159,10 @@ public RegionManager create(World world) {
|
||||
RegionManager manager = new PRTreeRegionManager(database);
|
||||
manager.load();
|
||||
|
||||
plugin.getLogger().info(manager.getRegions().size()
|
||||
+ " regions loaded for '" + name + "'");
|
||||
if (plugin.getGlobalStateManager().get(world).summaryOnStart) {
|
||||
plugin.getLogger().info(manager.getRegions().size()
|
||||
+ " regions loaded for '" + name + "'");
|
||||
}
|
||||
|
||||
return manager;
|
||||
} catch (ProtectionDatabaseException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user