9
0
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:
XiaoMoMi
2025-06-02 17:50:14 +08:00
parent 2fd2323412
commit 31e1dee87d
2 changed files with 5 additions and 5 deletions

View File

@@ -46,15 +46,15 @@ public class PaperCraftEngineBootstrap implements PluginBootstrap {
); );
this.plugin.applyDependencies(); this.plugin.applyDependencies();
this.plugin.setUpConfig(); this.plugin.setUpConfig();
// if (VersionHelper.isOrAbove1_21_4()) { if (VersionHelper.isOrAbove1_21_4()) {
// new ModernEventHandler(context, this.plugin).register(); new ModernEventHandler(context, this.plugin).register();
// } else { } else {
try { try {
RuntimePatcher.patch(this.plugin); RuntimePatcher.patch(this.plugin);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException("Failed to patch server", e); throw new RuntimeException("Failed to patch server", e);
} }
// } }
} }
@Override @Override

View File

@@ -8,7 +8,7 @@ import java.lang.instrument.Instrumentation;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Method; import java.lang.reflect.Method;
public class BlocksAgent { public final class BlocksAgent {
public static void agentmain(String args, Instrumentation instrumentation) { public static void agentmain(String args, Instrumentation instrumentation) {
new AgentBuilder.Default() new AgentBuilder.Default()