0cd069ecbf
Fix exception while serializing JsonArray ( #1426 )
2024-09-11 12:40:25 -07:00
784806848d
Do more speculative VarInt reading optimizations ( #1418 )
2024-09-05 00:00:34 -04:00
46f29480bd
Delete now-unused MinecraftVarintLengthCompositeEncoder
2024-09-03 00:40:31 -04:00
f034c0277d
Have one MinecraftVarintLengthEncoder, not two
...
Applies more to the margins (such as login phase and server list ping), but every bit does help.
2024-09-03 00:33:57 -04:00
52ae735ea3
Change LoginInboundConnection queue type to something that is actually thread-safe
2024-09-02 20:47:01 -04:00
55f9509c6e
Add a MinecraftVarintLengthCompositeEncoder for backend connections ( #1419 )
...
This is an optimization that has been in BungeeCord for some time, but it's an idea that makes a lot of sense: avoid a memory copy when we don't need to do one. The OS will hopefully be smart enough to use `writev()` or similar for this.
2024-09-02 02:25:04 -04:00
67fb3b70a4
Increase readComponent string size limit to 262,143 for 1.13-1.20.2 ( #1409 )
2024-08-31 17:11:54 -04:00
6100e675af
Switch to alt throw path for reading login message IDs ( Fixes #1370 )
...
There is little expectation that we should get a -ve number in here, but
it is sadly seen in the wild. We will use an alternative exception path rather
than returing a magic number to indicate an invalid value.
once primative classes arrive, this should probably be written to use those
for passing up the result.
2024-08-21 17:06:11 +01:00
00ed2284ec
Use the default Minecraft port instead of custom one ( #1277 )
2024-08-10 15:12:19 -04:00
f6a47ae8b0
[ci skip] update docs url ( #1393 )
2024-07-24 18:25:41 -05:00
09f687e5d5
feat: Add server registered/unregistered events ( #1386 )
...
* feat: Add server registered/unregistered events
* Annotate new API with `@Beta`
* Migrate from classes to records
* Add null checks
* Fix code style indent
* Add links in documentation
* Fix docs indent
---------
Co-authored-by: powercas_gamer <cas@mizule.dev >
2024-07-24 18:13:21 -05:00
44b1e0c6f9
Print correct exception when hotspot dump fails
2024-07-22 15:42:42 +01:00
a4476253ab
End bundle session on server switch ( #1385 )
2024-07-19 20:34:46 +02:00
d999ee2058
Fix PlayerConfigurationEvent only being called for initial configuration on 1.20.5+
2024-07-14 16:29:30 +02:00
ebc418f6cc
Do not use classes from io.netty.util.internal
...
In this case, we don't even need a concurrency-friendly MPSC queue, since this code only ever gets run in the event loop associated to the channel, so a simple `ArrayDeque` is enough for our needs.
2024-07-13 21:50:27 -04:00
d5e7fa5b84
Add ServerResourcePackRemoveEvent ( #1379 )
...
* Add ServerResourcePackRemoveEvent
* Add nonnull check
* Fix indentation
* Fix import code style
2024-07-12 05:02:00 -05:00
6073f698e2
Add PlayerConfigurationEvent and PlayerEnteredConfigurationEvent ( #1371 )
...
* Configuring the player (i.e. sending resource packs) should now be done in the new PlayerConfigurationEvent.
* The new PlayerEnteredConfigurationEvent is called when a player acknowledged the switch to configuration state.
* The PlayerEnterConfigurationEvent is no longer called twice. It is now called when the backed wants to reconfigure the player.
* The PlayerFinishConfigurationEvent should no longer be used to configure the player (i.e. sending resource packs). This is because since 1.20.5 the backend server can't send keep alive packets between switching state anymore and the connection will thus time out.
2024-07-12 11:16:42 +02:00
82e81909d8
Add handling for KickPlayerRaw
2024-07-10 23:00:20 +01:00
5154f02910
Improved fix for #1372
...
Realized that the precondition that gets violated happens way too early, in `Maps.uniqueIndex()`.
2024-07-05 22:07:15 -04:00
6224adf70a
Don't try to load a candidate plugin with the same ID more than once
...
Fixes #1372 . Honestly, this was an oversight that I'm somewhat surprised that nobody caught until recently.
2024-07-05 22:01:31 -04:00
4eae510fb7
Don't forward chat acknowledgement if the client didn't acknowledge any chat
2024-07-04 21:34:47 -07:00
c6bb15c69b
Fix: only treat command as signed if it has signatures
...
The Vanilla client will send 'last seen' even if the message is not signed, so this is much stricter than it needs to be. This should allow commands without any signed arguments to be modified/consumed by the proxy.
2024-07-04 21:34:47 -07:00
077968089e
Fix: pass through last seen update in a few missing places
...
This is hardly useful in the case of signed player chat messages, as these fundamentally cannot be spoofed or modified - however, for any unsigned input (particularly commands without any signed arguments), 'last seen' updates are still required and should be passed through in a consistent state.
2024-07-04 21:34:47 -07:00
b5ee9dd20a
Capture a consistent and reusable 'last seen' state for use in command packets
2024-07-04 21:34:47 -07:00
ec9745769f
Explicitly reject consuming signed command when denied by event
...
This would fail down the line anyway due to inconsistent chat state (if holding a 'last seen' update)
2024-07-04 21:34:47 -07:00
3b7ffa837e
Don't require command to be signed to pass it through as-is
2024-07-04 21:34:47 -07:00
92c48507eb
Extract common command handler paths
2024-07-04 21:34:47 -07:00
be73131d5d
Remove unneeded check
...
SessionCommandHandler is only constructed for >= 1.19.3.
2024-07-04 21:34:47 -07:00
6b03b28a61
Refactor ChatQueue to track and expose general chat state
2024-07-04 21:34:47 -07:00
aa4e8780bd
Assign ServerConnection to Player before enabling auto read ( #1309 )
2024-07-04 10:57:30 +02:00
9d25d309d3
feat: Add basic API for server links ( #1353 )
...
* feat: add basic server links API
* refactor: more precondition checking on links
* refactor: remove whitespace
* refactor: adjust method order, JDs in ServerLink
* refactor: remove "throws" from constructors
* refactor: add @NotNull annotations
* refactor: requested changes
* refactor: just use `List#copyOf`
2024-06-18 09:29:58 -05:00
e60e2063a8
Add Configuration State API ( #1261 )
...
* Implement Configuration State events
* Implement PlayerFinishedConfigurationEvent
* Fixed PlayerFinishConfigurationEvent execution
* Apply suggestions
* Fix keep alive when blocking PlayerFinishConfigurationEvent
* Add ServerConnection to configuration events
* Separate PlayPacketQueueHandler to fix AutoReadHolderHandler
---------
Co-authored-by: Gero <gecam59@gmail.com >
2024-06-16 10:56:09 -05:00
350ea7f31e
1.21 support ( #1338 )
2024-06-12 20:33:01 +02:00
2d015cdf5c
Add support for canceling ProxyPingEvent ( #1264 )
...
* Added support for canceling ProxyPingEvent
2024-06-08 14:28:33 -05:00
07f1f9e7bd
Add Cookie API ( #1313 )
2024-05-30 16:52:30 +01:00
deacdb6228
Fix StackOverflowError in CommandGraphInjector when using redirects ( #1335 )
2024-05-30 13:40:07 +02:00
1c36b66dcb
Fix null or empty has handling in LegacyResourcepackHandler ( #1331 )
2024-05-28 14:53:20 +01:00
42d4288334
Fix tab completions not being forwarded to backend if proxy command exists but is inaccessible ( #1329 )
2024-05-26 13:19:37 +01:00
71bb0246a8
Fix query listener reload bug ( #1322 )
2024-05-23 19:12:28 +01:00
a02b601b6c
Pass through packets in config state ( #1326 )
2024-05-23 19:09:53 +01:00
afd8b55fb5
Fix permission for velocity dump command ( #1318 )
2024-05-09 18:56:03 -07:00
1228f14742
Hotfix cancelling unsigned 1.20.6 commands
2024-05-03 19:20:12 +01:00
368d1a7c12
Do not send empty upsert player info packets
...
There is no harm in this, but seemingly, some common mod blows up on this, and,
well, why eat buffer?
2024-05-01 18:03:37 +01:00
5cdcf86cf9
Properly pass connection exceptions to the logger
2024-05-01 17:22:18 +01:00
2534412be4
remove access controller ( #1306 )
2024-04-24 13:13:09 -07:00
f98c522fa6
Make copyright year a placeholder ( #1305 )
...
* make copyright year a placeholder
* review
2024-04-24 13:12:59 -07:00
7e45c17b04
Limit maximum amount of known packs by vanilla defaults ( #1303 )
2024-04-24 10:50:33 +01:00
b50f9eceff
Fix command argument types for 1.20.5
2024-04-24 09:39:22 +01:00
3afd687bf1
Handle KnownPacks packet required for 1.20.5 vanilla connections ( #1302 )
2024-04-24 06:55:21 +01:00
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