Update configs

This commit is contained in:
rtm516 2021-06-05 01:05:33 +01:00
parent 76ab6657c7
commit d84ecbd8e5
No known key found for this signature in database
GPG key ID: 331715B8B007C67A
5 changed files with 91 additions and 52 deletions

View file

@ -79,19 +79,11 @@ public class GeyserConnectConfig {
@Getter @Getter
public static class GeyserConfigSection { public static class GeyserConfigSection {
private int port;
@JsonProperty("cache-chunks")
private boolean cacheChunks = true;
@JsonProperty("allow-password-authentication") @JsonProperty("allow-password-authentication")
private boolean allowPasswordAuthentication = false; private boolean allowPasswordAuthentication = false;
@JsonProperty("debug-mode") @JsonProperty("debug-mode")
private boolean debugMode; private boolean debugMode;
@JsonProperty("shutdown-time")
private int shutdownTime;
} }
@Getter @Getter

View file

@ -68,11 +68,9 @@ public class GeyserProxyBootstrap implements GeyserBootstrap {
// Grab the config as text and replace static strings to the main config variables // Grab the config as text and replace static strings to the main config variables
String text = new BufferedReader(new InputStreamReader(configFile, StandardCharsets.UTF_8)).lines().collect(Collectors.joining("\n")); String text = new BufferedReader(new InputStreamReader(configFile, StandardCharsets.UTF_8)).lines().collect(Collectors.joining("\n"));
GeyserConnectConfig multiConfig = MasterServer.getInstance().getGeyserConnectConfig(); GeyserConnectConfig multiConfig = MasterServer.getInstance().getGeyserConnectConfig();
text = text.replace("PORT", String.valueOf(multiConfig.getGeyser().getPort())); text = text.replaceAll("%MOTD%", multiConfig.getMotd());
text = text.replaceAll("MOTD", multiConfig.getMotd()); text = text.replace("%PLAYERS%", String.valueOf(multiConfig.getMaxPlayers()));
text = text.replace("PLAYERS", String.valueOf(multiConfig.getMaxPlayers())); text = text.replace("%ALLOWPASSWORDAUTHENTICATION%", String.valueOf(multiConfig.getGeyser().isAllowPasswordAuthentication()));
text = text.replace("CACHECHUNKS", String.valueOf(multiConfig.getGeyser().isCacheChunks()));
text = text.replace("ALLOWPASSWORDAUTHENTICATION", String.valueOf(multiConfig.getGeyser().isAllowPasswordAuthentication()));
ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory()); ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory());
geyserConfig = objectMapper.readValue(text, GeyserProxyConfiguration.class); geyserConfig = objectMapper.readValue(text, GeyserProxyConfiguration.class);

View file

