This commit is contained in:
Jesse Boyd 2017-08-20 22:09:38 +10:00
parent 3b77a09e27
commit 65442c886a
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 11 additions and 5 deletions

View File

@ -212,8 +212,9 @@ public class FaweBukkit implements IFawe, Listener {
Class<? extends Object> clazz = instance.getClass();
Field logFailedRequests = ReflectionUtils.setAccessible(clazz.getDeclaredField("logFailedRequests"));
logFailedRequests.set(null, false);
Field URL = clazz.getDeclaredField("URL");
ReflectionUtils.setFailsafeFieldValue(URL, null, null);
Field url = null;
try { url = clazz.getDeclaredField("URL"); } catch (NoSuchFieldException ignore) { url = clazz.getDeclaredField("bStatsUrl"); }
if (url != null) ReflectionUtils.setFailsafeFieldValue(url, null, null);
} catch (NoSuchFieldError | IllegalAccessException ignore) {}
catch (Throwable e) {
Fawe.debug("Error linking metrics: " + instance);

View File

@ -4,7 +4,6 @@ import com.boydti.fawe.object.collection.IterableThreadLocal;
import com.sk89q.worldedit.blocks.BaseBlock;
import java.nio.file.Path;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.concurrent.AbstractExecutorService;
import java.util.concurrent.ForkJoinPool;
/**
@ -17,6 +16,12 @@ public class MCAFilter<T> extends IterableThreadLocal<T> {
return;
}
/**
* Check whether this .mca file should be read
* @param path
* @param attr
* @return
*/
public boolean appliesFile(Path path, BasicFileAttributes attr) {
return true;
}
@ -91,9 +96,9 @@ public class MCAFilter<T> extends IterableThreadLocal<T> {
}
/**
* Do something with the MCAChunk after block filtering<br>
* Do something with the MCAFile after block filtering<br>
*
* @param chunk
* @param file
* @param cache
* @return
*/