3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-26 16:12:50 +01:00
Commit graph

1473 Commits

Autor SHA1 Nachricht Datum
UserNugget
7e45c17b04
Limit maximum amount of known packs by vanilla defaults (#1303) 2024-04-24 10:50:33 +01:00
Shane Freeder
b50f9eceff
Fix command argument types for 1.20.5 2024-04-24 09:39:22 +01:00
Jeroen B
3afd687bf1
Handle KnownPacks packet required for 1.20.5 vanilla connections (#1302) 2024-04-24 06:55:21 +01:00
Adrian
8f4adb1cec
1.20.5 Support (#1198)
Added support to Minecraft 1.20.5 (Release Candidate 3)

* Initial 1.20.5 update

* Snapshot 24w03a

* Handle Transfer Handshake intent

* Snapshot 24w03b

* Implement PreTransferEvent

* 24w04a

* Updated EncryptionRequestPacket, JoinGamePacket and ServerDataPacket to 24w04a

* Snapshot 24w05a

* Snapshot 24w05b

* Snapshot 24w06a

* Added migration to add new configuration option

* Snapshot 24w07a

* Snapshot 24w09a

* Snapshot 24w10a

* Snapshot 24w12a

* Snapshot 24w14a

* 1.20.5-rc1

* fix unsigned commands

* fix NPE

* fix respawn packet id

* 1.20.5 Release Candidate 2

* Restored old ConnectionHandshakeEvent constructor

* Added `-Dvelocity.strictErrorHandling` system property

* 1.20.5 Release Candidate 3

---------

Co-authored-by: Gero <gecam59@gmail.com>
2024-04-22 21:12:25 -05:00
Adrian
be678840de
Added support for components when using CommandSyntaxException (#1295) 2024-04-21 13:49:44 -05:00
Shane Freeder
3b6419997c
Align default prevent proxy connection settings with the default config file
This option generally creates a bunch of oddities in many setups, defaulting to false
as per the default toml config, is probably the better option here
2024-04-20 13:57:37 +01:00
Adrian
9e42049a67
Improved PluginMessaging API (#1254)
* Improved PluginMessaging API by adding a method to easily encode the data to be sent

* Added javadocs

* Implement PluginMessageEncoder
2024-04-08 12:24:20 -05:00
Limbo
a72aef526b
New Crowdin updates (#1275) 2024-04-06 18:22:29 +01:00
Shane Freeder
3bce4d8576
Succesful is not an extended state 2024-04-02 14:02:34 +01:00
Shane Freeder
d4077ddc1a
only send extended resource pack states on supported versions 2024-04-02 13:53:22 +01:00
Shane Freeder
ad50582836
Send downloaded/successful resource pack status when already applied (Fixes #1280) 2024-04-02 13:20:13 +01:00
Adrian
615b575d91
[ci skip] Add plugin version info to event exception handler (#1263) 2024-03-23 11:51:44 -07:00
Limbo
75d6dcc1b8
New Crowdin updates (#1201)
* New translations messages.properties (Romanian)

* New translations messages.properties (French)

* New translations messages.properties (Spanish)

* New translations messages.properties (Arabic)

* New translations messages.properties (Bulgarian)

* New translations messages.properties (Czech)

* New translations messages.properties (Danish)

* New translations messages.properties (German)

* New translations messages.properties (Finnish)

* New translations messages.properties (Hebrew)

* New translations messages.properties (Hungarian)

* New translations messages.properties (Italian)

* New translations messages.properties (Japanese)

* New translations messages.properties (Korean)

* New translations messages.properties (Dutch)

* New translations messages.properties (Polish)

* New translations messages.properties (Russian)

* New translations messages.properties (Slovak)

* New translations messages.properties (Albanian)

* New translations messages.properties (Swedish)

* New translations messages.properties (Turkish)

* New translations messages.properties (Ukrainian)

* New translations messages.properties (Chinese Simplified)

* New translations messages.properties (Chinese Traditional)

* New translations messages.properties (Vietnamese)

* New translations messages.properties (Portuguese, Brazilian)

* New translations messages.properties (Norwegian Nynorsk)

* New translations messages.properties (Estonian)

* New translations messages.properties (Tagalog)

* New translations messages.properties (Chinese Traditional, Hong Kong)

* New translations messages.properties (Norwegian Bokmal)

* New translations messages.properties (Serbian (Latin))

* New translations messages.properties (German)

* New translations messages.properties (Finnish)

* New translations messages.properties (Chinese Traditional)

* New translations messages.properties (German)

* New translations messages.properties (Finnish)

* New translations messages.properties (Korean)

* New translations messages.properties (Chinese Traditional)

* New translations messages.properties (Ukrainian)

* New translations messages.properties (French)

* New translations messages.properties (French)

* New translations messages.properties (Polish)

* New translations messages.properties (French)

* New translations messages.properties (Chinese Simplified)

* New translations messages.properties (Dutch)

* New translations messages.properties (Dutch)

* New translations messages.properties (Swedish)

* New translations messages.properties (Swedish)

* New translations messages.properties (Korean)

* New translations messages.properties (Czech)

* New translations messages.properties (Czech)
2024-03-17 22:20:03 -07:00
Joo200
8891faa52c
Added event when a command is executed from Velocity (#984)
* feat: added event for command invocation

This event is called when a command invocation attempt on the proxy occurs

* Fix javadoc issue
2024-03-05 10:11:17 -05:00
Adrian
c34dafe2a2
Implement ProtocolState API (#1224)
* Implement ProtocolState API

* Renamed method to #getProtocolState

* Added sinceMinecraft javadoc tag

* Fixed PreLoginEvent#getUniqueId documentation
2024-03-03 16:21:22 -05:00
Shane Freeder
62c6ec044e
Make sure that the backend server knows the pack application was successful
accepted, is just the first expected state, we also need to tell that the pack
was actually applied on the client in order to allow it to progress in the connection
process
2024-03-02 15:06:32 +00:00
Maxim Breitman
82189a6a21
Tiny rework of Protocol Version API (#1260) 2024-03-01 22:42:02 -05:00
Maxim Breitman
af09677f60
Fixed disconnection reason display due to outdated client version (#1259) 2024-02-29 14:41:05 -05:00
Adrian
74c932e579
Fix sending keep alive response to wrong backend server (#1253) 2024-02-24 14:24:06 -05:00
Adrian
409ab7b118
[ci skip] Add javadocs warnings about unsupported operations (#1250)
* Document possible blank spaces in the command of the CommandExecuteEvent

* Added Javadocs warning about unimplemented methods in Velocity

* Improved KickedFromServerEvent documentation

* Fixed `apiNote` javadoc generation
2024-02-23 14:11:42 -05:00
Adrian
7ca0689989
Fixed duplicate sending of resource packs responses to backend server (#1249)
Also fixes the sending of SUCCESSFUL responses to the backend server that will apply a resource pack in case Velocity has already applied one or more resource packs to the player
2024-02-22 12:48:36 -05:00
Adrian
2cf18b0a6d
Fix login disconnect from 1.20.4 (#1245) 2024-02-16 07:34:01 -05:00
Adrian
ecf936f356
Create a new HttpClient per connection (#1243)
* Create a new HttpClient for each connection

If the instance is using Java 21, the HttpClient resources will be cleaned using its AutoCloseable interface
2024-02-15 09:59:34 -05:00
Adrian
ef861819e3
Do not apply a resource pack that has already been applied (#1236)
* Do not apply a resource pack that has already been applied

* Throw IllegalStateException in case of applying a resource pack already applied from the API

* Updated some dependencies

* Added support for ServerResourcePackSendEvent resource pack modification
2024-02-11 12:00:07 -05:00
Gero
15897c5258 Fix race condition when switching client from config to play state 2024-02-10 23:28:08 +01:00
itsTyrion
d8bb4e97e4
Add API for custom chat completions like on Paper (#1232)
* Add API for custom chat completions like on Paper, renamed enum constant to match its function, NMS and wiki-vg

* add null and version checks
2024-02-09 16:23:16 -05:00
Adrian
7bff6b19eb
Use sealed types in command interfaces (#1239)
* Use sealed types in command interfaces

* Some minor code fixes
2024-02-09 14:15:53 -05:00
Julian Vennen
6506c4cc59
Remove duplicate space from log pattern (#1238) 2024-02-09 10:38:22 -05:00
Kezz
e1f3b6b66f
Expose connecting player's UUID in the PreLoginEvent (#1009)
* feature: Expose connecting player's UUID in the PreLoginEvent

* Applied suggestions

* Updated the javadocs compatible version to Java 17

---------

Co-authored-by: Adrian <adriangonzalesval@gmail.com>
2024-02-09 10:23:47 -05:00
Adrian
d7799eaf60
Ensure that we send a response to the correct server when in flight (#1234)
* Ensure that we send a response to the correct server when in flight

* The rest of the codebase treats the hash as a String...

As does Mojang.

* Support sending the resource packet response to the in-process connection in the ModernResourcePackHandler

---------

Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2024-02-08 11:15:14 -05:00
Adrian
cbd07b1434
Refactor ResourcePacks handling (#1225)
* Initial ResourcePack refactor

* Implement sendResourcePacks method

* Initializes the ResourcePackHandler at player initialization

* Move adventure to velocity resource pack conversion to the same class

* Added some internal resource pack documentation

* Refactored Modern ResourcePack handling

* Handle RemoveResourcePackPacket from backend server

* Fixed license

* Use removeIf instead of manual iteration

* Improve ModernResourcePackHandler

* fix hash conversion

* bundle resource packs

* keep old constructors of PlayerResourcePackStatusEvent

* add @Nullable to PlayerResourcePackStatusEvent#getPackId

* Use a single instance of BundleDelimiterPacket

* Throw UnSupportedOperationException on operations not supported by LegacyResourcePackHandler

* Use a single instance on empty packets

* Handle active packet bundle sending from backend server in case of sending a packet bundle of resource packs

* Improve packet bundling

* Fixed login for players with version 1.20.2

---------

Co-authored-by: Gero <gecam59@gmail.com>
2024-02-08 08:51:45 -05:00
itsTyrion
10430a2115
Validate plugin dependency IDs in accordance to plugin ID requirements (#1231) 2024-02-07 21:30:55 -05:00
Shane Freeder
5956751284
Bump client connection state before sending disconnection packets 2024-02-01 12:59:47 +00:00
Adrian
38558783bb
Fixed client brand handling for players with versions 1.20.2 or higher (#1223)
This commit fixes the sending of the client brand to the backend server and the execution of the PlayerClientBrandEvent from players with versions 1.20.2 or higher
2024-01-29 09:13:17 -05:00
Riley Park
4080ee2eaa
Extract player data forwarding to separate class (#1210)
* Extract player data forwarding to separate class

* Use modern switch statement
2024-01-28 22:05:21 -05:00
Riley Park
b9b11665b9
Refactor built-in commands to use Brigadier (#1208)
* Refactor /velocity command to use Brigadier

* Added default usage message and code cleanup

* Reimplemented callback subcommand

* Fixed execution of the callback subcommand when all permissions of the main command subcommands are denied

* Migrated callback subcommand to its own command

* Migrated server command

* GList, Send and Server command cleanup

---------

Co-authored-by: Adrian <adriangonzalesval@gmail.com>
2024-01-22 18:01:49 -05:00
Riley Park
5afcd72bbd
Refactor bossbar implementation (#1209)
* Refactor bossbar implementation

* Move to adventure package

* Use AutoService instead of manual service declaration

---------

Co-authored-by: Adrian <adriangonzalesval@gmail.com>
2024-01-21 17:56:08 -05:00
powercas_gamer
5f27edf3c2
Fix "Add -haproxy-protocol startup parameter" (#1216)
This reverts commit b23c2c6e1a.
2024-01-21 15:25:34 -05:00
Adrian
b23c2c6e1a
Revert "Add -haproxy-protocol startup parameter" (#1214) 2024-01-21 11:11:02 -05:00
冰砚炽
363e3a7f94
Add -haproxy-protocol startup parameter (#1136) 2024-01-21 10:47:40 -05:00
Shane Freeder
283005c8bc
Fix fat finger 2024-01-21 11:48:37 +00:00
Shane Freeder
f6fbd25805
Downgrade severity of handling several incoming user input packet states 2024-01-21 11:47:14 +00:00
Andrew Steinborn
953ab6d8e7
Implement click callback provider (#1029) 2024-01-20 16:58:00 -05:00
Adrian
46d018c0f2
Pass the correct virtual host port during the handshake (#1205) 2024-01-20 07:27:41 -05:00
Adrian
d4a661870e
Fixed possible ConcurrentModificationException when iterating across TabList entries (#1204) 2024-01-20 10:12:29 +00:00
pop4959
523d750f2b
Implement some missing resource pack API (#1206) 2024-01-20 10:11:05 +00:00
Riley Park
0993ce2f86
Improve protocol version checking (#1203)
* Improve protocol version checking

* chore: since 3.3.0
2024-01-18 17:32:42 -08:00
Adrian
2ac8751337
Updated the packet classes to include the "Packet" suffix (#1202)
* Updated the packet classes to include the "Packet" suffix

* Fixed test checkstyle
2024-01-18 12:25:22 -08:00
ZoneTwelve
75e24a0c59
l10n: Traditional Chinese Support (#1158)
* update: zh_TW translation

* update: small unchanges

* Update messages_zh_TW.properties

Replace 兼容 with 相容
2024-01-18 10:13:23 -08:00
Aaron
eabff2020f
fix legacy console disconnect messages (#1197) 2024-01-18 10:10:30 +00:00
Adrian
c7c65e3339
Fixed unknown status code error (#1196) 2024-01-17 17:00:39 +00:00
Adrian
6d7335b21f
Fully replaced AsyncHttpClient (#1194) 2024-01-17 15:20:27 +00:00
Shane Freeder
b22b2dc458
Migrate to using built-in http client (#1192) 2024-01-17 15:02:36 +00:00
VelVeV
fe052e5163
Fix tablist header and footer desync (#1103) 2024-01-16 13:19:45 +00:00
Spongecade
f8cdf4fa1a
[ci skip] Update Minecraft wiki references (#1092)
The Minecraft Fandom wiki has been forked to a new domain: minecraft.wiki. Learn more here: https://minecraft.wiki/w/Minecraft_Wiki:Moving_from_Fandom. This PR updates all references accordingly.

Let me know if you want me to open this PR on other branches!
2024-01-16 13:07:14 +00:00
WonderfulPanic
dab64ebb59
Fix player list header/footer not sending translated version (#1186) 2024-01-16 13:06:05 +00:00
EpicPlayerA10
08c03aaea2
Fix chat race condition (#1042) 2024-01-11 11:44:16 +00:00
Mgazul
02c4d61fc6
Add ModernForgeConnectionType to supports Forge-1.20.2+ (#1176) 2024-01-11 11:24:11 +00:00
Adrian
a008464ede
Improved configuration migration (#1111) 2024-01-11 10:38:00 +00:00
Adrian
cc906000bc
Fixed Legacy Ping handling (#1180) 2024-01-11 06:57:03 +00:00
0xAda
408b420af7
Use System.nanoTime in place of System.currentTimeMillis when comparing timestamps. (#1174) 2024-01-04 12:35:03 -05:00
Alexander Städing
897ff81915
Clean up JavaPluginLoader and VelocityPluginModule (#1140) 2024-01-04 16:04:25 +00:00
Adrian
28acf9eac1
Removed console legacy color support (#1105)
Co-authored-by: Shane Freeder <1228900+electronicboy@users.noreply.github.com>
2024-01-04 15:40:11 +00:00
Pancake
de57563eab
Hide ip address in initial and legacy connections (#1025) 2024-01-04 13:50:47 +00:00
Timon
00ef92bc5c
Restore nullability for displayName in UpsertPlayerInfo (#1172)
This makes the UpsertPlayerInfo's displayName truly nullable as before the ComponentHolder was introduced.
2023-12-28 15:37:31 +00:00
Adrian
6fd03d6f5c
Added static methods to create ArgumentBuilders directly in the BrigadierCommand class (#1161) 2023-12-27 13:33:44 -05:00
Gero
9450e6600c Fix race condition when switching from config to play state 2023-12-23 10:58:32 +01:00
Spottedleaf
a3a6b3fd07 Correctly version component serialization
1.20.3+ has some additional options (EMIT_COMPACT_TEXT_COMPONENT,
EMIT_HOVER_SHOW_ENTITY_ID_AS_INT_ARRAY, VALIDATE_STRICT_EVENTS)
that should be disabled in older versions.

The OptionState is constructed manually due to
https://github.com/KyoriPowered/adventure/issues/1015,
which is a bug that makes JSONOptions.BY_DATA_VERSION
use incorrect options for 1.20.3+ options.

This also fixes incorrect building of the ping serializer, as
it should only use the component serializer to serialize
Component.class and nothing else.
2023-12-22 23:20:43 +00:00
Gero
a54d8c681f Support conversion of mixed json array components 2023-12-19 12:13:11 +01:00
Shane Freeder
79fe8c8005
[ci skip] Fix internal javadoc 2023-12-14 14:33:10 +00:00
Gero
e703e9d2b8 Fix SessionPlayerChat packet registration 2023-12-14 14:20:16 +00:00
Gero
b00d3bcf5b Fix TabCompleteResponse 2023-12-14 14:20:16 +00:00
Gero
32228e85ab fix disconnect decoding 2023-12-14 14:20:16 +00:00
Gero
8a6c20ee32 Fix NPE in ComponentHolder 2023-12-14 14:20:16 +00:00
Gero
5b8bba4b29 fix binary -> json component 2023-12-14 14:20:16 +00:00
Gero
702dad25c4 don't clear applied resource pack for 1.20.3 in config state 2023-12-14 14:20:16 +00:00
Gero
058aee259a fix resource pack status 2023-12-14 14:20:16 +00:00
Gero
519bf5ee04 Fix title and system chat packets 2023-12-14 14:20:16 +00:00
pkt77
eaa83378d7 Fix Disconnects 2023-12-14 14:20:16 +00:00
pkt77
eb03feebd9 Fix TabList NPE 2023-12-14 14:20:16 +00:00
pkt77
efcfeb3e53 1.20.3 working & checkstyle fixes 2023-12-14 14:20:16 +00:00
Gero
814b53f12c WIP 1.20.3 2023-12-14 14:20:16 +00:00
Adrian
a6d90105ec
Update Configurate to 4.1.2 and include Configurate 3 (#1157) 2023-12-11 15:16:44 +00:00
ishland
c8ca28cd30
fix: Respawn packet codec for 1.20.2+ (#1156) 2023-12-11 15:11:22 +00:00
Shane Freeder
07a525be7f
Correct writing of brand string 2023-11-30 23:02:43 +00:00
AoElite
e5176717a9
fix backend not receiving brands from 1.20.2 clients (#1147) 2023-11-30 20:18:40 +00:00
Andrew Steinborn
8dcc7ee37e Fix 2023-10-29 15:29:43 -04:00
Andrew Steinborn
2ec830f874 Apply some changes from 5.0.0 2023-10-29 14:54:50 -04:00
Adrian
2e8ef8b2ca
Fire PlayerSettingsChangedEvent event when PlayerSettings are provided in the Configuration phase (#1118) 2023-10-29 14:44:04 -04:00
Luccboy
f87b05a487
Allow sending all players from current server (#1133) 2023-10-29 14:42:40 -04:00
Andrew Steinborn
67d5e77b1f Revert bad bug fix 2023-10-29 00:56:30 -04:00
Luccboy
9b71564c5b
Improve tab completion of glist and send command (#1126) 2023-10-28 23:21:15 -04:00
Angelillo15
81145e45df
Add send command (#1073) 2023-10-28 20:14:19 -04:00
Andrew Steinborn
7f8edf8c77 Fix typo in VelocityRegisteredServer#ping() 2023-10-28 19:53:49 -04:00
Andrew Steinborn
74033addbe Fix bug in VelocityRegisteredServer#ping() 2023-10-28 19:53:29 -04:00
Andrew Steinborn
ae63da6836 Merge branch 'dev/3.0.0' of github.com:PaperMC/Velocity into dev/3.0.0 2023-10-27 21:57:44 -04:00
Andrew Steinborn
c6cc6098a6 Make EventTypeTracker actually thread-safe
Although I don't think anyone has actually triggered this bug in practice, we should still fix this.
2023-10-27 21:57:34 -04:00
JNNGL
b7853d648f
Add kqueue support (#996) 2023-10-27 17:32:22 -04:00
James58899
660160e858
Support plugin message in configuration stage (#1096) 2023-10-27 17:13:13 -04:00
Andrew Steinborn
bbdeb3ec58 Revert "Modify MinecraftCompressorAndLengthEncoder to handle 8MiB outgoing packets like vanilla supports now"
This reverts commit 7e932eaad4.

Yikes, I broke something. Need to rethink this approach.
2023-10-27 16:10:39 -04:00