@ -142,7 +142,6 @@ public class Player {
startGamePacket.setCurrentTick(0); startGamePacket.setCurrentTick(0);
startGamePacket.setEnchantmentSeed(0); startGamePacket.setEnchantmentSeed(0);
startGamePacket.setMultiplayerCorrelationId(""); startGamePacket.setMultiplayerCorrelationId("");
startGamePacket.setAuthoritativeMovementMode(AuthoritativeMovementMode.CLIENT);
SyncedPlayerMovementSettings settings = new SyncedPlayerMovementSettings(); SyncedPlayerMovementSettings settings = new SyncedPlayerMovementSettings();
settings.setMovementMode(AuthoritativeMovementMode.CLIENT); settings.setMovementMode(AuthoritativeMovementMode.CLIENT);

View file

@ -28,22 +28,12 @@ welcome-file: welcome.txt
# Config for the Geyser listener # Config for the Geyser listener
geyser: geyser:
# The port that will listen for connections
port: 19133
# Configures if chunk caching should be enabled or not.
cache-chunks: true
# If password authentication should be allowed in online mode. # If password authentication should be allowed in online mode.
allow-password-authentication: false allow-password-authentication: false
# If debug messages should be sent through console, has to be enabled in both places to work # If debug messages should be sent through console, has to be enabled in both places to work
debug-mode: false debug-mode: false
# The time to wait after the last player disconnects to shutdown the proxy
# In seconds, set to -1 to disable
shutdown-time: 300
# A global list of servers sent to all clients # A global list of servers sent to all clients
servers: servers:
- name: The Hive - name: The Hive

View file

@ -12,45 +12,70 @@ bedrock:
# There is no reason to change this unless you want to limit what IPs can connect to your server. # There is no reason to change this unless you want to limit what IPs can connect to your server.
address: 0.0.0.0 address: 0.0.0.0
# The port that will listen for connections # The port that will listen for connections
port: PORT port: 19132
# Some hosting services change your Java port everytime you start the server and require the same port to be used for Bedrock. # Some hosting services change your Java port everytime you start the server and require the same port to be used for Bedrock.
# This option makes the Bedrock port the same as the Java port every time you start the server. # This option makes the Bedrock port the same as the Java port every time you start the server.
# This option is for the plugin version only. # This option is for the plugin version only.
clone-remote-port: false clone-remote-port: false
# The MOTD that will be broadcasted to Minecraft: Bedrock Edition clients. This is irrelevant if "passthrough-motd" is set to true # The MOTD that will be broadcasted to Minecraft: Bedrock Edition clients. This is irrelevant if "passthrough-motd" is set to true
motd1: "MOTD" # If either of these are empty, the respective string will default to "Geyser"
motd2: "MOTD" motd1: "%MOTD%"
motd2: "%MOTD%"
# The Server Name that will be sent to Minecraft: Bedrock Edition clients. This is visible in both the pause menu and the settings menu. # The Server Name that will be sent to Minecraft: Bedrock Edition clients. This is visible in both the pause menu and the settings menu.
server-name: "Geyser" server-name: "Geyser"
# How much to compress network traffic to the Bedrock client. The higher the number, the more CPU usage used, but
# the smaller the bandwidth used. Does not have any effect below -1 or above 9. Set to -1 to disable.
compression-level: 6
# Whether to enable PROXY protocol or not for clients. You DO NOT WANT this feature unless you run UDP reverse proxy
# in front of your Geyser instance.
enable-proxy-protocol: false
# A list of allowed PROXY protocol speaking proxy IP addresses/subnets. Only effective when "enable-proxy-protocol" is enabled, and
# should really only be used when you are not able to use a proper firewall (usually true with shared hosting providers etc.).
# Keeping this list empty means there is no IP address whitelist.
# Both IP addresses and subnets are supported.
#proxy-protocol-whitelisted-ips: [ "127.0.0.1", "172.18.0.0/16" ]
remote: remote:
# The IP address of the remote (Java Edition) server # The IP address of the remote (Java Edition) server
# If it is "auto", for standalone version the remote address will be set to 127.0.0.1, # If it is "auto", for standalone version the remote address will be set to 127.0.0.1,
# for plugin versions, Geyser will attempt to find the best address to connect to. # for plugin versions, Geyser will attempt to find the best address to connect to.
address: 127.0.0.1 address: auto
# The port of the remote (Java Edition) server # The port of the remote (Java Edition) server
# For plugin versions, if address has been set to "auto", the port will also follow the server's listening port. # For plugin versions, if address has been set to "auto", the port will also follow the server's listening port.
port: 25565 port: 25565
# Authentication type. Can be offline, online, or floodgate (see https://github.com/GeyserMC/Geyser/wiki/Floodgate). # Authentication type. Can be offline, online, or floodgate (see https://github.com/GeyserMC/Geyser/wiki/Floodgate).
auth-type: online auth-type: online
allow-password-authentication: ALLOWPASSWORDAUTHENTICATION # Allow for password-based authentication methods through Geyser. Only useful in online mode.
# If this is false, users must authenticate to Microsoft using a code provided by Geyser on their desktop.
allow-password-authentication: %ALLOWPASSWORDAUTHENTICATION%
# Whether to enable PROXY protocol or not while connecting to the server.
# This is useful only when:
# 1) Your server supports PROXY protocol (it probably doesn't)
# 2) You run Velocity or BungeeCord with the option enabled in the proxy's main config.
# IF YOU DON'T KNOW WHAT THIS IS, DON'T TOUCH IT!
use-proxy-protocol: false
# Forward the hostname that the Bedrock client used to connect over to the Java server
# This is designed to be used for forced hosts on proxies
forward-hostname: false
# Floodgate uses encryption to ensure use from authorised sources. # Floodgate uses encryption to ensure use from authorised sources.
# This should point to the public key generated by Floodgate (Bungee or CraftBukkit) # This should point to the public key generated by Floodgate (Bungee or CraftBukkit)
# You can ignore this when not using Floodgate. # You can ignore this when not using Floodgate.
floodgate-key-file: public-key.pem floodgate-key-file: public-key.pem
## the Xbox/MCPE username is the key for the Java server auth-info # The Xbox/Minecraft Bedrock username is the key for the Java server auth-info.
## this allows automatic configuration/login to the remote Java server # This allows automatic configuration/login to the remote Java server.
## if you are brave/stupid enough to put your Mojang account info into # If you are brave enough to put your Mojang account info into a config file.
## a config file # Uncomment the lines below to enable this feature.
#userAuths: #userAuths:
# bluerkelp2: # MCPE/Xbox username # BedrockAccountUsername: # Your Minecraft: Bedrock Edition username
# email: not_really_my_email_address_mr_minecrafter53267@gmail.com # Mojang account email address # email: javaccountemail@example.com # Your Minecraft: Java Edition email
# password: "this isn't really my password" # password: javaccountpassword123 # Your Minecraft: Java Edition password
# microsoft-account: true # Whether the account is a Mojang or Microsoft account.
# #
# herpderp40300499303040503030300500293858393589: # bluerkelp2:
# email: herpderp@derpherp.com # email: not_really_my_email_address_mr_minecrafter53267@gmail.com
# password: dooooo # password: "this isn't really my password"
# microsoft-account: false
# Bedrock clients can freeze when opening up the command prompt for the first time if given a lot of commands. # Bedrock clients can freeze when opening up the command prompt for the first time if given a lot of commands.
# Disabling this will prevent command suggestions from being sent and solve freezing for Bedrock clients. # Disabling this will prevent command suggestions from being sent and solve freezing for Bedrock clients.
@ -71,8 +96,12 @@ legacy-ping-passthrough: false
# Increase if you are getting BrokenPipe errors. # Increase if you are getting BrokenPipe errors.
ping-passthrough-interval: 3 ping-passthrough-interval: 3
# Maximum amount of players that can connect # Whether to forward player ping to the server. While enabling this will allow Bedrock players to have more accurate
max-players: PLAYERS # ping, it may also cause players to time out more easily.
forward-player-ping: false
# Maximum amount of players that can connect. This is only visual at this time and does not actually limit player count.
max-players: %PLAYERS%
# If debug messages should be sent through console # If debug messages should be sent through console
debug-mode: false debug-mode: false
@ -89,24 +118,47 @@ allow-third-party-capes: true
allow-third-party-ears: false allow-third-party-ears: false
# Allow a fake cooldown indicator to be sent. Bedrock players do not see a cooldown as they still use 1.8 combat # Allow a fake cooldown indicator to be sent. Bedrock players do not see a cooldown as they still use 1.8 combat
show-cooldown: true # Can be title, actionbar or false
show-cooldown: title
# Controls if coordinates are shown to players.
show-coordinates: true
# If set, when a Bedrock player performs any emote, it will swap the offhand and mainhand items, just like the Java Edition keybind
# There are three options this can be set to:
# disabled - the default/fallback, which doesn't apply this workaround
# no-emotes - emotes will NOT be sent to other Bedrock clients and offhand will be swapped. This effectively disables all emotes from being seen.
# emotes-and-offhand - emotes will be sent to Bedrock clients and offhand will be swapped
emote-offhand-workaround: "disabled"
# The default locale if we dont have the one the client requested. Uncomment to not use the default system language. # The default locale if we dont have the one the client requested. Uncomment to not use the default system language.
# default-locale: en_us # default-locale: en_us
# Configures if chunk caching should be enabled or not. This keeps an individual # Configures if chunk caching should be enabled or not. This keeps an individual
# record of each block the client loads in. While this feature does allow for a few # record of each block the client loads in. This feature does allow for a few things
# things such as block break animations to show up in creative mode and among others, # such as more accurate movement that causes less problems with anticheat (meaning
# it is HIGHLY recommended you disable this on a production environment as it can eat # you're less likely to be banned) and allows block break animations to show up in
# up a lot of RAM. However, when using the Spigot version of Geyser, support for features # creative mode (and other features). Although this increases RAM usage, it likely
# or implementations this allows is automatically enabled without the additional caching as # won't have much of an effect for the vast majority of people. However, if you're
# Geyser has direct access to the server itself. # running out of RAM or are in a RAM-sensitive environment, you may want to disable
cache-chunks: CACHECHUNKS # this. When using the Spigot version of Geyser, support for features or
# implementations this allows is automatically enabled without the additional caching
# as Geyser has direct access to the server itself.
cache-chunks: true
# Specify how many days images will be cached to disk to save downloading them from the internet. # Specify how many days images will be cached to disk to save downloading them from the internet.
# A value of 0 is disabled. (Default: 0) # A value of 0 is disabled. (Default: 0)
cache-images: 0 cache-images: 0
# Allows custom skulls to be displayed. Keeping them enabled may cause a performance decrease on older/weaker devices.
allow-custom-skulls: true
# Whether to add (at this time, only) the furnace minecart as a separate item in the game, which normally does not exist in Bedrock Edition.
# This should only need to be disabled if using a proxy that does not use the "transfer packet" style of server switching.
# If this is disabled, furnace minecart items will be mapped to hopper minecart items.
# This option requires a restart of Geyser in order to change its setting.
add-non-bedrock-items: true
# Bedrock prevents building and displaying blocks above Y127 in the Nether - # Bedrock prevents building and displaying blocks above Y127 in the Nether -
# enabling this config option works around that by changing the Nether dimension ID # enabling this config option works around that by changing the Nether dimension ID
# to the End ID. The main downside to this is that the sky will resemble that of # to the End ID. The main downside to this is that the sky will resemble that of
@ -114,9 +166,13 @@ cache-images: 0
above-bedrock-nether-building: false above-bedrock-nether-building: false
# Force clients to load all resource packs if there are any. # Force clients to load all resource packs if there are any.
# If set to false it allows the user to disconnect from the server if they don't # If set to false, it allows the user to connect to the server even if they don't
# want to download the resource packs # want to download the resource packs.
force-resource-packs: false force-resource-packs: true
# Allows Xbox achievements to be unlocked.
# THIS DISABLES ALL COMMANDS FROM SUCCESSFULLY RUNNING FOR BEDROCK IN-GAME, as otherwise Bedrock thinks you are cheating.
xbox-achievements-enabled: false
# bStats is a stat tracker that is entirely anonymous and tracks only basic information # bStats is a stat tracker that is entirely anonymous and tracks only basic information
# about Geyser, such as how many people are online, how many servers are using Geyser, # about Geyser, such as how many people are online, how many servers are using Geyser,
@ -144,4 +200,8 @@ enable-proxy-connections: false
# 1400 is the default. # 1400 is the default.
# mtu: 1400 # mtu: 1400
# Whether to use direct server methods to retrieve information such as block states.
# Turning this off for Spigot will stop NMS from being used but will have a performance impact.
use-adapters: true
config-version: 4 config-version: 4