Compare commits
No commits in common. "017d5f88f0584932e993f5b32e69924c95bb0917" and "b8af07aa4ec6a33e324aad6e855b09e309b65b2d" have entirely different histories.
017d5f88f0
...
b8af07aa4e
3 changed files with 3 additions and 11 deletions
0
gradlew
vendored
Executable file → Normal file
0
gradlew
vendored
Executable file → Normal file
|
@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
import vg.skye.e4mc_minecraft.E4mcClient;
|
import vg.skye.e4mc_minecraft.E4mcClient;
|
||||||
|
@ -46,9 +45,9 @@ public abstract class ServerNetworkIoMixin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ModifyArg(method = "bind", at = @At(value = "INVOKE", target = "Lio/netty/bootstrap/ServerBootstrap;channel(Ljava/lang/Class;)Lio/netty/bootstrap/AbstractBootstrap;", remap = false))
|
@Redirect(method = "bind", at = @At(value = "INVOKE", target = "Lio/netty/bootstrap/ServerBootstrap;channel(Ljava/lang/Class;)Lio/netty/bootstrap/AbstractBootstrap;", remap = false))
|
||||||
private Class<? extends ServerChannel> redirectChannel(Class<? extends ServerChannel> aClass) {
|
private AbstractBootstrap<ServerBootstrap, ServerChannel> redirectChannel(ServerBootstrap instance, Class<? extends ServerSocketChannel> aClass) {
|
||||||
return initializingE4mc.get() ? LocalServerChannel.class : aClass;
|
return initializingE4mc.get() ? instance.channel(LocalServerChannel.class) : instance.channel(aClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(method = "bind", at = @At(value = "INVOKE", target = "Lio/netty/bootstrap/ServerBootstrap;localAddress(Ljava/net/InetAddress;I)Lio/netty/bootstrap/AbstractBootstrap;", remap = false))
|
@Redirect(method = "bind", at = @At(value = "INVOKE", target = "Lio/netty/bootstrap/ServerBootstrap;localAddress(Ljava/net/InetAddress;I)Lio/netty/bootstrap/AbstractBootstrap;", remap = false))
|
||||||
|
|
|
@ -49,13 +49,6 @@ object E4mcClient : ModInitializer {
|
||||||
dispatcher.register(literal("e4mc")
|
dispatcher.register(literal("e4mc")
|
||||||
.then(
|
.then(
|
||||||
literal("stop")
|
literal("stop")
|
||||||
.requires { src ->
|
|
||||||
if (src.server.isDedicated) {
|
|
||||||
src.hasPermissionLevel(4)
|
|
||||||
} else {
|
|
||||||
src.server.isHost((src.player ?: return@requires false).gameProfile)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.executes { context ->
|
.executes { context ->
|
||||||
if (HANDLER != null) {
|
if (HANDLER != null) {
|
||||||
HANDLER!!.close()
|
HANDLER!!.close()
|
||||||
|
|
Loading…
Reference in a new issue