Commit Graph

56 Commits

Author SHA1 Message Date
Camotoy 2cc8726c12
Shade in the entire net.kyori package (#1826) 2021-01-11 14:11:21 -05:00
Camotoy 186d94917a
Update copyright to 2021 (#1772)
* Update copyright to 2021

Free commit!

* These don't need a copyright

* Don't downgrade the mappings
2021-01-01 10:10:36 -05:00
qlow a173005767
Added IGeyserPingPassthrough#getPingInformation(InetSocketAddress) to make logging of the pinging IPs possible (#1633)
Co-authored-by: qlow <info@qlow.eu>
2020-12-07 14:04:50 -05:00
rtm516 4297215420
More chat fixes (#1557)
* Fix positional translation arguments not being handled

* Fix locale fallback

* Fix command completion

* Remove the expensive call to `containsKey`

* Unify adventure versions

* Fix some more formatting issues due to parity

* Fix and update tests

* Update adventure

* Add Javadoc for getCommandNames

* Formatting

Co-authored-by: Camotoy <20743703+DoctorMacc@users.noreply.github.com>
2020-11-18 23:18:36 +00:00
Camotoy 123b074cc7
Update to Bedrock 1.16.100 (#1552)
* Initial work on 1.16.100 - currently crashes the client

* Update runtime item states

* Use new Bedrock runtime IDs

Bedrock now hardcodes block runtime IDs in alphabetical order of the identifiers. This commit updates Geyser to accomodate.

- Remove runtime_block_states.dat and replace it with blockpalette.nbt
- Calculate the block runtime ID based on the order of the block palette
- Separate BlockTranslator.AIR into Bedrock and Java values
- Update the second layer of chunks to use air when not waterlogged
- Don't send item palette for now, as that's what crashes the game (will look into for v415)
- Other misc. changes

* Improve second layer chunk translation

* v415 support

- Add a message warning people they are on a beta version of Geyser

* Update to protocol v417

There are still some mappings changes that need to be gone through.

* Update runtime item states and clean up item frames

* Future-proof enchanment table

* Update for v418

* Update to v419

* Apply proper air ID to waterlogged chunk layer

* Fix missing import

* Remove beta warning

* Update mappings

* Manually patch runtime_item_states and send the ITEMS registry

* Update README

* Disable grindstone and smithing inventories (since they're broken)

* Use artifactory jenkins plugin (#1548)

* Use artifactory jenkins plugin

* Bump version to 1.2.0-SNAPSHOT

Co-authored-by: SupremeMortal <6178101+SupremeMortal@users.noreply.github.com>
2020-11-17 11:03:12 -06:00
RednedEpic 981ac3bf11 Move PlatformType to common module 2020-11-14 17:49:56 -06:00
bundabrg 650c02ef66
Remove 'geyser' from parameters when executing a command under Spigot, Bungeecord, Sponge, Velocity (#1266)
* Remove 'geyser' from parameters when executing a command under Spigot, Bungeecode, Sponge, Velocity

Fixes https://github.com/bundabrg/GeyserReversion/issues/8

* Fix case when there are no sub commands

Co-authored-by: bundabrg <bundabrg@grieve.com.au>
2020-09-28 23:49:46 -04:00
Camotoy 4c58568eb4
Relocate Google Common (#1242)
Fixes NoSuchMethodErrors from occuring on certain Spigot servers.
2020-09-02 23:42:53 -04:00
Camotoy 81a48bf96d
Relocate the rest of our dependencies (#1227)
- Relocate all of our dependencies. This does not include MCProtocolLib and Nukkit dependencies at this time as there are no other known plugins that use these dependencies.
- Switch to a static commit for Adventure dependencies.

Tested working on all versions.
2020-09-01 23:38:10 -05:00
Tim203 1c84993853
Scoreboard improvements (#1166)
* Added a way to check if debug logging is enabled

* Improved scoreboard performance

* Include Teams in pps and return pending pps instead when higher then pps

Some servers have a huge amount of score packets when the player logs in, but before this commit, only after the first high pps (packets per second) the ScoreboardUpdater will be used (after pending packets per second have been moved to packets per second). But this commit fixes that the ScoreboardUpdater can be used on the second that the pps is getting high.

* Fixed team pre + suffix "null" issue and added threshold config option

Fixed team pre + suffix "null" issue.
When the prefix and/or suffix of a Team is null, "null" will be returned instead of null (Due to the way that MCProtocolLib is made and designed). This is fixed by simply checking if the prefix and/or suffix equal "null" and if that is the case, replace it with "".

Added threshold option.
Gave the person who is running Geyser an option to specify the first Scoreboard packets per second threshold to further improve performance by lowering the setting or decrease performance by relaxing the setting a bit. The value can't be higher then 250 (the second threshold), because it'll always choose the lowest threshold.

* Forgot to bump config version

* Small changes

* Reverted version bump, changed Sponge config, changed FloodgateKeyLoader

Reverted version bump
Camotoy said that you only need to bump the config version if the change is breaking, the config version bump has been reverted.

Changed Sponge config
The Sponge config has been modified to look like the other platform configurations.

Changed FloodgateKeyLoader

* Changed default-locale and (remote) address as requested by Camotoy

* Reduce bandwidth and a few final tweaks

* Made the scoreboard-packet-threshold a bit higher due to improvements
2020-08-28 10:47:52 -05:00
rtm516 7cbfdcf521
Fix reflections relocation (#1199) 2020-08-28 10:29:48 -05:00
James Cahill 81f58ee9bf
Add Server Name config option (#1170)
* Add bedrock.server-name config option

* Fix spelling mistake oops!

* Remove trailing whitespace
2020-08-25 09:29:55 -04:00
Camotoy d6290ccb66
Auto-configure more if setting is enabled (#1168)
* Auto-configure more if setting is enabled

- Geyser dumps now show if the config was automatic
- Floodgate is now automatically detected if the address is also automatically found
- If the plugin versions' servers have the listening address set to something different, set our remote address to that

* Fix Sponge config

* Remove redundant Getter
2020-08-19 13:14:17 -04:00
James Cahill e7363b4e9f
Add 'passthrough-protocol-name' config option (#1124)
* Initial version (tested)

* Don't bump config version

* Misc changes

* Add punctuation to config
2020-08-17 22:36:15 -05:00
Camotoy 8c514d9feb
Fix Xbox authentication and add support for proxies (#1162)
Waterdog and ProxyPass will work when `enable-proxy-connections` is set to true at the expense of security.
2020-08-17 12:04:09 -04:00
R-Josef 0e91475c62
Follows specified address/port in remote config for plugin versions: fix #1110 (#1145)
* fix #1110

* updating comments in config.yml

* Fix indentation

* Centralize localhost retrieval; remove unnecessary Docker check

* Add config.yml

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-08-16 12:45:52 -05:00
rtm516 41d299fae5
Change version number to 1.1.0 2020-08-11 19:10:48 +01:00
bundabrg 0ca1096f45
Fix Skin Caching and Fix Skin Restorer (#680)
* Fix Skin Caching

Changes:
* Instead of caching a skin based upon the player we cached it based upon the textureURL. This means multiple players with the same skin will benefit from the cache and more importantly will mean a player changing their skin will not get a false cache hit.
* This should fix all issues with SkinRestorer and will now correctly show the skin both to the player themselves and to other players

Closes #518

* Remove duplicated code

* Minimize playerlist updates

Changes:
* All async skin stuff will now just update skins and not be involved with sending the session to the player. This eliminates issues where the player list changes whilst an async task is occuring plus it means no invisible players while retrieving skin.
* Fix bug when retrieving cached skin

* When sending PlayerList packets ensure the skins have appropriate skinIds so the Bedrock client will cache hit/miss as needed

* Make sure to add and remove player when setting skin if they do not belong on the playerlist

* Make use of AuthData UUID when removing the player

* Revert removal of checking if entity is valid when initialized

This section is supposed to send all spawned entities in the java world to a player only after they've initialized. By removing this check it would also be sending entities that exist but are not spawned.

* Optimizations

Changes:
* Check for duplicate requests based on textureURL instead of player ID
* Don't use the PlayerSkinPacket. It duplicates the data sent in the PlayerListPacket and without it the players still get skin updates.

* Support caching of skins to disk based on configuration variable

If a skin is downloaded it will be saved to `cache/skins` using a base64 encoded filename of the textureUrl, if allowed by setting a non 0 value for the configuration variable `cache-skins`

When reading a skin we try load it from a cache file first before trying to download it.

We don't yet expire them but do update their last modification so we know which ones have been accessed.

* Update `config.yml` with cache-skins directive, defaulting to disabled

* Merge Fixes

* Cache all images instead of just skins

Changes:
* Move the image caching from skins to where images may get downloaded so this also covers capes and anything else that uses the same method of image retrieval
* Updated config value from `cache-skins` to `cache-images`
* Updated cache location from `cache/skins` to `cache/images`
* Images are stored in png format with a uuid. This may make debugging easier as they can be directly opened.

* Implement cached image expiry

If `cache-images` is set to a value greater than 0 then a scheduled task will occur once a day that will remove images with a modification date older than the value in days.

* Force skin changes as trusted

* Resolve PR queries

* Fix signed int causing issues calculating expiry time for images

* Reset Defaults to 0 and implement Google Timed Eviction cache for Images

* Add memory cache for Capes

Co-authored-by: Brendan Grieve <brendan.grieve@zepli.com.au>
Co-authored-by: bundabrg <bundabrg@grieve.com.au>
2020-08-07 12:33:21 -04:00
Camotoy 7fc14d8956
Add customizable MTU support (#1068)
* Add customizable MTU support

Fixes clients being unable to connect in rare instances.

* Make config.yml nicer
2020-07-31 19:47:23 -04:00
rtm516 b10e5d5af3
Clean copyright message and update all files (#1053) 2020-07-30 15:10:15 -05:00
toinouH 427cb69a14
clone-remote-port option Updated (#1061)
* Added clone remote port option for bukkit, bungee and velocity

* Added clone remote port option for sponge

* Changed clone-remote-port description in config.yml

* Update config.yml

Updated config.yml to include a better description of the clone-remote-port option

* Updated GeyserSpongePlugin

An incorrect port was being edited before (remote instead of bedrock)

* Update config.yml

Co-authored-by: TeaNoDonuts <blackalegator@gmail.com>
2020-07-30 15:09:40 -05:00
Phillipp W af484a425b
SRV resolving / Small Handshake rework (#968)
Handshake now uses the server address directly from the config and no longer the IP from a domain (Some servers use the address that is given during the handshake)
2020-07-25 13:42:43 -04:00
Camotoy afcf1e3acd
Change versioning to match supported Bedrock version; add versioning command (#730)
* Change versioning to match supported Bedrock version

Line up Geyser's versioning to match with the highest/currently supported Bedrock version for future tracking of older Geyser versions.

* Add version command

* Fix DEV check for version command

* Remove SNAPSHOT

* Update languages submodule

Co-authored-by: rtm516 <ryantmilner@hotmail.co.uk>
2020-07-05 21:38:24 -04:00
rtm516 cfaf4051b7
Add Translation support (#504)
Adds full multi-language support to any Bedrock-supported language.

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-07-05 19:35:51 -04:00
RednedEpic 8ac5d6e13d Fix memory leak in legacy ping passthrough (Fixes #674, #813) 2020-07-04 16:35:48 -05:00
Tim203 8f763dfc5f
Move common stuff used only by connector and bootstrap to connector 2020-06-28 00:27:00 +02:00
rtm516 7743f6d718
Add dump command (#808)
* Add dump command
Adds a command to collect and dump infomation about the Geyser install and bootstrap and submit it to a dumps site.

* Finalize URL; misc. fixes; add 'architecture' param

Co-authored-by: DoctorMacc <toy.fighter1@gmail.com>
2020-06-27 11:36:48 -04:00
endevrr ca7484a5cf
Relocate Reflections Dependency (#802) 2020-06-23 19:51:59 -04:00
bundabrg e66f57f9f0
Provide a platform independent method of retrieving the datafolder (#769)
* Provide a platform independent method of retrieving the datafolder

* LocaleUtils now uses datafolder

* Make use of Path instead of File

Changes:
* Rename getDataFolder() to getConfigFile() and update to return a Path in each bootstrap

* Rename filePath to tmpFilePath

* Update Velocity configFile to configFile Path
2020-06-20 12:54:40 -05:00
Camotoy 9369b20209
Add 1.9+ PvP 'Cooldown' (#768)
* Add 1.9+ PvP 'Cooldown'

This commit adds a subtitle that acts as the Java cooldown. This is an optional feature disabled in the config with `show-cooldown`. This does not appear on plugins that use OldCombatMechanics.

* No need to bump up the config version; I was just tested with OldCombatMechanics

* Use simpler casting

* Use session variable of lastHitTime for theoretically better performance

* Reuse attribute value calculation from AttributeUtils

* Remove unused imports

* Revert config version update in config.yml
2020-06-16 19:03:28 -05:00
Camotoy 34b367bfc3
Configuration updates (#653)
* Configuration updates

The main feature of this commit is switching Bukkit and BungeeCord to using Jackson configuration. This allows comments to load. Along with this, the Jackson configs have been consolidated into one abstract class, and a check is made to ensure auth-type cannot be set to Floodgate if Floodgate is not installed.

* Add deleted file; remove imports

* Re-add changing of Bukkit port

* Alphabetize import

* Alphabetize Bungee import

* Updates

* Swap values in GeyserJacksonConfiguration

* Add a null check for GeyserConnector in Bukkit's onDisable
2020-06-10 17:58:29 -05:00
Camotoy 99f69b3a7d
Rewrite Ping Passthrough (#468)
* Fix ping passthrough on BungeeCord

* Initial implementation of direct ping passthrough

* Finished implementation of direct ping passthrough

* Remove test for something else entirely

* Fix standalone

* Add config option for ping passthrough interval

* Use GeyserPingInfo to reduce methods

* Add querying; modify ping passthrough

* Add separate config options for passthrough MOTD and player counts

* Convert all plugin bootstraps to use internal ping events to that other plugins can handle ping modifications

* Small changes

* Fix invalid packet spawm

* Add legacy ping passthrough option

* Fix BungeeCord

* Proper UUID for BungeeCord, thanks @theminecoder

* Update config version and messages

* Merge master... again

* Add missing javadocs and minor changes

Co-authored-by: James Harrison <james@fasttortoise.co.uk>
Co-authored-by: theminecoder <theminecoder.dev@gmail.com>
Co-authored-by: Redned <redned235@gmail.com>
2020-05-23 16:50:04 -05:00
rtm516 fc6532732d
Adds skin ears from MinecraftCapes.co.uk + Clientside linked account skins + Elytra textures (#539)
* Added ears geometry support

* Added ear fetching from mc capes

* Added support for deadmau5

* Commented, documented and cleaned code

* Allow bedrock players to see their java skin/cape/ears when joining

* Optimised Imports

* Fix missing else statement

* Moved ears and fixed elytra skins

* Added ears config option

* Fixed cape/elytra transparency

* Fixed slim skin geometry

* Fixed async ears request and added alex skin

* Fixed default elytra not showing with no cape

* Moved to normal Base64 functions

Co-authored-by: James Harrison <james@fasttortoise.co.uk>
2020-05-23 16:06:34 -05:00
Camotoy 1664221fa9
Add optional workaround for >Y128 Nether building (#615)
* Add optional workaround for >Y128 Nether building

This commit adds a config option for building above the Nether by changing the Nether's dimension ID to match the End's.

* Only check for workaround application once

* Fix mappings?

* Include a bit more for the above bedrock nether building config option

Co-authored-by: Redned <redned235@gmail.com>
2020-05-23 16:02:51 -05:00
Camotoy a7f363ec09
Add option for disabling command suggestions; add config version (#598)
* Add option for disabling command suggestions; add config version

This commit adds an option for disabling command suggestions. If enabled, command suggestions will not be sent to the server so as to remove command freezing. This commit also adds a config version variable so users are notified when to regenerate their configs.

* Rename GeyserConfiguration.checkGeyserConfiguration()
2020-05-20 22:43:22 -05:00
rtm516 7b3893ff78
Fixed empty listen IPs breaking automatic config (#519) 2020-05-08 22:58:29 -05:00
RednedEpic 3370ad3db9 Merge branch 'master' into feature/sounds 2020-05-02 23:06:53 -05:00
rtm516 99880c7d46
Adds a message if someone runs one of the plugins directly (#457)
* Added Bukkit run message

* Added the rest of the plugins run messages

* Renamed plugin run classes to main

* Added gui message if the jar isnt run from command line

* Updated help message

* Changed wording for bukkit
2020-04-30 01:40:45 -05:00
RednedEpic 1fbb755d26 Merge branch 'master' into sound-master 2020-04-29 15:14:25 -05:00
RednedEpic 31be608038 Add block break sounds for blocks with 0 hardness, and refactor some things
The refactors in this commit go a bit beyond the scope of what the sound/effects branch was meant to accomplish, however most of these changes are necessary so chunk caching could be reintroduced for the standalone version. The chunk caching here allows for us to get the block ID before the block was broken, and in the future allow us to implement newer features. Chunk caching is optional (and disabled by default) as on non-Bukkit versions, it can eat up a lot of RAM with many players online.
2020-04-29 15:01:53 -05:00
rtm516 697e478e04
Fixed Sponge plugin user auths config loading (#445) 2020-04-27 15:49:05 -05:00
rtm516 7f29710006
Automatic ip & port for plugins (#438)
* Automatically set Bukkit ip and port

* Automatically set Velocity ip and port

* Automatically set BungeeCord ip and port

* Moved the config init line to prevent config issues

* Automatically set Sponge ip and port
2020-04-27 15:45:14 -05:00
RednedEpic bab2b4a420 Pull command descriptions from Bukkit and Sponge versions when listing commands
This allows the description of the commands to display when listing the commands in bedrock by tab-completing. This is currently only available on Sponge and Bukkit versions as there is no support in BungeeCord and Velocity to get these values. This data is also not sent in any packet, so we cannot retrieve that from standalone either.
2020-04-19 18:08:14 -05:00
DoctorMacc bfb3fb4258 Update various copyright dates 2020-04-15 15:39:21 -04:00
rtm516 c51a48221b Merge remote-tracking branch 'origin/master' into server-language-processing 2020-04-09 13:58:45 +01:00
rtm516 c809ddb618 Renamed translation method and cleaned up variable declaration 2020-04-05 10:13:47 +01:00
rtm516 845c914492 Moved loading and added default locale config option 2020-04-05 02:58:23 +01:00
RednedEpic e504d0f467 Don't minimize the jar for plugin versions (Actually fixes #265) 2020-04-04 18:00:30 -05:00
RednedEpic 21dc2e8362 Add Geyser reload command and commands for platforms (Closes #141) 2020-03-17 11:43:09 -05:00
RednedEpic c7f1f0b71f Shade in fastutil for Sponge and relocate to shaded package (Fixes #198) 2020-03-10 18:40:22 -05:00