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.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 ProxyServer server;
|
||||
|
|
@ -110,7 +110,7 @@ public class Ambassador {
|
|||
connectionManager.getServerChannelInitializer().set(new VelocityServerChannelInitializer(original, (VelocityServer) server));
|
||||
|
||||
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);
|
||||
argumentRegistry.setAccessible(true);
|
||||
|
|
|
|||
|
|
@ -19,15 +19,11 @@ public class VelocityBackendChannelInitializer extends BackendChannelInitializer
|
|||
private final ChannelInitializer<Channel> delegate;
|
||||
private final VelocityServer server;
|
||||
|
||||
private final Logger logger;
|
||||
|
||||
public VelocityBackendChannelInitializer(ChannelInitializer<Channel> delegate, VelocityServer server, Logger logger) {
|
||||
public VelocityBackendChannelInitializer(ChannelInitializer<Channel> delegate, VelocityServer server) {
|
||||
super(server);
|
||||
this.delegate = delegate;
|
||||
this.server = server;
|
||||
this.logger = logger;
|
||||
try {
|
||||
logger.info("Respecting the previous registered BackendChannelInitializer: " + delegate.getClass().getName());
|
||||
INIT_CHANNEL = delegate.getClass().getDeclaredMethod("initChannel", Channel.class);
|
||||
INIT_CHANNEL.setAccessible(true);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
|
|
@ -38,7 +34,6 @@ public class VelocityBackendChannelInitializer extends BackendChannelInitializer
|
|||
@Override
|
||||
protected void initChannel(Channel ch) {
|
||||
try {
|
||||
logger.info("Calling the underlying backend channel initializer: " + delegate.getClass().getName());
|
||||
INIT_CHANNEL.invoke(delegate, ch);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
throw new RuntimeException(e);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user