Update templates, address JEP deprecations and place a few TODOs

This commit is contained in:
NotMyFault
2021-11-30 21:30:46 +01:00
parent d3aaf7acff
commit 1f975ac044
12 changed files with 89 additions and 87 deletions

View File

@ -193,8 +193,10 @@ public final class PaperweightAdapter implements BukkitImplAdapter {
serverWorldsField = CraftServer.class.getDeclaredField("worlds");
serverWorldsField.setAccessible(true);
getChunkFutureMethod = ServerChunkCache.class.getDeclaredMethod("getChunkFutureMainThread",
int.class, int.class, ChunkStatus.class, boolean.class);
getChunkFutureMethod = ServerChunkCache.class.getDeclaredMethod(
Refraction.pickName("getChunkFutureMainThread", "c"),
int.class, int.class, ChunkStatus.class, boolean.class
);
getChunkFutureMethod.setAccessible(true);
chunkProviderExecutorField = ServerChunkCache.class.getDeclaredField(

View File

@ -220,8 +220,6 @@ public class WorldEditPlugin extends JavaPlugin {
// Enable metrics
new Metrics(this, BSTATS_ID);
// Check whether the server runs on 11 or greater
ServerLib.checkJavaLTS();
// Check if we are in a safe environment
ServerLib.checkUnsafeForks();
// Check if a new build is available