mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-12 03:13:40 +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();
|
private ChestProtection chestProtection = new SignChestProtection();
|
||||||
|
|
||||||
/* Configuration data start */
|
/* Configuration data start */
|
||||||
|
public boolean summaryOnStart;
|
||||||
public boolean opPermissions;
|
public boolean opPermissions;
|
||||||
public boolean fireSpreadDisableToggle;
|
public boolean fireSpreadDisableToggle;
|
||||||
public boolean itemDurability;
|
public boolean itemDurability;
|
||||||
@ -189,8 +190,10 @@ public WorldConfiguration(WorldGuardPlugin plugin, String worldName, YAMLProcess
|
|||||||
config = new YAMLProcessor(configFile, true, YAMLFormat.EXTENDED);
|
config = new YAMLProcessor(configFile, true, YAMLFormat.EXTENDED);
|
||||||
loadConfiguration();
|
loadConfiguration();
|
||||||
|
|
||||||
|
if (summaryOnStart) {
|
||||||
plugin.getLogger().info("Loaded configuration for world '" + worldName + "'");
|
plugin.getLogger().info("Loaded configuration for world '" + worldName + "'");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean getBoolean(String node, boolean def) {
|
private boolean getBoolean(String node, boolean def) {
|
||||||
boolean val = parentConfig.getBoolean(node, def);
|
boolean val = parentConfig.getBoolean(node, def);
|
||||||
@ -295,6 +298,7 @@ private void loadConfiguration() {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
summaryOnStart = getBoolean("summary-on-start", true);
|
||||||
opPermissions = getBoolean("op-permissions", true);
|
opPermissions = getBoolean("op-permissions", true);
|
||||||
|
|
||||||
itemDurability = getBoolean("protection.item-durability", true);
|
itemDurability = getBoolean("protection.item-durability", true);
|
||||||
@ -464,7 +468,9 @@ private void loadConfiguration() {
|
|||||||
this.blacklist = null;
|
this.blacklist = null;
|
||||||
} else {
|
} else {
|
||||||
this.blacklist = blist;
|
this.blacklist = blist;
|
||||||
|
if (summaryOnStart) {
|
||||||
plugin.getLogger().log(Level.INFO, "Blacklist loaded.");
|
plugin.getLogger().log(Level.INFO, "Blacklist loaded.");
|
||||||
|
}
|
||||||
|
|
||||||
BlacklistLogger blacklistLogger = blist.getLogger();
|
BlacklistLogger blacklistLogger = blist.getLogger();
|
||||||
|
|
||||||
@ -490,7 +496,7 @@ private void loadConfiguration() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Print an overview of settings
|
// Print an overview of settings
|
||||||
if (getBoolean("summary-on-start", true)) {
|
if (summaryOnStart) {
|
||||||
plugin.getLogger().log(Level.INFO, blockTNTExplosions
|
plugin.getLogger().log(Level.INFO, blockTNTExplosions
|
||||||
? "(" + worldName + ") TNT ignition is blocked."
|
? "(" + worldName + ") TNT ignition is blocked."
|
||||||
: "(" + worldName + ") TNT ignition is PERMITTED.");
|
: "(" + worldName + ") TNT ignition is PERMITTED.");
|
||||||
|
@ -34,9 +34,6 @@
|
|||||||
import java.util.jar.JarFile;
|
import java.util.jar.JarFile;
|
||||||
import java.util.zip.ZipEntry;
|
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.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -50,6 +47,15 @@
|
|||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
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.worldedit.bukkit.WorldEditPlugin;
|
||||||
import com.sk89q.worldguard.LocalPlayer;
|
import com.sk89q.worldguard.LocalPlayer;
|
||||||
import com.sk89q.worldguard.bukkit.commands.GeneralCommands;
|
import com.sk89q.worldguard.bukkit.commands.GeneralCommands;
|
||||||
|
@ -36,12 +36,11 @@
|
|||||||
import com.sk89q.worldguard.bukkit.ConfigurationManager;
|
import com.sk89q.worldguard.bukkit.ConfigurationManager;
|
||||||
import com.sk89q.worldguard.bukkit.WorldConfiguration;
|
import com.sk89q.worldguard.bukkit.WorldConfiguration;
|
||||||
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
|
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.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.flags.StateFlag;
|
||||||
import com.sk89q.worldguard.protection.managers.FlatRegionManager;
|
|
||||||
import com.sk89q.worldguard.protection.managers.PRTreeRegionManager;
|
import com.sk89q.worldguard.protection.managers.PRTreeRegionManager;
|
||||||
import com.sk89q.worldguard.protection.managers.RegionManager;
|
import com.sk89q.worldguard.protection.managers.RegionManager;
|
||||||
|
|
||||||
@ -160,8 +159,10 @@ public RegionManager create(World world) {
|
|||||||
RegionManager manager = new PRTreeRegionManager(database);
|
RegionManager manager = new PRTreeRegionManager(database);
|
||||||
manager.load();
|
manager.load();
|
||||||
|
|
||||||
|
if (plugin.getGlobalStateManager().get(world).summaryOnStart) {
|
||||||
plugin.getLogger().info(manager.getRegions().size()
|
plugin.getLogger().info(manager.getRegions().size()
|
||||||
+ " regions loaded for '" + name + "'");
|
+ " regions loaded for '" + name + "'");
|
||||||
|
}
|
||||||
|
|
||||||
return manager;
|
return manager;
|
||||||
} catch (ProtectionDatabaseException e) {
|
} catch (ProtectionDatabaseException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user