mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-19 15:09:15 +00:00
使用modern方案
This commit is contained in:
@@ -46,15 +46,15 @@ public class PaperCraftEngineBootstrap implements PluginBootstrap {
|
||||
);
|
||||
this.plugin.applyDependencies();
|
||||
this.plugin.setUpConfig();
|
||||
// if (VersionHelper.isOrAbove1_21_4()) {
|
||||
// new ModernEventHandler(context, this.plugin).register();
|
||||
// } else {
|
||||
if (VersionHelper.isOrAbove1_21_4()) {
|
||||
new ModernEventHandler(context, this.plugin).register();
|
||||
} else {
|
||||
try {
|
||||
RuntimePatcher.patch(this.plugin);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Failed to patch server", e);
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.lang.instrument.Instrumentation;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class BlocksAgent {
|
||||
public final class BlocksAgent {
|
||||
|
||||
public static void agentmain(String args, Instrumentation instrumentation) {
|
||||
new AgentBuilder.Default()
|
||||
|
||||
Reference in New Issue
Block a user