Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-26 11:00:04 +01:00
Add logging messages for CPU checking.
Dieser Commit ist enthalten in:
Ursprung
6e1cb4cfbc
Commit
dbd3cfbef6
@ -36,8 +36,8 @@ public class AsyncNotifyQueue implements Closeable {
|
|||||||
Future[] self = new Future[1];
|
Future[] self = new Future[1];
|
||||||
Callable<T> wrapped = () -> {
|
Callable<T> wrapped = () -> {
|
||||||
if (!closed) {
|
if (!closed) {
|
||||||
try {
|
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
try {
|
||||||
if (!closed) {
|
if (!closed) {
|
||||||
try {
|
try {
|
||||||
return task.call();
|
return task.call();
|
||||||
|
@ -8,6 +8,7 @@ import com.boydti.fawe.regions.FaweMask;
|
|||||||
import com.boydti.fawe.regions.FaweMaskManager;
|
import com.boydti.fawe.regions.FaweMaskManager;
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
|
import com.sk89q.worldedit.extension.platform.PlatformCommandManager;
|
||||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||||
import com.sk89q.worldedit.extent.Extent;
|
import com.sk89q.worldedit.extent.Extent;
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
@ -19,14 +20,19 @@ import java.util.ArrayDeque;
|
|||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class WEManager {
|
public class WEManager {
|
||||||
|
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(WEManager.class);
|
||||||
|
|
||||||
public final static WEManager IMP = new WEManager();
|
public final static WEManager IMP = new WEManager();
|
||||||
|
|
||||||
public final ArrayDeque<FaweMaskManager> managers = new ArrayDeque<>();
|
public final ArrayDeque<FaweMaskManager> managers = new ArrayDeque<>();
|
||||||
|
|
||||||
public void cancelEditSafe(AbstractDelegateExtent parent, FaweException reason) throws FaweException {
|
public void cancelEditSafe(AbstractDelegateExtent parent, FaweException reason) throws FaweException {
|
||||||
|
log.warn("CancelEditSafe was hit. Please ignore this message.");
|
||||||
try {
|
try {
|
||||||
final Field field = AbstractDelegateExtent.class.getDeclaredField("extent");
|
final Field field = AbstractDelegateExtent.class.getDeclaredField("extent");
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
@ -121,7 +127,9 @@ public class WEManager {
|
|||||||
player.printError(TextComponent.of("Missing permission " + "fawe." + manager.getKey()));
|
player.printError(TextComponent.of("Missing permission " + "fawe." + manager.getKey()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
log.warn("There are " + backupRegions.size() + " backupRegions being added to Regions. Regions has " + regions.size() + " before backupRegions are added");
|
||||||
regions.addAll(backupRegions);
|
regions.addAll(backupRegions);
|
||||||
|
log.warn("Finished adding regions.");
|
||||||
if (!masks.isEmpty()) {
|
if (!masks.isEmpty()) {
|
||||||
player.setMeta("lastMask", masks);
|
player.setMeta("lastMask", masks);
|
||||||
} else {
|
} else {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren