Sign off @ 2018-5-16
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package io.akarin.server.mixin.core;
|
||||
|
||||
import org.bukkit.craftbukkit.Main;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(value = Main.class, remap = false)
|
||||
public class Bootstrap {
|
||||
@Inject(method = "main([Ljava/lang/String;)V", at = @At("HEAD"))
|
||||
private static void configureMixin(CallbackInfo info) {
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package io.akarin.server.mixin.core;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import net.minecraft.server.EULA;
|
||||
|
||||
@Mixin(value = EULA.class, remap = false)
|
||||
public class DummyEula {
|
||||
/**
|
||||
* Read then check the EULA file <i>formerly</i>
|
||||
* @param file
|
||||
* @return true
|
||||
*/
|
||||
@Overwrite
|
||||
public boolean a(File file) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the EULA has been accepted <i>formerly</i>
|
||||
* @return true
|
||||
*/
|
||||
@Overwrite
|
||||
public boolean a() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate an EULA file <i>formerly</i>
|
||||
*/
|
||||
@Overwrite
|
||||
public void b() {}
|
||||
}
|
||||
11
sources/server/src/main/resources/mixins.akarin.core.json
Normal file
11
sources/server/src/main/resources/mixins.akarin.core.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"required": true,
|
||||
"minVersion": "0",
|
||||
"package": "io.akarin.server.mixin.core",
|
||||
"target": "@env(DEFAULT)",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"server": [
|
||||
"Bootstrap",
|
||||
"DummyEula"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user