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.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
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user