Some changes in handlers, fix runnables, remove unused imports

This commit is contained in:
creeper123123321 2018-08-18 14:21:05 -03:00
parent 469db0ffda
commit 735d6a4eb5
6 changed files with 2 additions and 9 deletions

View File

@ -3,10 +3,7 @@ package com.github.creeper123123321.viarift.handler;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.MessageToByteEncoder;
import io.netty.handler.codec.MessageToMessageDecoder;
import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.data.UserConnection;
import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.exception.CancelException; import us.myles.ViaVersion.exception.CancelException;

View File

@ -4,7 +4,6 @@ import com.github.creeper123123321.viarift.handler.VRInHandler;
import com.github.creeper123123321.viarift.handler.VROutHandler; import com.github.creeper123123321.viarift.handler.VROutHandler;
import com.github.creeper123123321.viarift.platform.VRUserConnection; import com.github.creeper123123321.viarift.platform.VRUserConnection;
import io.netty.channel.Channel; import io.netty.channel.Channel;
import io.netty.channel.ChannelHandler;
import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.ByteToMessageDecoder; import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.MessageToByteEncoder; import io.netty.handler.codec.MessageToByteEncoder;

View File

@ -1,6 +1,5 @@
package com.github.creeper123123321.viarift.provider; package com.github.creeper123123321.viarift.provider;
import com.github.creeper123123321.viarift.util.PipelineUtil;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import us.myles.ViaVersion.api.PacketWrapper; import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.data.UserConnection;

View File

@ -14,6 +14,7 @@ public class DelayedRunnable implements Runnable {
try { try {
Thread.sleep(delay); Thread.sleep(delay);
} catch (InterruptedException ignored) { } catch (InterruptedException ignored) {
return;
} }
runnable.run(); runnable.run();
} }

View File

@ -16,6 +16,7 @@ public class LoopRunnable implements Runnable {
try { try {
Thread.sleep(interval); Thread.sleep(interval);
} catch (InterruptedException ignored) { } catch (InterruptedException ignored) {
return;
} }
} }
} }

View File

@ -13,8 +13,4 @@ public class PipelineUtil {
} }
return pipe.context(previous); return pipe.context(previous);
} }
public static ChannelHandlerContext getContextAfter(String name, ChannelPipeline pipe) {
return us.myles.ViaVersion.util.PipelineUtil.getContextBefore(name, pipe);
}
} }