Commit Graph

2184 Commits

Author SHA1 Message Date
15ecbf4345 Merge pull request 'Update Velocity (might fix Command problems) and fix PluginMessages...' (#4) from fix-pluginmessages into master
Reviewed-on: https://steamwar.de/devlabs/SteamWar/Velocity/pulls/4
Reviewed-by: YoyoNow <jwsteam@nidido.de>
2024-08-20 08:14:11 +02:00
5e3bbcd427 Fix command signature issues. 2024-08-20 08:03:18 +02:00
a6c79db07b Remove filter checks to receive PluginMessages unfiltered. 2024-08-18 15:32:08 +02:00
6e33bc6c17 Merge remote-tracking branch 'refs/remotes/upstream/dev/3.0.0' 2024-08-18 15:28:10 +02:00
00ed2284ec Use the default Minecraft port instead of custom one (#1277) 2024-08-10 15:12:19 -04:00
dd7b8b4d8f Update 1.21 protocol to include 1.21.1 release (#1402) 2024-08-08 15:47:18 +01:00
51468530a9 [ci skip] add adventure-key and text-minimessage javadoc links (#1394) 2024-07-25 23:53:22 -05: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
e0f74a8493 Bump Adventure to 4.17 (#1376) 2024-07-10 23:15:28 -05:00
79a5634dfe [ci skip] fix some trivial javadoc warns 2024-07-10 23:05:24 +01: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
01208bb359 Indicate NoChatReports support in ServerPing 2024-06-24 18:36:32 +02:00
410636a305 [ci skip] Add Issue Forms (#1364)
* copy issue contact links from Paper

* bug report template

* bug report template fixes

* why no code block

* feature request issue template and fixes to bug report template

* make fields required
2024-06-23 11:57:40 -05:00
fa88aaae52 Always unsign chat. 2024-06-21 12:48:58 +02:00
2da400a267 Merge pull request 'Implement Velocity PRs #998 #1246 and #1309 (io_uring, tcp_fastopen and PluginMessage race condition fix)' (#3) from io_uring into master
Reviewed-on: https://steamwar.de/devlabs/SteamWar/Velocity/pulls/3
Reviewed-by: YoyoNow <jwsteam@nidido.de>
2024-06-19 12:06:10 +02:00
8103135dfb Fix type 2024-06-19 10:21:36 +02:00
cfabff7288 Implement Velocity PRs #998 #1246 and #1309 (io_uring, tcp_fastopen and PluginMessage race condition fix) 2024-06-19 10:11:32 +02:00
2f5a27a708 Fix CI 2024-06-19 09:47:18 +02:00
fdfe8bcc4b Fix CI 2024-06-19 09:40:58 +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
a19fd8db74 Add UpdateTeamsPacket 2024-06-16 21:27:13 +02:00
e63d71423d Add UpdateTeamsPacket 2024-06-16 21:24:06 +02: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
a7afe35fab Rebuild 2024-06-16 13:25:07 +02:00
56d6339313 Fix JVM 2024-06-16 13:18:29 +02:00
2475572573 Add steamwarci.yml 2024-06-16 12:52:43 +02: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
46cf9be297 [ci skip] Fix Javadocs of CookieRequestEvent (#1339) 2024-05-30 17:21:26 +01: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