mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-08 11:59:43 +01:00
Removed suppress-tick-sync-warnings setting
This setting often didn't work for people, and has been replaced in CraftBukkit's bukkit.yml with settings.warn-on-overload
This commit is contained in:
parent
18814c7373
commit
a27deb3936
@ -1,35 +0,0 @@
|
||||
// $Id$
|
||||
/*
|
||||
* WorldGuard
|
||||
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sk89q.worldguard;
|
||||
|
||||
import java.util.logging.Filter;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogRecord;
|
||||
|
||||
public class TickSyncDelayLoggerFilter implements Filter {
|
||||
public boolean isLoggable(LogRecord record) {
|
||||
if (record.getLevel() == Level.WARNING
|
||||
&& record.getMessage().equals("Can't keep up! Did the system time change, or is the server overloaded?")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -93,7 +93,6 @@ public class ConfigurationManager {
|
||||
|
||||
private boolean hasCommandBookGodMode = false;
|
||||
|
||||
public boolean suppressTickSyncWarnings;
|
||||
public boolean useRegionsScheduler;
|
||||
public boolean activityHaltToggle = false;
|
||||
public boolean autoGodMode;
|
||||
@ -132,9 +131,8 @@ public void load() {
|
||||
plugin.getLogger().severe("Error reading configuration for global config: ");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
suppressTickSyncWarnings = config.getBoolean(
|
||||
"suppress-tick-sync-warnings", false);
|
||||
|
||||
config.removeProperty("suppress-tick-sync-warnings");
|
||||
useRegionsScheduler = config.getBoolean(
|
||||
"regions.use-scheduler", true);
|
||||
autoGodMode = config.getBoolean(
|
||||
|
@ -49,7 +49,6 @@
|
||||
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
import com.sk89q.worldguard.LocalPlayer;
|
||||
import com.sk89q.worldguard.TickSyncDelayLoggerFilter;
|
||||
import com.sk89q.worldguard.bukkit.commands.GeneralCommands;
|
||||
import com.sk89q.worldguard.bukkit.commands.ProtectionCommands;
|
||||
import com.sk89q.worldguard.bukkit.commands.ToggleCommands;
|
||||
@ -147,16 +146,6 @@ public void run() {
|
||||
getServer().getScheduler().scheduleAsyncRepeatingTask(this, flagStateManager, FlagStateManager.RUN_DELAY, FlagStateManager.RUN_DELAY);
|
||||
}
|
||||
|
||||
if (configuration.suppressTickSyncWarnings) {
|
||||
Logger.getLogger("Minecraft").setFilter(
|
||||
new TickSyncDelayLoggerFilter());
|
||||
} else {
|
||||
Filter filter = Logger.getLogger("Minecraft").getFilter();
|
||||
if (filter != null && filter instanceof TickSyncDelayLoggerFilter) {
|
||||
Logger.getLogger("Minecraft").setFilter(null);
|
||||
}
|
||||
}
|
||||
|
||||
// Register events
|
||||
(new WorldGuardPlayerListener(this)).registerEvents();
|
||||
(new WorldGuardBlockListener(this)).registerEvents();
|
||||
|
Loading…
Reference in New Issue
Block a user