1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-19 14:59:27 +00:00

151 Commits

Author SHA1 Message Date
Camotoy
765128ce42 Switch config system to Configurate (#5010)
* Start implementing Configurate config system

* More development

* Start migrating to Gson only

* Progress

* Update usage of WebUtils

* Most things now use Gson for JSON

* Allow tests to succeed by using new Gson version

* Use slightly cleaner version for Version deserializer

* Work around older Gson versions without record support

* GeyserCustomSkullConfiguration uses Configurate

* Fix regression in properties get

* New config used in core

* The configuration is gone. Long live the config.

* More changes and migrations away from Jackson

* Improve node ordering when updating configs

* typo

* Better check for ignoring non-configurate configs for considering comment moving

* Ensure metrics UUID is valid

* Initial advanced config

* Remove Jackson; finish config value placements

* Remove duplicate relocate declarations

* Let annotations work

* Renaming to PluginSpecific

* Use global bStats config where possible

* Fix test

* Re-introduce asterisk behavior in configs

* Remove GeyserPluginBootstrap as it's no longer necessary

* Remove old config.yml file

* Update Xbox achievement comment

* Apply suggestions from code review

Co-authored-by: chris <github@onechris.mozmail.com>

* No need to remove values anymore

* Fix: disable bstats relocation on platforms where it is not needed

* ensure it builds

* Update custom unavailable slot comment

Co-authored-by: chris <github@onechris.mozmail.com>

* Update cooldown image

* Logger message for direct-compression still being enabled

* oops

* More explicit RuntimeException message

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>

* Constant for 'system' locale

* Better config JSON encoding (something is broken with Cloudflare; we'll figure it out

* Fix broadcast port default

* Add this file too

* Update configurate branch

* fix build

* Fix: Allow using custom config file on Standalone, add relocation comment

* Move config loading to GeyserBootstrap interface

* Add and rename some config options, add section notes (#5390)

* Add and rename some config options, add section notes

* adjust message

* Update core/src/main/java/org/geysermc/geyser/command/defaults/ConnectionTestCommand.java

Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz>

* Update core/src/main/java/org/geysermc/geyser/configuration/GeyserConfig.java

Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz>

* Update ConfigLoader.java

* Update AdvancedConfig.java

* clarify that we're talking about the HAProxy protocol

* rename config option to use-haproxy-protocol

* remove ominous warning sign on xbox auth warning

* adjust wording

---------

Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz>

* Back to one config file

* Some minor touchups

* Configurate: Sectionification (#5904)

* Init: config sections

* Start on adding tests, move migrations over to ConfigMigrations class

* Get rid of auth section again, rename that one config option, fix mtu migration

* Move custom skulls config options to the bottom of the gameplay settings

* Add more tests

* Rename and migrate proxy-protocol-whitelisted-ips to haproxy-protocol-whitelisted-ips

* Add automatic downloading of the GeyserOptionalPack

* Revert "Add automatic downloading of the GeyserOptionalPack"

This reverts commit 65b96208fb.

* Add more invalid config tests

* Warn about emote-offhand-workaround removal

* Add automatic loading of the GeyserOptionalPack (feature/configurate) (#5964)

* Add automatic downloading of the GeyserOptionalPack

* Warn about including the OptionalPack from extensions when Geyser is already including it instead of throwing.

* Copy optional pack instead of downloading

---------

Co-authored-by: onebeastchris <github@onechris.mozmail.com>

* Remove unused variable

* Start warning users not running Java 21

* Update tests, temporarily remove NumericRanges test

* Remove duplicate advanced section from Geyser dump

* Address some "reviews"

* yeet md5 hash from geyser dump

* Add info about number of resource packs / amount of mappings into Geyser dump

* Re-enable invalid config loading test

* Fix: allow-custom-skulls migration

* Fix test

* Add "enable-emotes" configuration option

* Rename "emotes-enabled" to "show-emotes"

* Only enable integrated pack when optional pack isn't present

* Update integrated pack

* Exclude jackson annotations, remove leftover debug print

* Remove one-time config migration warnings as we don't have access to the logger at that stage

* Throw more detailed descriptive error when loading resource packs from the "packs" folder, add another legacy config test

* Fix NeoForge's fun module conflict

* Re-add warning about moved functionality, fix Geyser-ViaProxy

This reverts commit fbadfa574a.

* oops

* Move GeyserLegacyPingPassthrough to separate thread to avoid Standalone command locking issues

---------

Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
Co-authored-by: chris <github@onechris.mozmail.com>
Co-authored-by: Eclipse <eclipse@eclipseisoffline.xyz>
Co-authored-by: Aurora <auroranova8756@gmail.com>
2025-11-18 17:55:12 +01:00
onebeastchris
6ad1105ed6 Bump netty, re-enable adaptive allocator 2025-10-20 15:13:19 +02:00
onebeastchris
826b4b4e48 Indicate 1.21.112/1.21.113 support, track server platform types in bstats metrics 2025-10-12 13:34:29 +02:00
chris
e2ae101419 Resolve "not in event loop" issue on Geyser-Velocity with use-direct-connection enabled (#5720) 2025-08-15 23:38:42 +03:00
onebeastchris
ca99ab7b1b Fix: Build issues for Geyser-Fabric and Geyser-NeoForge
resolves: https://github.com/GeyserMC/Geyser/issues/5718
how did this work until now? we'll never know
2025-07-26 01:13:25 +02:00
onebeastchris
df4bb4f1c1 Update netty & mcpl dependencies
Fixes https://github.com/GeyserMC/Geyser/issues/5375, https://github.com/GeyserMC/Geyser/issues/5301, fixes https://github.com/GeyserMC/Geyser/issues/5050
2025-07-25 20:04:39 +02:00
Eclipse
3286e884ae Address reviews 2025-06-18 17:06:54 +00:00
Eclipse
c29b20d23a Update/fix bootstraps and build 2025-06-17 18:55:55 +00:00
chris
7c47459609 Resolve memory usage issues related to Netty 4.2 update (#5536)
* More proper workaround for direct connection using Netty 4.2

* Add check for outdated Velocity

* BungeeCord support for Netty 4.2

* Use pooled allocator

* Small cleanup: only one allocator system property check, pin comment to static commit

* Set allocator type on Standalone using netty system property

* Don't mess with allocator, both BungeeCord and Velocity set it globally

* Temporarily remove io_uring support

In order to support io_uring transport after the 4.2 update, we'd need to separately handle 4.1 and 4.2 event loop group creation

* Add compileOnly netty io_uring dependency for Geyser-BungeeCord

* Exclude old incubator io_uring dependency on geyser-standalone

---------

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2025-05-22 17:43:02 +02:00
Camotoy
b0212ec8b9 Temporary workaround to allow Velocity builds with Netty 4.2 to operate 2025-04-09 20:48:13 -04:00
chris
2b5369ff8b Attempt to resolve 1.21.70 inventory issues (#5443)
* Inventory translators are now part of inventories, try fixing inventory reusing, use NetworkStackLatency hack

* Add debug, re-add force open hack

* don't log to info

* fix debug npe

* Don't set setPending when opening pending inventories, add more delay to re-opening rejected inventories

* Use inventory#getTranslator to hopefully avoid translator/inventory desync

* Minor cleanup

* Update core/src/main/java/org/geysermc/geyser/GeyserLogger.java

* Reuse inventories whenever possible, prevent bedrock inventory id conflicts

* Fix debug logging with arguments, don't attempt to re-use inventory that's currently closing

* Some documentation, include pending inventories in re-use check

* "bad html entity"

* add wayyyy more debugging to container reusing checks

* yeet java id check

* Fixes related to hacky plugins that spam open screen packets

* no clue how this slipped by

* Don't reuse real blocks, yeet Inventory#isDelayed
2025-03-31 21:36:19 +02:00
chris
69329f2cad Feature: Resource Pack API additions - ResourcePackOptions and a GeyserDefineResourcePacksEvent (#4978) 2025-03-25 15:49:18 +01:00
Alex
5f0611ff0f Switch all ping passthroughs to json to avoid parsing warning (#5363) 2025-02-25 22:33:10 +01:00
Alex
07be402563 Add run tasks and remove useless variables (#5362)
* Add run tasks and remove useless variables

The benefit of run tasks is that proxies like velocity can be prototyped on without using standalone or a GUI. Thus simplifying the prototyping/fixing process.

* Drop runwaterfall
2025-02-22 12:31:37 +01:00
Matthias Ahouansou
2bc3773cb0 Set Minecraft & protocol version in Velocity ping (#5130)
this fixes issues caused by plugins which use the version in the ping
2024-11-07 12:23:23 -05:00
Konicai
f8884568ee Gradle: avoid cross-configuration and enable configuration-on-demand (#5012) 2024-09-03 00:54:50 -04:00
Konicai
1ab3f1f2e0 Improve command registration timing on Velocity/BungeeCord (#5013) 2024-09-01 15:34:53 -04:00
chris
d3ea65196b Feature: Detect incorrect proxy setups (#4941)
* Feature: Detect & warn about incorrect proxy setups on Spigot platforms

* Properly disable Geyser if we failed to load
2024-08-11 00:50:27 +02:00
Konicai
87ab51cb28 Cloud for commands (#3808)
Co-authored-by: onebeastchris <github@onechris.mozmail.com>
2024-07-31 20:01:31 -05:00
chris
77fa37ff82 Fix: readme not being synched to modrinth, publish spigot/bungee/velocity variants to modrinth (#4761)
* Fix: readme not being synched to modrinth

* use new build_number system env var

* also upload bungee/spigot/velocity

* change name

* undo debug mode, oops
2024-06-17 21:31:54 +02:00
chris
0fcf0f9b4f Update Bungee version check, create logger earlier (#4697)
* use the logger where possible instead of system.out.print

* make loggers final

* yeet unused constructors

* velocity is more complicated
2024-05-28 17:23:19 +02:00
basaigh
a39cd65537 Fix velocity ping passthrough (#4626) 2024-05-03 13:53:47 +02:00
chris
94f664ad8d Fix: Properly check whether the so_reuseport socket option is available (#4579)
* Try to properly check if so_reuseport is available

* io_uring "support"

* comment out io_uring, for now

* Make IO_uring opt-in via `-DGeyser.io_uring=true` flag

* dont include io_uring

* oops - bungee 

editing on mobile is hard

* oops - spigot

* oops - velocity

* properly exclude all io_uring on all platforms except standalone

---------

Co-authored-by: Kas-tle <26531652+Kas-tle@users.noreply.github.com>
2024-04-19 11:50:40 +02:00
chris
4fa0bcd01b Update Jackson (#4512)
* Update jackson

* relocate yaml on velocity
2024-03-21 19:05:41 +01:00
chris
867cf6da05 Feature: JiJ dependencies on modded platforms (#4502)
* Use JiJ inclusion for Fabric/NeoForge to prevent mod conflicts. Further: Don't publish shadow jars to maven.

* Shade and relocate dependencies that don't conform to SemVer on Fabric

* Shade/Relocate dependencies on Fabric to avoid version warnings

* Use relocate function from the build-logic plugin
2024-03-19 23:05:30 +01:00
chris
6a51d8298f Feature: Rework startup logic (#4377)
* This makes `geyser reload` work the same across all platforms. For example, it ensures that we reload the config to the greatest extent possible (with the exception of compression/injection settings). Additionally, this clears up issues where Extensions were previously disabled during reloading - instead, the new Pre and Post reload events allow extensions to reload whatever necessary on their own.
2024-02-14 12:50:50 +01:00
chris
509e00c138 Fix: Geyser on Velocity after they renamed packet class names :/ (#4399) 2024-01-19 00:19:07 +01:00
chris
95d65350e4 Project wide syntax/annotation cleanup (#4238)
Co-authored-by: Konicai <71294714+Konicai@users.noreply.github.com>
2023-12-05 18:54:42 -05:00
Konicai
bb6a1ec40a Simply pingpassthrough logic, add fabric ping passthrough (#3930)
* Check if PingPassthrough is null
* Remove QueryPacketHandler
* Fabric ping passthrough
2023-11-13 18:17:40 -05:00
chris
06663bcafd Fix: Don't mistakingly assume that Geyser-Velocity initialized (#4276)
* Fix: ListenerBoundEvent could set `INITIALIZED` to true, even if we did not initialize yet - move that to postStartup() instead.

* only assign INITIALIZED once, and only after the correct listenertype bound.
2023-11-06 16:17:41 +01:00
chris
644082ae84 Fix /geyser reload on Velocity (#4258)
* Fix /geyser reload on Velocity 

* No need to create/init a new injector on Velocity

* No need to warn about "abnormally long startup" on Bungee when we're reloading. And, as on velocity, no need to re-inject
2023-11-03 17:16:09 +01:00
chris
b17f4a46f4 Update outdated proxy message to check for 1.20.2, remove floodgate 1.0 checks (#4204) 2023-10-09 18:20:18 +02:00
rtm516
f272ed9383 Move PlatformType to API and expose it for extensions (#3798)
* Move PlatformType to API and expose it for extensions

* Move to a record
2023-06-17 02:56:50 +01:00
Camotoy
c8afd3436d Fix Floodgate autodetection 2023-04-26 21:11:26 -04:00
Tim203
7c1100b830 Fixed auto-setting auth-type to Floodgate 2023-04-26 18:53:03 +02:00
Julian Vennen
f39e689b83 Implement System properties to set the udp port and address #3597 (#3689)
* System property stuff

* Add geyserUdpPort/Address system properties as overrides for pluginUdpPort/Address

* Fix formatting for if-else statements

---------

Co-authored-by: Camotoy <20743703+Camotoy@users.noreply.github.com>
2023-04-22 21:33:23 -04:00
Camotoy
402b3403ba Velocity: Fix disabling compression when there is no compression to disable 2023-01-02 12:12:22 -05:00
Camotoy
9656caf4cb Merge branch 'compression' into dev 2022-12-18 13:21:07 -05:00
Konicai
592b48dbf5 Simplify IP censoring in dumps (#3330) 2022-11-01 09:59:44 -04:00
Camotoy
730b0beb01 Consolidate CommandManager implementations
A lot of these just implemented the class overrode the `description` method returning nothing.
2022-10-18 16:05:55 -04:00
Konicai
7653a626af Update Sponge to API 8 (#2611) 2022-10-02 16:43:14 -04:00
SupremeMortal
e491cf8a17 Use Gradle's dependency catalogue feature (#3305)
Move all of our dependencies to a single catalogue file to make maintenance of them easier.
2022-09-26 11:43:17 -04:00
Camotoy
7cd71f570f Fix some ordering that regressed some behavior 2022-09-20 13:18:41 -04:00
ImDaBigBoss
f1da9d7072 Allow events to be registered by any class
Supersedes & closes #3073

Co-authored-by: Redned <redned235@gmail.com>
2022-09-04 16:11:08 -05:00
RednedEpic
e5337b6298 Reintroduce GeyserDefineCommandsEvent and cleanup a few things 2022-09-04 13:08:17 -05:00
Kas-tle
e35f3785b2 Resolve fallout 2022-08-24 04:53:13 +00:00
Kas-tle
9232310b4d Upstream 2022-08-24 04:53:00 +00:00
Camotoy
67a65c45d3 Implement update notifications for Geyser
Geyser installations will now get notified when a new Bedrock release is out and Geyser must be updated. The system works similarly to ViaVersion where OPs get a notification of an update when they join. The permission node for players to see update notifications is `geyser.update` and the backing JSON that controls this can be found at https://github.com/GeyserMC/GeyserSite/blob/gh-pages/versions.json. There is also a config option to disable update checking.

This update also fixes modern Paper installations not being able to see colored text logged from Geyser in the console.
2022-08-21 21:22:15 -04:00
Camotoy
88727fb473 Bump Geyser to version 2.0.7-SNAPSHOT and default Bedrock to 1.19.20 2022-08-09 20:30:49 -04:00
Konicai
aee43e68fa Merge remote-tracking branch 'upstream/master' into feature/extensions
# Conflicts:
#	ap/pom.xml
#	api/base/pom.xml
#	api/geyser/pom.xml
#	api/pom.xml
#	bootstrap/bungeecord/pom.xml
#	bootstrap/bungeecord/src/main/java/org/geysermc/geyser/platform/bungeecord/GeyserBungeePlugin.java
#	bootstrap/pom.xml
#	bootstrap/spigot/pom.xml
#	bootstrap/sponge/pom.xml
#	bootstrap/standalone/pom.xml
#	bootstrap/standalone/src/main/java/org/geysermc/geyser/platform/standalone/GeyserStandaloneBootstrap.java
#	bootstrap/velocity/pom.xml
#	common/pom.xml
#	core/pom.xml
#	core/src/main/java/org/geysermc/geyser/command/CommandManager.java
#	core/src/main/java/org/geysermc/geyser/registry/populator/ItemRegistryPopulator.java
#	core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaLoginTranslator.java
#	core/src/main/resources/languages
#	pom.xml
2022-08-02 00:01:05 -04:00