13
0
geforkt von Mirrors/Velocity
Commit graph

345 Commits

Autor SHA1 Nachricht Datum
Andrew Steinborn
2d2258d667 Misc cleanup 2018-09-29 23:57:40 -04:00
Andrew Steinborn
eddf01fc32 Reduce duplication between annotation processor and proxy. 2018-09-29 23:28:44 -04:00
Andrew Steinborn
33a2cb7bad Less verbose version 2018-09-29 14:54:46 -04:00
Andrew Steinborn
5af09f906a Fix a bug where it would try to register legacy channels(!) on 1.13+ 2018-09-29 14:53:04 -04:00
Andrew Steinborn
a44bb3b048 Remove more junk 2018-09-29 14:37:42 -04:00
Andrew Steinborn
75c3bb5ee6 Clean up vestigal stuff 2018-09-29 03:32:44 -04:00
Andrew Steinborn
97d541d146 Warn if someone tries to register the plugin instance as a listener 2018-09-29 03:15:49 -04:00
Andrew Steinborn
79d566bcee Finished the port to new session handler stuff 2018-09-29 02:55:52 -04:00
Andrew Steinborn
c7bd0d100e Started refactoring session handlers 2018-09-29 02:16:34 -04:00
Andrew Steinborn
6cd0a6b148 Introduce Channel#eventLoop() shorthand
This is such a common call that it makes a lot of sense to go ahead
and expose this.
2018-09-29 01:38:30 -04:00
Andrew Steinborn
5ab346a02b Don't tediously hardcode the names of channels if we can help it 2018-09-29 01:34:45 -04:00
Andrew Steinborn
f04599ae68 Clean up some plugin message channel code 2018-09-29 01:28:07 -04:00
Andrew Steinborn
f569a07b2e Move channel registrar to util 2018-09-29 01:25:24 -04:00
Andrew Steinborn
e6c178aae7 Cleaned up Java plugin loader 2018-09-27 15:52:31 -04:00
Andrew Steinborn
8c98395d51 Remove redundant contains check 2018-09-27 15:20:24 -04:00
Andrew Steinborn
731186ca10 Redesigned the /velocity command somewhat 2018-09-27 02:44:45 -04:00
Andrew Steinborn
d4910d9edc Remove potentially high-frequency usages of streams 2018-09-27 02:37:53 -04:00
Andrew Steinborn
63f22dc2de Extra clarity for server/MinecraftConnection naming 2018-09-27 02:35:10 -04:00
Andrew Steinborn
403fec13d8 Move UuidUtils test to api module 2018-09-27 02:33:47 -04:00
Andrew Steinborn
d639e47fbf Fix a number of issues with dependency resolution and add unit tests 2018-09-27 00:51:33 -04:00
Thomas Vanmellaerts
6f4b2c83b2
Delete EventUtil 2018-09-26 19:56:47 +02:00
Thomas Vanmellaerts
3acc00de5e
Move ChatResult to PlayerChatEvent and don't call event on spoofChatInput() 2018-09-26 19:50:36 +02:00
Thomas Vanmellaerts
d71f863045
Fire Event on spoofChatInput 2018-09-26 18:25:32 +02:00
Thomas Vanmellaerts
7598918d93
Add chat event 2018-09-26 13:07:03 +02:00
Andrew Steinborn
db5645f80e
Merge pull request #74 from Leymooo/properties
Allow to edit GameProfile properties.
2018-09-25 01:53:15 -04:00
Leymooo
46c02c9895 merge upstream 2018-09-24 12:40:48 +03:00
DoNotSpamPls
8242353934 Add an option in the config to change the query map 2018-09-24 11:34:17 +03:00
Andrew Steinborn
c89f3ea468 Remove scoreboard packets
We don't use these any more, and to be frank, it's kind of scary to
update anyway.
2018-09-24 02:04:12 -04:00
Andrew Steinborn
6c61aa49f3 Sanity: reset ping ID after getting the right KeepAlive 2018-09-22 20:38:59 -04:00
Andrew Steinborn
9e999e1e5a Maintain keep alives on the server connection, not on the client. 2018-09-21 23:19:12 -04:00
Luck
ea42f47c7b
Properly initialise console permissions using the PermissionsSetupEvent 2018-09-21 21:24:54 +01:00
Andrew Steinborn
ef578ff69b
Merge pull request #99 from lucko/feature/command-permissions
Implement optional permission check method for commands
2018-09-21 16:06:50 -04:00
Andrew Steinborn
ee917682e0
Title API (#95) 2018-09-21 15:58:47 -04:00
Andrew Steinborn
284f90183f Add missing null check here 2018-09-20 22:44:26 -04:00
Andrew Steinborn
d06028e0f8 ProxyServer#broadcast() 2018-09-20 22:43:58 -04:00
Luck
b805891d1f
Implement Player#spoofChatInput method 2018-09-20 21:51:22 +01:00
Luck
97e4ff91e7
Implement optional permission check method for commands
This allows plugins to customize which players can use their commands. For players without permission, the command is effectively invisible, and the handling is passed through to the backend server.
2018-09-20 21:48:14 +01:00
Andrew Steinborn
8763573ae6 Major improvements to tab complete support.
- Removed half-baked 1.13 support that didn't even work anyway. Perhaps
  in the future we could restore it by rewriting the available commands
  packet.
- Proxy commands now show up in tab complete responses where possible.
2018-09-20 16:39:50 -04:00
Andrew Steinborn
e577d6b6f5 Fix typo from PR. 2018-09-20 16:09:46 -04:00
Andrew Steinborn
95c761479f Make connections more robust 2018-09-19 21:29:07 -04:00
Andrew Steinborn
5c3e1adee2 Fix this annoying wart 2018-09-19 14:57:53 -04:00
Andrew Steinborn
50c27066e2 Import cleanup 2018-09-19 14:56:49 -04:00
Andrew Steinborn
1be508ed5e Merge branch 'master' into merged 2018-09-19 14:54:44 -04:00
Andrew Steinborn
50316f2f1c Merge branch 'master' into merged 2018-09-19 14:54:03 -04:00
Andrew Steinborn
c29b92c1bf Merge branch 'plugin-message-event' into merged 2018-09-19 14:52:28 -04:00
Andrew Steinborn
6bd3c70015
Merge pull request #93 from VelocityPowered/remove-legacychatcolorutils
Remove LegacyChatColorUtils
2018-09-18 17:27:38 -04:00
Andrew Steinborn
9016162a49 Optimize and clarify GS4 query handler. 2018-09-18 17:24:28 -04:00
Andrew Steinborn
d796f079f0 I forgot this. 2018-09-18 17:01:26 -04:00
Andrew Steinborn
c38b73863a Fix more scheduler issues 2018-09-18 16:59:13 -04:00
Andrew Steinborn
717c2afeb3 Update for changes in master. 2018-09-18 16:50:33 -04:00
Andrew Steinborn
89b5da25be Merge branch 'master' into registered-server 2018-09-18 16:50:13 -04:00
Andrew Steinborn
2bfb7061ee Turn StatusRequest into a singleton. 2018-09-18 16:48:21 -04:00
Andrew Steinborn
44b1b82b09 Try to avoid locking, use an actual concurrent data structure 2018-09-18 16:40:51 -04:00
Andrew Steinborn
a60c55007a Remove LegacyChatColorUtils
In most cases, you should only work with legacy text to deserialize or
serialize it for backwards compatibility or user configurations only.
2018-09-17 16:11:23 -04:00
Andrew Steinborn
037dceb599 Fix potential race 2018-09-16 15:35:25 -04:00
Andrew Steinborn
2a842bffbe Add missing null check 2018-09-16 15:32:51 -04:00
Andrew Steinborn
291069af80 Implement RegisteredServer#ping() 2018-09-16 13:59:44 -04:00
Andrew Steinborn
1f8152c3a5 ProxyServer#getServerInfo -> ProxyServer#getServer 2018-09-16 13:16:16 -04:00
Andrew Steinborn
8b94fe6ed2 Readd missing check 2018-09-16 02:41:35 -04:00
Andrew Steinborn
5ff36f1ae7 Merge branch 'master' into plugin-message-event
# Conflicts:
#	proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BackendPlaySessionHandler.java
#	proxy/src/main/java/com/velocitypowered/proxy/connection/client/ClientPlaySessionHandler.java
2018-09-16 02:35:38 -04:00
Andrew Steinborn
e1b2dc0d43 Introduce RegisteredServer API
This interface roughly maps the BungeeCord ServerInfo API. Accordingly,
this is a breaking API change, as many of the server-related events and
methods working with server info instances now provide/expect the
RegisteredServer interface instead.
2018-09-16 02:26:29 -04:00
Andrew Steinborn
88b7407aaf Fix rare NPE during server transition. Fixes #87 2018-09-15 13:37:30 -04:00
Andrew Steinborn
ab568405dd Cleaned up client plugin message logic. 2018-09-15 02:22:52 -04:00
Andrew Steinborn
84947564e4 Handle unexpected disconnects without a reason. 2018-09-15 01:46:28 -04:00
Andrew Steinborn
871319d679 Allow custom connection and read timeouts. 2018-09-15 01:26:54 -04:00
Andrew Steinborn
2b1d55a0fc Expose original server in ServerPreConnectEvent 2018-09-15 01:16:26 -04:00
Andrew Steinborn
e9568e1b6c Do not write plugin messages from the server if the player hasn't joined 2018-09-14 15:26:51 -04:00
Andrew Steinborn
9776675b70 Queue mod plugin messages instead. 2018-09-14 14:16:32 -04:00
Andrew Steinborn
496c579e46 Drop non-FML handshake packets if the game start process is not done. 2018-09-14 13:56:38 -04:00
Andrew Steinborn
0469aaa03a Fix several invalid connection closure issues. 2018-09-14 01:00:56 -04:00
PurpleIsEverything
cf46659d9e
Change to a 5 second connection timeout. 2018-09-13 22:53:23 -06:00
ShadowKitten
14590ca3ea
Add CONNECT_TIMEOUT_MILLIS to fix timeout errors. 2018-09-13 22:41:21 -06:00
Andrew Steinborn
d028c281c9
Merge pull request #76 from kashike/mrn
ServerPreConnectEvent#getInfo -> getServer
2018-09-14 00:17:25 -04:00
Andrew Steinborn
656987db03
Merge pull request #83 from dualspiral/fix/fml-plugin-messages
Only send FML/FML|MP plugin messages if the player has joined the server
2018-09-13 16:10:03 -04:00
Andrew Steinborn
6ca39e459e
Merge pull request #80 from dualspiral/fix/reset-on-first
Don't fire a FML reset packet on first login, set it as required for the second join after the first completes
2018-09-13 16:09:51 -04:00
Daniel Naylor
bcbf4cfd5f Only send FML/FML|MP plugin messages if the player has joined the server.
See #78
2018-09-13 10:33:27 +01:00
kashike
c3fd559ac2 ServerPreConnectEvent#getInfo -> getServer 2018-09-12 22:41:51 -07:00
Daniel Naylor
f10e9ac8e4 Don't fire a FML reset packet on first login, set it as required for the second join after the first.
Fixes #69
2018-09-12 10:21:28 +01:00
Leymooo
bc86a12c57 expand PreLoginComponentResult with force offline mode 2018-09-12 11:47:28 +03:00
Leymooo
d2b4b77134 Allow to edit GameProfile properties. 2018-09-11 19:00:34 +03:00
Leymooo
79bb43468f remove @NonNull, revert reindentation 2018-09-11 17:44:51 +03:00
Leymooo
74bf246c39 Add PostLoginEvent. Resolve #72 2018-09-11 16:15:54 +03:00
Daniel Naylor
df637cd598 Ensure the reset packet is not sent when Forge isn't expecting it.
Fixes #69
2018-09-10 18:15:13 +01:00
Andrew Steinborn
56a50c60b5 Add missing readable check 2018-09-09 15:05:27 -04:00
Andrew Steinborn
46aa8efb35 Improve reliability of varint decoder. 2018-09-09 14:37:43 -04:00
Andrew Steinborn
f2e3b5c7ec Increase plugin channels limit 2018-09-09 14:20:46 -04:00
Andrew Steinborn
0b1f95147a Implment simple backpressure support
In most cases this should only trigger on initial spawns and server
switches.
2018-09-08 01:00:21 -04:00
Andrew Steinborn
f75a51638c Enable TCP_NODELAY on Minecraft proxy connections too 2018-09-07 23:29:49 -04:00
Andrew Steinborn
a62238d073 Allow toggling announcing Forge support on and off 2018-09-07 18:18:38 -04:00
Andrew Steinborn
be9547612f Misc code cleanup 2018-09-07 17:54:59 -04:00
Andrew Steinborn
f8a3f24d6b Make sure to always forward on keep-alives from the client 2018-09-07 16:35:36 -04:00
Andrew Steinborn
30baee84bd Add the same check to ClientPlaySessionHandler 2018-09-06 16:11:44 -04:00
Andrew Steinborn
51a85d372b Add hasCompletedJoin() check as suggested 2018-09-06 16:09:13 -04:00
Daniel Naylor
e86968e899 Don't forward most packets while join is still in progress 2018-09-06 19:38:50 +01:00
Daniel Naylor
7a5857a0b2 Modded clients can connect to vanilla servers again. Modded to modded seems to need some work still... 2018-09-06 19:15:18 +01:00
Daniel Naylor
10da7daf1d Send the FML marker if we are not performing legacy forwarding. 2018-09-05 19:19:37 +01:00
Daniel Naylor
9888f6f6f0 First attempt at getting Forge working nicely with Velocity. 2018-09-05 19:08:29 +01:00
Andrew Steinborn
5a424f5cbb Include version in boot message 2018-09-04 01:39:51 -04:00
Andrew Steinborn
5e0b13edcd Enhance config checks. 2018-09-04 01:37:08 -04:00
Andrew Steinborn
108996fc1f Missed this 2018-09-04 01:13:06 -04:00
Andrew Steinborn
69e88ca6fd Adds KickedFromServerEvent. Fixes #49 2018-09-04 01:12:20 -04:00
Andrew Steinborn
c021eb2020 Don't output ProtocolVersion toString() in decode errors
This information is extremely technical in nature and the data is already
available for developer use by examining StateRegistry.
2018-09-04 00:50:24 -04:00
Andrew Steinborn
c5dcfb1ba6 Prettier, conciser, and more useful ProtocolVersion#toString() 2018-09-03 23:45:11 -04:00
Andrew Steinborn
c30cc66461 Test logic when exception is thrown in thread 2018-09-03 23:30:18 -04:00
Andrew Steinborn
3b5d20e62d Include git revision and build number 2018-09-03 21:02:11 -04:00
Andrew Steinborn
01be081bda Update link to Velocity repo 2018-09-03 15:01:18 -04:00
Andrew Steinborn
c520e04ac8 [BREAKING] PluginMessageEvent instead 2018-09-02 20:50:24 -04:00
Andrew Steinborn
db1b19dcd6 Remove unused scoreboard API 2018-09-02 18:07:31 -04:00
Andrew Steinborn
ff0f83b375 Add getBoundAddress() for NuVotifier 2018-09-02 16:34:25 -04:00
Andrew Steinborn
3791283860 Gracefully handle offline-mode login attempts on online-mode. 2018-09-01 14:18:30 -04:00
Andrew Steinborn
d3a14721bc Fix typo that forced modern forwarding on. 2018-08-31 15:26:44 -04:00
Leymooo
57ccb6eec2 Allow using a '\n' in config. Create a method to generate a random string. 2018-08-31 20:36:10 +03:00
Leymooo
b201d82a31 cleanup 2018-08-31 16:50:53 +03:00
Leymooo
d743c8b5a1 Merge branch 'master' of https://github.com/astei/velocity into config 2018-08-31 16:38:28 +03:00
Leymooo
182c117dc5 Shutdown logger to flush queue before call a System#exit 2018-08-30 14:34:30 +03:00
Leymooo
a9c4d1d88b Make the velocity generate a default config 2018-08-29 16:07:49 +03:00
Andrew Steinborn
b7725a7764 More sane shutdown code. 2018-08-28 21:27:03 -04:00
Andrew Steinborn
5773fe240b Use a HashSet here as it is more appropriate for the situation. 2018-08-28 21:24:49 -04:00
Leymooo
7e215e3c4f CfgKey -> ConfigKey 2018-08-28 16:00:05 +03:00
Leymooo
64fadc436b Refactor VelocityConfiguration to better support for config upgrades 2018-08-28 15:59:55 +03:00
Leymooo
2c7dfaaaf9 Allow config upgrading. Add annotations with reflection 2018-08-27 20:03:51 +03:00
Andrew Steinborn
6f8dae3a7e Removed all references to the static VelocityServer instance. 2018-08-27 00:45:00 -04:00
Andrew Steinborn
fead4783af Another misc cleanup for bossbars. 2018-08-27 00:25:39 -04:00
Andrew Steinborn
c2fa5d3ff1 Make sure to deny 1.12.2 and below clients in "modern" IP forwarding. 2018-08-27 00:25:30 -04:00
Andrew Steinborn
b5ebb4541f Clean ups around the codebase. 2018-08-27 00:24:58 -04:00
Andrew Steinborn
c7469ec13c Removed all entity ID rewriting logic.
This was all a no-op anyway, and should the need for this arise again,
it is trivial to re-add. However, Velocity does not need this, and
probably will never need it. Let's have the complexity go away.
2018-08-26 23:58:35 -04:00
Andrew Steinborn
f27b7e4e2f Fix improper packet mapping for chat messages.
This fixes the statistics display on the client.
2018-08-26 23:47:23 -04:00
Andrew Steinborn
db3f2b86e1 Remove unused client settings field from ConnectedPlayer 2018-08-26 23:23:13 -04:00
Andrew Steinborn
8e0ca2033e Explicitly cover unexpected disconnects during login 2018-08-26 22:43:18 -04:00
Andrew Steinborn
d482dc7f4f Clean this up 2018-08-26 19:44:15 -04:00
Andrew Steinborn
79f4abcf90 Expand /server command.
The command now supports displaying the server you are currently on and
takes full advantage of the JSON-based text component system to prettify
its output.
2018-08-26 19:41:18 -04:00
Andrew Steinborn
01c1002249 Make sure to schedule on the thread pool and not on the scheduler. 2018-08-26 18:43:55 -04:00
Andrew Steinborn
1e178cfe2a Properly block connecting to Velocity with legacy forwarding.
I also took the opportunity to improve the disconnect handling for
Disconnect messages from the server.
2018-08-26 18:18:02 -04:00
Andrew Steinborn
44c4221e19 Add /end alias for /shutdown. 2018-08-26 18:02:55 -04:00
Andrew Steinborn
ef556afbf3 Rewrote scheduler to use ScheduledExecutorService for delay/repeat tasks 2018-08-26 17:56:43 -04:00
Andrew Steinborn
ffd6217170 Broaden a catch clause so Java Errors while loading plugins don't halt the proxy. 2018-08-26 14:40:07 -04:00
Andrew Steinborn
27288685ff Register 1.13+ channels on legacy clients too.
Prior to this commit, Velocity registered 1.13 and "legacy" channels
differently. This commit unifies both for legacy clients to make
compatibility easier. It also fixes a related issue in the new LuckPerms
port to Velocity.
2018-08-26 14:39:31 -04:00
Andrew Steinborn
f273c046ec Add javadoc and reorganize the player settings stuff. 2018-08-25 12:54:30 -04:00
Andrew Steinborn
86461c2b60
Merge branch 'master' into ping 2018-08-25 12:45:07 -04:00
Andrew Steinborn
78a2bd313a
Merge pull request #57 from Leymooo/client-settings
Add PlayerSettings API
2018-08-25 12:44:35 -04:00
Andrew Steinborn
2b3503e2df Fix compile. 2018-08-25 11:02:20 -04:00
Leymooo
09153ae620 oops 2018-08-25 18:02:19 +03:00
Leymooo
1b4c537c81 Add PlayerSettings API 2018-08-25 15:52:05 +03:00
Leymooo
bf2dff7693 add method to get player ping 2018-08-25 14:44:44 +03:00
Andrew Steinborn
a37a0d6665 Merge branch 'master' into native-crypto
# Conflicts:
#	native/src/main/java/com/velocitypowered/natives/util/Natives.java
2018-08-25 01:12:26 -04:00
Andrew Steinborn
7ee56d9f5f Massively improved Javadoc coverage to prepare for Javadoc site. 2018-08-25 00:29:22 -04:00
Andrew Steinborn
6ccf16cee4
Merge pull request #52 from Leymooo/header-footer
Add Header and Footer. Resolves #50
2018-08-24 21:46:03 -04:00
Leymooo
d65e4ed296 add method to clear header and footer 2018-08-25 04:45:10 +03:00
Leymooo
1f8c8dcd94 Add Header and Footer. Resolves #50 2018-08-25 04:37:07 +03:00
Andrew Steinborn
bc2f3a7288 Clean up ConnectedPlayer initialization. 2018-08-24 21:30:58 -04:00