mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
New config used in core
This commit is contained in:
parent
db9b951352
commit
29f8e294ad
66 changed files with 758 additions and 1045 deletions
|
@ -27,10 +27,15 @@ package org.geysermc.geyser.platform.velocity;
|
|||
|
||||
import com.velocitypowered.api.proxy.ProxyServer;
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.*;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelOption;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.WriteBufferWaterMark;
|
||||
import io.netty.channel.local.LocalAddress;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.geysermc.geyser.GeyserBootstrap;
|
||||
import org.geysermc.geyser.GeyserPluginBootstrap;
|
||||
import org.geysermc.geyser.network.netty.GeyserInjector;
|
||||
import org.geysermc.geyser.network.netty.LocalServerChannelWrapper;
|
||||
|
||||
|
@ -47,7 +52,7 @@ public class GeyserVelocityInjector extends GeyserInjector {
|
|||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
protected void initializeLocalChannel0(GeyserBootstrap bootstrap) throws Exception {
|
||||
protected void initializeLocalChannel0(GeyserPluginBootstrap bootstrap) throws Exception {
|
||||
Field cm = proxy.getClass().getDeclaredField("cm");
|
||||
cm.setAccessible(true);
|
||||
Object connectionManager = cm.get(proxy);
|
||||
|
@ -80,7 +85,7 @@ public class GeyserVelocityInjector extends GeyserInjector {
|
|||
protected void initChannel(@NonNull Channel ch) throws Exception {
|
||||
initChannel.invoke(channelInitializer, ch);
|
||||
|
||||
if (bootstrap.getGeyserConfig().isDisableCompression() && GeyserVelocityCompressionDisabler.ENABLED) {
|
||||
if (bootstrap.config().disableCompression() && GeyserVelocityCompressionDisabler.ENABLED) {
|
||||
ch.pipeline().addAfter("minecraft-encoder", "geyser-compression-disabler",
|
||||
new GeyserVelocityCompressionDisabler());
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class GeyserVelocityUpdateListener {
|
|||
|
||||
@Subscribe
|
||||
public void onPlayerJoin(PostLoginEvent event) {
|
||||
if (GeyserImpl.getInstance().getConfig().isNotifyOnNewBedrockUpdate()) {
|
||||
if (GeyserImpl.getInstance().config().notifyOnNewBedrockUpdate()) {
|
||||
final Player player = event.getPlayer();
|
||||
if (player.hasPermission(Constants.UPDATE_PERMISSION)) {
|
||||
VersionCheckUtils.checkForGeyserUpdate(() -> new VelocityCommandSource(player));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue