Removed debug logger and bumped version
This commit is contained in:
parent
28ebcd76fa
commit
f9ea48f93b
|
|
@ -40,7 +40,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19;
|
import static com.velocitypowered.api.network.ProtocolVersion.MINECRAFT_1_19;
|
||||||
import static com.velocitypowered.proxy.protocol.packet.brigadier.ArgumentIdentifier.mapSet;
|
import static com.velocitypowered.proxy.protocol.packet.brigadier.ArgumentIdentifier.mapSet;
|
||||||
|
|
||||||
@Plugin(id = "ambassador", name = "Ambassador", version = "1.4.2-beta-unofficial", authors = {"adde0109"})
|
@Plugin(id = "ambassador", name = "Ambassador", version = "1.4.3-beta", authors = {"adde0109"})
|
||||||
public class Ambassador {
|
public class Ambassador {
|
||||||
|
|
||||||
public ProxyServer server;
|
public ProxyServer server;
|
||||||
|
|
@ -110,7 +110,7 @@ public class Ambassador {
|
||||||
connectionManager.getServerChannelInitializer().set(new VelocityServerChannelInitializer(original, (VelocityServer) server));
|
connectionManager.getServerChannelInitializer().set(new VelocityServerChannelInitializer(original, (VelocityServer) server));
|
||||||
|
|
||||||
ChannelInitializer<Channel> originalBackend = connectionManager.getBackendChannelInitializer().get();
|
ChannelInitializer<Channel> originalBackend = connectionManager.getBackendChannelInitializer().get();
|
||||||
connectionManager.getBackendChannelInitializer().set(new VelocityBackendChannelInitializer(originalBackend, (VelocityServer) server, logger));
|
connectionManager.getBackendChannelInitializer().set(new VelocityBackendChannelInitializer(originalBackend, (VelocityServer) server));
|
||||||
|
|
||||||
Method argumentRegistry = ArgumentPropertyRegistry.class.getDeclaredMethod("register", ArgumentIdentifier.class, Class.class, ArgumentPropertySerializer.class);
|
Method argumentRegistry = ArgumentPropertyRegistry.class.getDeclaredMethod("register", ArgumentIdentifier.class, Class.class, ArgumentPropertySerializer.class);
|
||||||
argumentRegistry.setAccessible(true);
|
argumentRegistry.setAccessible(true);
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,11 @@ public class VelocityBackendChannelInitializer extends BackendChannelInitializer
|
||||||
private final ChannelInitializer<Channel> delegate;
|
private final ChannelInitializer<Channel> delegate;
|
||||||
private final VelocityServer server;
|
private final VelocityServer server;
|
||||||
|
|
||||||
private final Logger logger;
|
public VelocityBackendChannelInitializer(ChannelInitializer<Channel> delegate, VelocityServer server) {
|
||||||
|
|
||||||
public VelocityBackendChannelInitializer(ChannelInitializer<Channel> delegate, VelocityServer server, Logger logger) {
|
|
||||||
super(server);
|
super(server);
|
||||||
this.delegate = delegate;
|
this.delegate = delegate;
|
||||||
this.server = server;
|
this.server = server;
|
||||||
this.logger = logger;
|
|
||||||
try {
|
try {
|
||||||
logger.info("Respecting the previous registered BackendChannelInitializer: " + delegate.getClass().getName());
|
|
||||||
INIT_CHANNEL = delegate.getClass().getDeclaredMethod("initChannel", Channel.class);
|
INIT_CHANNEL = delegate.getClass().getDeclaredMethod("initChannel", Channel.class);
|
||||||
INIT_CHANNEL.setAccessible(true);
|
INIT_CHANNEL.setAccessible(true);
|
||||||
} catch (ReflectiveOperationException e) {
|
} catch (ReflectiveOperationException e) {
|
||||||
|
|
@ -38,7 +34,6 @@ public class VelocityBackendChannelInitializer extends BackendChannelInitializer
|
||||||
@Override
|
@Override
|
||||||
protected void initChannel(Channel ch) {
|
protected void initChannel(Channel ch) {
|
||||||
try {
|
try {
|
||||||
logger.info("Calling the underlying backend channel initializer: " + delegate.getClass().getName());
|
|
||||||
INIT_CHANNEL.invoke(delegate, ch);
|
INIT_CHANNEL.invoke(delegate, ch);
|
||||||
} catch (ReflectiveOperationException e) {
|
} catch (ReflectiveOperationException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user