mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Merge branch 'master' into breaking
This commit is contained in:
@ -25,6 +25,8 @@ import com.sk89q.util.StringUtil;
|
||||
import com.sk89q.worldedit.LocalConfiguration;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.util.report.Unreported;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.sk89q.worldedit.world.item.ItemTypes;
|
||||
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
import com.sk89q.worldedit.world.snapshot.SnapshotRepository;
|
||||
import org.slf4j.Logger;
|
||||
@ -78,6 +80,8 @@ public class PropertiesConfiguration extends LocalConfiguration {
|
||||
profile = getBool("profile", profile);
|
||||
traceUnflushedSessions = getBool("trace-unflushed-sessions", traceUnflushedSessions);
|
||||
disallowedBlocks = getStringSet("disallowed-blocks", getDefaultDisallowedBlocks());
|
||||
allowedDataCycleBlocks =
|
||||
new HashSet<>(getStringSet("limits.allowed-data-cycle-blocks", null));
|
||||
defaultChangeLimit = getInt("default-max-changed-blocks", defaultChangeLimit);
|
||||
maxChangeLimit = getInt("max-changed-blocks", maxChangeLimit);
|
||||
defaultMaxPolygonalPoints = getInt("default-max-polygon-points", defaultMaxPolygonalPoints);
|
||||
|
@ -0,0 +1,60 @@
|
||||
/*
|
||||
* WorldEdit, a Minecraft world manipulation toolkit
|
||||
* Copyright (C) sk89q <http://www.sk89q.com>
|
||||
* Copyright (C) WorldEdit team and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU Lesser 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 Lesser General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sk89q.worldedit.util.logging;
|
||||
|
||||
import java.util.logging.Handler;
|
||||
import java.util.logging.LogRecord;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* Adds a WorldEdit prefix to WorldEdit's logger messages using a handler.
|
||||
*/
|
||||
public final class WorldEditPrefixHandler extends Handler {
|
||||
|
||||
private WorldEditPrefixHandler() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void publish(LogRecord record) {
|
||||
String message = record.getMessage();
|
||||
if (!message.startsWith("WorldEdit: ") && !message.startsWith("[WorldEdit] ")) {
|
||||
record.setMessage("[WorldEdit] " + message);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws SecurityException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the handler to the following logger name.
|
||||
*
|
||||
* @param name the logger name
|
||||
*/
|
||||
public static void register(String name) {
|
||||
//todo fix this
|
||||
//Logger.getLogger(name).addHandler(new WorldEditPrefixHandler());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user