#velocity-dev
164 messages · Page 10 of 1
See this
ok
You can send a login plugin message during this event. The login plugin messages will only ever stop back and forth if there is no message left pending
So what I did is chain another message while handling the last one
Ok, it can maybe work then
But what happens in the mean time velocity waits?
What is keeping it from moving on?
The connection holds.
It will only resume after the last pending message has been answered by the client
The queue is what holds it
It's weird cuz I thought of doing it this way before I started modifying velocity, maybe I missed something
I can't think of what it was keeping me from doing it this way
In my defense this api isn’t well documented or widely used
Yeah
I knew what it did. And since it’s an obscure part of the api I can’t blame you
Feel free to dissect my poc plugin
With the exception of the horrible connection tracking it should be easy to understand
Note to self: fix that
Anyways, Yea, I can help you get the it working, but I need to sleep. I have pushed my port of crossstich here https://github.com/adde0109/crossshit
Night
You mean Plugin development?
yeah
There is a "quick start guide" on their website
The official docs seem incomplete
If you want to know all the possibilities of velocity i suggest you read the javadoc. One sec
package index
Otherwise I suggest looking at other plugins and their source code
Any plugin you could recommend for me to checkout as a basic one
https://forums.papermc.io/threads/kickredirect-redirect-your-players-to-a-server-after-a-server-shutdown.162/ This is a useful one. You can experiment with it using the debug feature in you IDE which can be very educational
KickRedirect
Redirect your players to another server after the shutdown of the server they were on
This plugin allows you to further customize the try option in the Velocity configuration, allowing you to redirect to specific servers that are not in that list, select a random or more empty...
Not maybe the most basic
But It can get you started
Here is a simpler one https://forums.papermc.io/threads/velocityblockversion-block-certain-minecraft-versions-from-joining.55/
Do this one ^^^ it's very easy to understand since it's only 1-2 class files
Nudge
Another pre login event.. lol? Does this have to do with chat msg signing?
Pains me to say but yes, yes it does
Probably going to be called KeySetupEvent
Lol, you see, what mojang are actually trying to do is figure out how many requests you can feasibly have the server make before people start noticing that it takes them 30 minutes to join a server..
_ _
But, for real, being able to change the vhost would be great... Currently I just modded the velocity server to allow this but this is gonna get old pr fast when we do updates 🙃. I probs won't bother making a pr for this as I imagine that I did it in a way that no one here wants to see.. cough removing final modifier on virtualHost in Player and adding a setter
This has been on my list anyway to support connector plugins that implement some sort of proxy protocol that’s not widely used
notably as support for a few more complicated RRDNS setups
declaration: package: org.bukkit, interface: Server
declaration: package: org.bukkit, interface: Server
WARN Advanced terminal features are not available in this environment
Is this because Im using Intellij's console?
yes
What are the said "Advanced terminal features"
stuff like using the arrow keys for previous commands
it's not broken
The terminal stuff is working 100% as expected, we can't do the fancy stuff in IJs terminal because IJs terminal is broken
@fossil sundial I have tested a modpack containing 178 mods with my velocity fork with crossstich
It worked after some tweaks to crossstich
The most stupid fix to the most stupid problem
One of the 178 mods registered a argumenttype IN MINECRAFTS NAMESPACE
Causing crossstich to not wrap it
My solution?
That shouldn’t be solved
That’s just stupid
Be nice if we could get fabric/forge to enforce shit around that
Yeah, the funny thing is that I have no idea which mod of the 178 mods in the modpack, caused it
It takes more time and energy to hunt down that mod and scream at it's devs than just making a ignore list in crossstich
@fossil sundial Does the preloginevent fire after or before the authentication?
Before
ok, I don't know if it matters, but forge server does the handshake after the authentication
You can also hold the connection in the postlogin event but it’s easier in pre
It doesn’t
Yeah, It sends the EncryptionRequestPacket before the LoginPluginMessagePacket(handshake)
I just tested it
Have you checked?
Otherwise my proof of concept wouldn’t be working
Why is there a .getPlayer() method in DisconnectEvent?
Isn't the player supposed to be offline when this event is triggered?
hence the javadoc
Operations on the provided player, aside from basic data retrieval operations, may behave in undefined ways.
getting uuid/name should probably be fine
Great, thanks
hi so i am making so i have a gui and can click on a online player head a taky money from them but i can't get it to work i have this code
String name e.getClickedInventory().getItem(4).getItemMeta().getDisplayName();
economy.withdrawPlayer(name, 1000);
--other file---
for (Player p2 : Bukkit.getOnlinePlayers()) {
String n = p2.getName();
ItemStack skull = new ItemStack(Material.PLAYER_HEAD, 1, (short) 3);
SkullMeta meta = (SkullMeta) skull.getItemMeta();
Not the correct channel
?
This is Velocity dev not #paper-dev
Hello,
I can't seem to use MiniMessage (version 4.10.1) with Velocity (version 3.0.1).
I keep getting a "NoSuchMethod" or "ClassNotFoundException" error.
I know this means I'm shadowing wrong... But I've been looking in the existing messages and in the docs for three hours and I can't find the problem.
I use Gradle, shadow version 7.1.2 and my project compiles in Java 16.
In my dependencies, I add MiniMessage:
implementation 'net.kyori:adventure-text-minimessage:4.10.1'
And then I relocate MiniMessage:
relocate 'net.kyori.adventure.text.minimessage', 'group.hevelius.minimessage'
I tried in Java 11, with different versions of Velocity and MiniMessage, relocating all Adventure... I definitely didn't get it.
Would someone please tell me what I did wrong, or what I need to do more?
Thanks a lot!
well there's a few issues you're encountering
- latest minimessage versions require the latest adventure version which older versions of velocity do not include
- you cannot shade and relocate the adventure api if you intend to use native velocity methods that accept/return components
the solution to your problem is to only run velocity versions that include adventure and minimessage, thus ensuring you don't have any issues and you don't have to shade or relocate anything
Thank you so much for your answer.
But we agree that the latest version of Velocity available is 3.1.1? Even with this one, I have access to Adventure elements, but MiniMessage is not one of them...
Damn it, I just had to use the version 3.1.2-SNAPSHOT. That's terrible 😭
Thank you so much!
yeah there should really be another minor release some point soon but
ig there'll be one with 1.19
I’ll be steaming myself on velocity update duty in about an hour
Got a stream link? 👀
Is there any method in Velocity to get the current path from the plugins folder like in spigot?
I've been looking for this too but haven't found it yet
Do you know a good different method to get the plugin folder path?
There is here a one way to get your plugin data folder
And how? 😂
Wait i will show
You can get velocity's "plugins" folder by editing the path here.
Thank you man! Exactly what I searched for. 🙂
You are welcome
one common pitfall:
if(!dataDirectory.toFile().exists()) {
dataDirectory.toFile().mkdirs();
}
add that to prevent a lot of dread down the line
https://velocitypowered.com/wiki/developers/event-api/
In creating an event, what's the class of Event that i should implement? I can't find anything velocity related, not sure if i'm outdated or the import is from a different library
There’s no such thing. Events don’t have a global supertype; any object will do
You can implement ResultedEvent if you want to mark your event as one that has a generic result
But other than that there’s nothing
got it, thank you
Does Velocity support Java 18? (Unsupported class file major version 62)
Error when trying to create custom ArgumentType for brigadier "Don't know how to serialize *.RulesetNameArgumentType".
Question is it possible to create your own ArgumentType?
is there a way to create custom argumenttypes? I've created one like minecraft but it says
Don't know how to serialize command.arguments.PlayerArgumentType
@median kraken @hazy marsh no- and the client can’t deal with those anyway unless you use a mod
Even if it’s not supported on velocity itself you can encapsulate custom types and pass them through velocity (if you have a modded server & client)
See the crossstitch mod for how to do that
That has to be an error by a plugin
Velocity supports Java 11 and newer
It doesn't support Java 18 due to logger dependency.
You may consider updating dependencies to the latest ones.
What jre are you using?
I am currently working on 3.1.2-SNAPSHOT with jdk 18 without issues
openjdk version "18.0.1.1" 2022-04-22
OpenJDK Runtime Environment (build 18.0.1.1+2)
OpenJDK 64-Bit Server VM (build 18.0.1.1+2, mixed mode)```
I've made a mistake by depending already existed dependency by Velocity... Sorry to make you waste your time, thanks!
no problem
does anyone know how to fix this error?
yo, I got forge to send the modlist over the server ping. This is my velocity plugin writing that to the console.
Don't place classes in the root directory, create a package and put them there
This is a known issue 😔
Hi, any idea why this.config might not be initialised?
initialise that variable in your constructor?
I needed to code a velocity plugin that prevented connection to the bukkit server from another proxy in the old days. Do I need to code it or does "modern forwarding" configuration solve this issue?
Latter, ideally with a firewall on top
I couldn't understand. Does "modern forwarding" configuration prevent connection from another proxy?
if the other proxy has the same forwarding secret then it will be able to connect to the server, if not then no
Ah, thanks! I do not need to set game profile to know if it is correct proxy or not anymore.
@fossil sundial That idea you had with sending the handshaking information using statusPings is working. I have successfully got it to work on the Forge server side with some few new discoveries along the way. The max size for a status ping is 32767 bytes, this is a problem since the modlist+registry+config packet takes up more bytes than that. The solution?
My velocity plugin will then have to ping the server multiple times. This is the handshake data download.
It only needs to do this one time. Everytime the forge server starts
hmm
but since this works I dont see anything wrong with it
👍
I'm trying to use Plugin Messaging between my paper server and my velocity proxy, but it seems like the PluginMessageEvent listener is never triggered.
1st screen is how I register the listener
2nd screen is how I send the message from Bukkit
you don't need to register the BungeeCord channel yourself
Ah?
velocity implements the bungeecord channel
you just need to make sure that you follow the correct format as per the spigot wiki
The bungeecord channel is the bungeecord channel
if you want a channel for doing your own messages you need to create your own channel as per the pins
If I create my custom channel using MinecraftChannelIdentifier.from("velocityplugin:friendcommand"), what would be the channel's name that I should use in my Bukkit plugin?
"friendcommand"? "velocityplugin:friendcommand"?
the latter
thanks
@hidden gale was that pull request for velocity related to the exploit was that fixed in netty 4.1.77.Final?
You mean the CVE?
yes
no
my guess would be to just keep it updated
but that's not even latest netty
it is
ah well I guess final wise
Unless you're talking about the alphas
(which, apparently hasn't even been touched since 2015)
yea, am confussled
no ur right if you don't count the 2nd alpha
Is the stable, there is a branch with 5.0 as far i know
yea we already established that in the comments above
Netty 5 from 2015 was abandoned, the newer Netty 5 is actually planned to be released this/next year, the new alphas are "usable" and include things like a buffer API based on project panama
keep getting this error
what does it mean?
I'm trying to build velocity after checking out a new commit
It's right here
Wtf
ah, It doesn't seem to exist a -all jar in there
Well, that's unfortunate since I don't know how to get one
Which build task did you run?
jar
Oh now it works, Thank you
Hi, does velocity have a permissions system for the commands we create?
In order to manage permissions for players
Velocity does have a permission api
We don’t provide a permission system however.
That is up to plugins to implement
And we also made the conscious choice of not allowing other plugins to control permission plugins as part of the lessons leaned from Bungeecord
Oh okay I see, thanks.
but just how can I disable /server and other velocity commands to players
Most servers use LuckPerms
how do i make scheduler execute X times then cancel?
quick question how can I connect a player to another server?
You will need to keep a counter and cancel the repeating task when it reaches X
@fossil sundial I'm done with the modern forge support plugin
With the server side forge mod
it works
Using the status ping to download the handshake
probably the single most hacky but useful plugin ive seen in a while

is there a way to access a file from the velocity file directory as a plugin from a backend server? would be cool to know :)
Well, no
Like, the other thing can be running in an entirely isolated environment from the other
best you could do is transfer such files over the network somewhere
When I run it in regular velocity, I get this:
How do I fix it?
It says "OutOfMemoryError"
Wtf
Sounds like you’re running out of memory
That’s a huge byte array friend
Allocated?
Can I allocate more?
no just dont make the buffer that big lol
You ran out of heap space
It attempts to allocate the entire size of the array
but, allocating a buffer that huge is just bad
but I need it to be atleast that size. I need to store that many bytes
Why
Use a circular buffer then
But definitely don’t be doing that
Is there any built in one that you would recommend?
ByteBuf, etc
Or am i stupid
DirectByteBuffer is usually good
What electronic is suggesting is good
Honestly - you should be reading in chunks - you should never be throwing all that data in memory, it doesn’t make sense to
And if it’s over your head you may consider doing some more basic networking problems to train up
I do read in chunks, but I allocate it all at once
Don’t
don't allocate it all at once
Adde that’s just over a gigabyte of ram the array will take up
lol
That one array
I was tryna brain the memory thingy but didn't wanna
I didn’t even try reading those zeroes
It’s at least 8 trillion bit
it's 100x more than i wanted
Good god it’s a lot
1000 even
1mb is more sensible but still a lot
I think I counted wrong
Probably
I think so too
I mean, if you have that amount of RAM available and no limits set, it should run
Yeah, windows also have a page file
Well the default jvm in IJ has around 1.5gb
not sure if a single byte array can use the ram and the page file, that might not work
So it’s not impossible
active ram can't be paged, not without joyous swapping and stuff will generally scream if it can't fit what you're playing with back into active ram
direct vs on heap is always a fun one, direct is faster but you've gotta remember that you're going off the heap, so you especially wanna be reasonable efficent with your buffers
Hi! I can't find in the docs how to run command as player. Clues?
pretty sure that the thin to dispatch a command let you provide a sender?
where's the dispatcher
you get it from the ProxyServer iirc?
CommandManager
thank you
The only thing you need to now still add to the forge mod is modern forwarding

Yeah, But that will be easier i think.
I know the way around forge better now than I did before
How can I make a user execute a command in the proxy?
I'm using the spoofChatInput method, but when testing I see that the command is executed on the paper/spigot server and not on the proxy
get the command manager and use the methods on there
Thanks
I just started using Velocity - I can work out how to receive a plugin message but how would I get the sender of the plugin message so I can send a reply? .getSource() returns an empty class which I can't find any use case for
You need an instanceof and a cast
To Player
does velocity shade minimessage? (since when?)
since 3.0.2 I believe
https://github.com/PaperMC/Velocity/commit/308acd86ec5fe783c8b42f34e38e1a45dfdc0070 I think this is the commit
because iirc adventure started shading in minimessage? idk
adventure shades minimessage? I doubt that
there it is
That was an accident back in the day
So I can see the logic as to why I cannot get what world the player from the PlayerQuitEvent is in... But how would I go about doing so?
@EventHandler
public void PlayerJoin(PlayerQuitEvent e){
final Player p = e.getPlayer();
if(p.getWorld().getName().contains("Lobby"))
//Some code......
}
I'm trying to update scoreboards for online players, but only want that number to reflect who is in the Lobby world
Hmm then maybe I have other issues
brb debugging
Ah I found the issue
Bukkit.getOnlinePlayers().size() was still counting them. Had to change it to Bukkit.getOnlinePlayers().size() - 1 in the PlayerQuitEvent
Thanks for the sanity check
this is #velocity-dev ... just btw
is there a way to update a users permission function without them reconnecting?
The perm function thing is supposed to be like an interface into your own logic
You don't update the function, you update whatever that function calls into
I'm trying to make players not be able to collidejava player.setCollidable(false); But this doesn't seem to work? I have this in PlayerJoinEvent
No errors, it just doesn't work
is there an url to always get the latest velocity version?
No. But you can instead write a short script to download it from the papermc api.
We don’t provide “latest” downloads directly because it has proven as a nightmare to support
I mean, it's good practice to do so
but, outside of weird environments, the JVM is about to be destroyed
Yeah I realised the default behaviour is that plugins are loaded once the proxy starts and unloaded when it's shutting down. I'm using a plugin manager to load/unload plugins without the necessity to restart the proxy. I will check with the plugin manager to verify what events are being sent
That's heavily discouraged, I wish you good luck with classloading issues
The one plugin I’ve seen that “adds” this to velocity already creates three memory leaks

I'm using ServerUtils
i have not spotted any memory leaks so far
full output?
are you sure that you're building with the latest version of velocity?
I mean, on the surface, that doesn't look like the normal velocity annotation processor
Oh, wait
- looks like outdated java
- You're using a 3rd party annotation processor, not ours, velocity utils?
I am having problems with mariadb jdbc class not found on run time. Do I shade the dependency?
I see. So i need to use some maven plugin to compile the dependency and bundle it with my jar?
shadow instead?
yeah I will be using maven shade plugin. Trying to understand how to work with it from the docs right now
Hi! If i’m making a paper plugin with velocity proxy, how can I send a player to another server within the paper plug-in?
Essentially is there an equivalent of the BungeeCord messaging channel for velocity?
velocity implements the bungee messaging channel
oh, great
would that also work though if the forwarding mode is set to “modern” rather than “bungeecord”?
forwarding mode is irrelevant
It works unless you disable it in the velocity config

Hi. Where is this text?
hi, is it possible to make a velocity plugin that allows network administrators to login as other players?
theoretically it should be
No. Not possible. Unless you make the client identify with that Players name
oh, so sorry 😄
You can spoof the UUID just fine but your name won’t be correct
well if I spoof the UUID won't the name also be correct as the server will send out the spoofed game profile packets to everybody else online
I basically just want top level /nick haha
Hi, you wan't to connect from 1.18.2 ? It's because you need to use the last Velocity version (not last stable)
What if change the gameprofile while GameProfileRequestEvent?
I could just join on offline mode if I can get velocity to allow a certain IP to connect from offline mode
and use a client that lets me choose my name
Yes that would work. You can’t force a custom username on the client; anything else is fair game
As I said; you can force everything on the client with the exception of the username
What 1.18.2? I wanna change server-mod-name.
You need a plugin to do that; it’s generated by the proxy with the result of the ServerPingEvent
Yes, I know, but I don't want to use a plugin. One due to text.
Well then I can’t help you.
Hello Guys,
does anyone know, what causes this error?
[03.06 23:23:23.260] INFO: [Proxy-1] [23:23:22 ERROR]: Can't create plugin ancient-proxy
[03.06 23:23:23.260] INFO: [Proxy-1] com.google.inject.ProvisionException: Unable to provision, see the following errors:
[03.06 23:23:23.260] INFO: [Proxy-1] 1) [Guice/ErrorInjectingConstructor]: NullPointerException: getInstance().servicesRe…layerManager::class.java) must not be null
[03.06 23:23:23.260] INFO: [Proxy-1] at AncientProxy.<init>(AncientProxy.kt:23)
[03.06 23:23:23.260] INFO: [Proxy-1] at VelocityPluginModule.configure(VelocityPluginModule.java:48)
[03.06 23:23:23.260] INFO: [Proxy-1] while locating AncientProxy
[03.06 23:23:23.260] INFO: [Proxy-1] Learn more:
[03.06 23:23:23.260] INFO: [Proxy-1] https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR
[03.06 23:23:23.260] INFO: [Proxy-1] 1 error```
I tried this but didn't seem to work - I received an invalid session; try restarting your game when attempting to join from offline mode
There’s a method to force offline mode
Fair warning though
You’ll have to query and provide the data for the player (from mojang?) on the gameprofilerequestevent yourself
yup, i got it working
it’s very nifty, i’ll post it on github soon
just a bunch of http requests for the profile
is there a method to stop all tasks by a plugin?
Then stay now this:(
You can set player profiles with paper btw
change name and uuid and all that
oh how so
Its the PlayerProfile class
Absolutely don’t do that. You’ll desync the player and it’s rather obvious to tell for other players
Just changing the name couldnt be bad could it be
Well the player refers to itself by name & UUID on the playerlist and if there is no match funny things start happening

That emoji is cute, makes it hard to focus on wht you said lol
It’s a stupid design choice in my opinion
I think it’s fair for mojang to use the playerlist to define other players states
Well- They also take a lot of the data for yourself from the playerlist
It’s broken to the point that packets like the player capabilities packet are literally redundant and will cause a desync if they don’t match what is on the list

Thats why those methods are subject to remove I see
If you use a tablist plugin that changes a players display name without using scoreboards then you can expect more problems
Most of this is old code and even if I complain again it will fall on deaf ears
I guess but I do know there is another way just cant remember it
Bungeecord rewrites the list even if a plugin touches it so it doesn’t break
One of the more problematic features of bungee if I say so
That sucks ngl
We don’t do that on velocity
Wait will disguises fail too
I have a historic friend who uses bungeecord for some reason
Disguises only make you look like someone else to players that aren’t you
That is perfectly fine
Cool
This is the fundamental reason velocity will always assign you an offline mode UUID if you disable forwarding
I spent way too much time figuring out why my client was absolutely broken and desynced in some scenarios only to learn- well- no I am not insane
I wrote a fabric mod a year or two ago that “detects” such tampering
A perfect disguise or vanish plugin of some kind needs to do a whole lot more than meets the eye
gib me name
I wager it’s nearly impossible to not leave traces
I didn’t publicize that; at the time I was just trying to prove a point
But to say this; Even I can’t detect some of the better vanish plugins
Some of it is clever to the point that even baffles me
Those people really should contribute to the protocol wiki
Would’ve helped me a ton when I was dealing with that desync problem but alas
How did you even
check
I mean, plugins rarely care to deep dive into how the server works
they just do whats needed for the client to be happy
Meanwhile I’m over here debugging an RSA signature issue
I really need to finish the 1.19 update but I also have a uni paper that I desperately need to finish
The changes aren’t really big but they fundamentally screw you over if you’re doing a proxy
yeah paper is gonna be enjoying those
At least I have control over how modern forwarding handles this
goes back to crying
And this update makes it comically easy to re-encrypt the protocol between server and proxy
take that electroniccat lol
How long has Aikar been inactive for
I expected that to be md 5 ngl
hi, is it possible to create my own playerargumenttype with brigadier?
Well, yes
Don't know how well that stuff is exposed in the API if you're tryna do it on the proxy
the client also needs to have a mod which registers that type
It’s supported by velocity but not on velocity
I highly recommend not doing it though
^^
If you have a server with a custom brigadier type you’ll need to wrap it in a container like crossstitch does for fabric modded servers
Then it’ll work just fine
ok, but how can i use a argument that accepts a player otherwise??
adde did also develop the same thing for forge (although currently rather useless)
Wdym accepts a player
/command <Playername> like /command Greenman999 or /command @a etc
either use the standard selector for that or handle it as a string
You literally can't send a custom brigadier argument to a client without a client mod
so, anything like that is basically gonna be just using the built in types
what do you mean by standart selector?
Well, standard argument
RequiredArgumentBuilder.<T, String>argument("player", StringArgumentType.greedyString()) .suggests(playernames)
Something like that
Hope I’m remembering that right
and what is T?
Not sure if velocity has custom type bindings
So I assume it’d be String

I’m a rookie at brigadier
I’m probably remembering it wrong
hm
RequiredArgumentBuilder.<CommandSource, String>argument("player", StringArgumentType.word()).suggests(playernames)*

What's the easiest way to get into velocity plugin development?
Like is there a guide like there is for spigot, And is it newbie friendly?
There is this guide. https://velocitypowered.com/wiki/developers/creating-your-first-plugin/
should be an easy start if you already know how to develop spigot plugins
What that tells me is that I should spigot plugins first....
You should know Java first, but if you do the rest should be quite easy
doesn't really matter if you start with Bukkit API or Velocity, although bukkit API has more tutorials and resources
Well, I should probably do that. I do know alot of C# and I've heard that C# and Java aren't too far apart. So I don't think it'll be too hard
And I've made one incredibly simple spigot plugin before. 20 lines.
yep, going from c# to java should be pretty easy
That's what I'm hoping for
The proxy is the proxy, I'd say that velocities API is maybe marginally more complex vs bukkit, given bukkit was designed to be "easy"
(Server plugins also give more space for interaction, whereas proxies are just, well, a proxy)
yea... I just wanted to make a velocity plugin that allows me to check if someone is online, and where they are online. Can't be too hard...
is there a way to essentially broadcast events to all backend servers or specific ones. either from the proxy or one of the backend servers
is it possible to track a player's movement by coordinates through Velocity plugin?
i guess you could inspect packets
but a plugin message from the backend server might be less upkeep
I thing that is best trougth spigot cross-servet
Can I have a command with a permission that is granted by default?
/velocity version
Or /server
👍
hi, how can i create a brigadier command with a permission?
You set the requirement predicate for commandsource.hasPermission(…)
what? where do i have to set it?
LiteralArgumentBuilder.<CommandSource>literal("command").requires(source -> source.hasPermission("permission"))
ahhh, thx
So it turns out, the person I am working with has a server host which won't dare to accept server jars that don't come from the velocity repo... Could the ability to change the vhost be added to the pre login event? Should I pr that? If yes, how would you like me to add it? in a setter within the prelogin event or some other way?
You can work around that for the time being by replacing the channel initializer and modifying the packet using that.
This addition won’t make the 1.19 update and I’m rather busy at the moment so it might be a while before we are able to tackle that issue. There are a few more design considerations for this event but if you want you can PR something; just expect me to want a lot of changes.
That’s mainly down to that part in the connection being really delicate
I would much rather have this be a set-able field on the profile request event
But also keep the original address retrievable
I will try the first one for the time being bc... people want things yesterday but this would be nice to have anyway so I might attempt a pr anyway at some point ^^
is there here some method like that ChatColor.translateAlternateColorCodes()
you can use the legacy component serializer
although it's highly recommended you transition to a modern format like minimessage, which is also shipped alongside velocity
@fossil sundial I am done. It works as it should. It caches the downloaded handshake so it doesn't need to be downloaded every time. The plugin and mod both has a config file. On the proxy side, you can specify what server to download the handshake from. On the server side, you can input the forwarding secret if you want to use modern forwarding. I have also implemented error handling like if the forge server doesn't have the mod installed.
Ofc vanilla works fine and is untouched
Right now I'm working on the "VersionConnector" thing so it can connect to diffrent server depending on if the client is 1.18.2 forge, 1.16.5 forge or just vanilla. Giving the server admins more freedom
Well I’m not quite there yet
Dang it I didn’t think I’d be struggling this much with the 1.19 update
For anyone interested https://github.com/Xernium/Velocity/commit/dc8142f0f4d440a9a9de5606d4eabbf11f5ee0ed
There’s a list of what still needs to be done at the bottom
Good catch
Wanted to add the force key signature option there but probably invoked a key combination by accident
Is it minehut? If so custom jars are a planned thing just something we haven’t added
Curious what the issue is
What's the deal with it?
Being too sleepy ig
I’ll be continuing once I ate breakfast
Hmm, I've just taken a quick look at the commit and saw some RSA stuff, what's that for?
Chat message and command signing

What's the purpose of it?
Oh no
To whom? Mojang?
Ohh so this is done so that the proxy can not manipulate with the chat message?
This is done so that nothing can manipulate the chat message
Oh, how does this work out with plugins that alter the chat messages? (For example, censoring curse words)
If you do manipulate it then it won’t show up on a client that’s set to only allow signed messages
They become unsigned
You can send them back as system messages
Wow, that sucks
Those will always display
It’s a very stupid system if I do say so myself
But I’d rather have it implemented properly
Calm down on the insults
But thanks to years of knowing his actions he will probably not care too much
I guess
i see that when a player doesn't have permission to use a command, it's passed to the spigot server. is there a method to do this automatically or do I just get the player, get the command string and send it to their server manually (spoofChatInput I assume)?
im using SimpleCommand
use a brigadier command if you want this to automatically happen
otherwise youll have to do it yourself
thank you
Hi, in ServerKickEvent how am I supposed to use event.getKickedReason?
uh call the method ? what are you asking?
public Optional<net.kyori.adventure.text.Component> getServerKickReason() {
return Optional.ofNullable(originalReason);
}```
docs are a thing
is LoginEvent async?
All events are async
When will velocity 1,19 release? tmmrw?
Updates to Paper do not have any sort of estimate for when they release, ever. Any and all updates will arrive when they are ready, and the only thing to do is wait for them patiently along with everyone else.
is there any other way for my velocity server to allow 1.19
since i do have via version
but that doesn't work with velo does it
yeah - put viaversion on the proxy
does that work..?
but?
at scale it's not very friendly to have on a proxy
Because?
so if you're on a large scale then you might see a whole lot of lag
For the proxy or
but it does work for the time being?
yeah, should work
max 250 players on the proxy
there's a known bug with switching dimensions but 
350 network total
just put it in the plugins list?
ye
I guess that wouldn't be smart to put that on a 2k server
was talking about another server
Ah
already have errors with viaversion :/
Alright then just wait for a release ig
sad
same I am waiting
is there a maven dependency to have the whole velocity jar and not only the api please ?
i need to have access to the ConnectedPlayer class but the api doesnt have it
(You can mention me)
okay, it looks like I have everything working so far
going to push a commit and people can feel free to play with it - it looks like everything is ok
https://github.com/CoreyShupe/Velocity/tree/update/1.19 feel free to run this branch yourself if you'd like to test / play with dev and report issues
No, since the implementation is free to change at any point, thus breaking your plugins
This is an XY problem, what do you need to access?
Is there any documentation on how Velocity Modern Forwarding Protocol works? I'd like to implement it into my server software. One could obviously read the paper code but maybe there is a lib or some documentation 😄 .
Paper gives me the error "Unsupported forwarding version 2, wanted 1" when using this fork, any ideas on how to resolve it?
I'm using 1.19 Client -> the Velocity fork -> ViaVersion 4.3.1 on 1.18.2 Paper
build 2 should fix this
there was an artifact of some dev testing with V2 forwarding
Ah sweet, thank you!
@radiant pasture please let me know if there's any more bugs
we're doing production testing ourselves as well
Getting another error when joining the server, produced by velocity: https://paste.helpch.at/irayalocev.log
Just got a report, have yet to test - does Velocity default to enforcing secure profiles at this moment?
I believe we do enforce them
Can it be turned off?
it can be
1.19* is unstable though - I don't recommend using it in production for now
Velocity support for 1.19 is currently unstable, don't use it for now
give me like ~ 1 hour and it should be production ready - I missed a few big pieces which weren't hitting through our tests
No rush, mate.
I got back to my apartment not long ago
on top of that, I get plenty of work on my plate from my IRL job
Yup, totally fine.
Sorry, did not mean to cause stress^
there's something weird with the argument property deserializer
it doesn't like whatever via is transforming it to
so I'm working on figuring out why
then there's another dimension registry issue with 1.18.2 clients I think? but that code didn't really change so I'm unsure - but I'll take a peak when I fix the argument parser
From what I've seen on the Via end, that's only for 1.18.2 -> 1.19.
So it shouldn't be an issue for you anymore.
Or, at least not urgent.
the argument parser is funky - it's sending 47 as an argument parser type but that doesn't exist 
let's see what via thinks it is
so there's nothing which should be sending a 47
okay it looks like we're missing 2 properties in arguments
[21:30:26] [Render thread/INFO]: [CHAT] Your connection to lobby-1 encountered a problem.
[21:30:26] [Render thread/WARN]: Not all defined tags for registry ResourceKey[minecraft:root / minecraft:block] are present in data pack: minecraft:ancient_city_replaceable, minecraft:mangrove_logs_can_grow_through, minecraft:mangrove_roots_can_grow_through, minecraft:nether_carver_replaceables, minecraft:overworld_carver_replaceables
yikes
but the connection error is somewhere else not being logged
I had to add -Dvelocity.packet-decode-logging=true to log some of the errors
yeah - some of them aren't logging though - I got the argument parsers added but it's refusing the connection anyways
but it's not kicking me or logging a refusal
going to debug the channel to see what's being passed
what's the new gradle/maven dependency url for the velocity api for 1.19
can you try running this fork
picked up this update in the middle of it - missed a few parsers it looks like, I can now join fine on a large network
will get my playerbase to run testing on it to see if anything breaks
Getting this error: https://paste.helpch.at/uxoxozebov.log
I'm not sure what could be causing it, there's probably an invalid packet before the HeldItemChange packet?
HeldItemChange is definitely not 8 bytes
protocolize is unsupported
Ah, gotcha
I missed that
Seems to be working on my test server :D
I'll try it out on production now
woah woah
no no no don't do that
best way to find bugs!
Ah, I'll wait for that at least
2 minutes
okay - @radiant pasture you're good to test
just make sure to pull ^
lol
is latest velocity dev good for prod? or no
I wouldn't
but like, you can
ah the previous issue with joining on 1.18 client fixd, now just having that geyser error, ill just wait
I'm pretty sure it's stable - but it's still new & it's a very large update
what geyser error?
1.18 spigots, latest velocity, latest via ver, latest geyser atm
could be geyser issue? ill check with them
you have to change your enforce key config option to false
it's true by default
does it generate in toml? or needed to be added manually
manually
added manually - it doesn't auto populate yet
okok sec
can be fixed later - not a priority for me
fair enough
need to make sure the update is stable with all the internals before I can do that
it's all looking good though
# Should the proxy enforce the new public key security standard? By default, this is on. force-key-authentication = false
put under online mode
I’m going to head off pretty soon, but if there’s a reason that it wants to stay enabled I’m happy to work with an API call or something to force disable it per-player.
I don’t think Floodgate players can generate the keys required by Velocity. But I am happy, and I believe the rest of the Geyser team shares this sentiment, to work on a long-term solution instead of short-term.
not sure if geyser or velocity related, however just so its known https://github.com/GeyserMC/Geyser/issues/3015
I've told geyser how to fix it - they'll let me know if Velocity should be fixing it
ahh kk ❤️
Also seems to happen to Lunar Client 1.19
Lunar Client doesn't give the users the public keys, just like geyser, for some reason
wouldn’t be the first chat related thing they break
should be fixed now
try again
with the latest build ^
145? testing now
It fixed lunarclient, thank you!!
cheers
chatting on bedrock fixed.
🎉
nice
only a few minor bugs missing a few things
not too bad for a version update, Five is awesome
production server with ~ 3.2k players is running smoothly on velocity 1.19, no reported bugs thus far from our production 🙂
can you put the flag on and see the exception more clearly
also are you on a modded client / backend
what's the client and backend server type/version
0.0
those should be action bar, not sure if geyser or velocity problem
@frigid rivet for tomorrow, curious if you know what's up
do they send to the right place in java edition?
can you tell?
yeah java is workign fine
I know very little about bedrock - sorry
g'night, I'm gonna call it soon once I get my host updated to spigot 1.19 while it's out
Connections will use NIO channels, libdeflate (macOS ARM64 / Apple Silicon) compression, native (macOS ARM64 / Apple Silicon) ciphers
I have done a very cursed thing
and it actually works
pushing in a bit so you can marvel at the madness
this has taught me I need to learn C
soon I'll do this for Windows 🙃
of course you could already have natives on Apple Silicon if you virtualized Linux or figured that Asahi Linux kinda works
we don't support that plugin
ah, yes - I have a strategy for Windows now 😱
oh god this is going to be so bad
We had a report about that but I was unable to replicate it on Hypixel.
Some people said it was a Bungee issue other people said it was a Spigot issue.
I mean, bearing in mind that there are generally 2 ways to send an action chat bar thingy
one which uses the chat packet
one which uses the actual packet for action bars
I need to acceess ConnectedPlayer to have access to the netty channel of the Minecraft connection 😔
and there is no other way i believe
and i want to have access to the netty channel in order to retrieve channel options to print them
Hypixel uses the chat one, so I assume that the the dedicated actionbar packet also works
You're out of luck, that's unsupported. Imo if you need to access the Netty pipeline, you should know how to obtain it (even if not public)
By reflection ? Or i just import the whole jar ?
Cool, a PR to fix the actionbar has been made
Saw that a similar PR was accepted in Bungee
If you're on about #732 that PR is just swapping the action bar issues for new different issues. If you used that logic on a server that has the vanilla chat type registry, system messages would end up as chat messages and therefore have <> before them.
@craggy pecan about 727 - it’s a pending feature during the completion of 1.19’s features - the initial 1.19 was to implement connection and a basic blanket implementation of the protocol - more will come soon
No worries, always good to check on those always true statements heh
https://gyazo.com/71b97d00a177b663ac428783d235801f 1.19 looking good so far to us - no major crashes - big disconnects - etc...
(ignore the one line which goes straight down - that's just an api resolution failure thing we had happen)
has action bar been fixed?
Noticed that it's every single plugin that uses action bars, spamming chat for bedrock
looks like it's a geyser issue - so it's up to them
or a spigot issue?
idk
it's still very unclear to me what the issue is boiled down to
i see a lot of plugins updated to fix action bar rn for 1.19
so could be spigot yeah
dev build
i dont think action bar to chat issue is geyser if problem is present on lunarclient too.. right?
yeah that doesnt help my question
yes it does, lunar is known to break chat stuff all the time
I’m still failing to see how any of this is a velocity issue even remotely
Velocity doesn’t intercept title packets at all
It is capable of sending them and does so if told to by the api
And velocity doesn’t intercept any chat that is sent by the server either
I think it's the via issue where their chat registry is basically bork
I’m amazed at how this is supposed to be a velocity issue in any capacity though
Btw if you do do the chat registry properly please also ensure that the default types velocity needs are always present and it not, add them
Yea, I've been on and off (probs gonna crash soon), was debating on what to do for legacy in regards to the registry, as I'd prefer to like, use that instead of having to maintain two sets of lookups
Here was my original idea; store a registry in the downstream connection handler (as a merged registry from upstream and proxy)
And then dynamically get the ID each time based on the <merged> downstream registry
Or if legacy use a dummy static object
Might also have to store the original registry in the upstream handler
If that’s going to be exposed to api
Yea, I wanted to mostly focus on getting passthrough parsing working, then dealing with that stuff, not 100% how I want some stuff to look, I was mostly just kinda tryna model of the existing stuff, tbqh
(and fighting checkstyle, because apparently the darn IJ plugin won't parse the config...)
Also for the paper dev team
The velocity forwarding mode 2:
The server currently asks for forwarding with no data added
Forwarding v2 and newer will write a Byte to it indicating the highest supported forwarding version
Velocity may respond with a v1 forward or a v2 if the byte is 2
Server has to support older versions too
Still needs implementing on both sides
I kinda flunked that
Forwarding mode 2 is just the extra key data at the end
Really shoulda just used json in retrospect
I’d rather eat a brick
I mean, wait, is the forwarding logic already versioned?
Yes
Ah, nvm them
But currently there’s no way to request a version higher than v1
But, yea, that sounds okay
So this would add that without breaking backwards compat
If no indicator for highest version then always use v1
That way via servers will also work
Its important that the indicator is just that, an indicator.
Proxy is expected to respond with any version matching or lower than the indicated version
As you may have heard already Floodgate doesn't really work well with the force key auth option being true by default and it not being per-player.
So we were thinking about making our own impl of the IdentifiedKey class just to pass these checks and immediately after set the player key back to null.
But before we start working on this I wanted to ask if the current behaviour (it being globlal and enabled by default) is going to remain the same.
Stuff is still moving, and so it's too early really to say
Thanks for the response. For now we'll just tell people to disable the setting.
My bad. There was a LoginSetupEvent on my agenda that would allow you to force skip key auth. That- and it’s there to allow plugins to override/change the address velocity would refer to the player with. There have been quite a few requests for it lately
Just don’t have time till mid July
To note
Nvm
Actually I’m dumb
This would probably be better suited for the preloginevent
Not sure if that’s in the right place
key checks are done right before prelogin fires
Would need an earlier event or moving into there, but, moving it into there would allow for plugins to see/manipulate that stuff
Right. Option 2 it is
issue when trading with villagers on 1.18 spigot, velocity build 148, not sure if fixed yet or planned, just putting out there : s
Villager trading is very likely not a Velocity issue since it doesn't touch that.
More likely, it's a Via end. Make sure you're using their latest build from their CI (I saw Kenny touched it; I don't know if it's fixed).
protocolize? @visual adder
Should be in a help channel I think
#736 should do the trick yeah, thanks :)
Whilst vias choice to use a non vanilla chat type registry made the issue obvious, it is a velocity issue since velocity is using hardcoded chat type ids for measages sent via its api, which the backend server is no longer required to follow
If anything id say it's a good thing via did trigger the problem as it could've gone unnoticed for a whwhile otherwise
We already knew it was an issue
There was just the expectation that we'd just be able to blindly pass that stuff through without having to care too much in the meantime
(But, that registry is basically hard-coded*, many things are relying on the fact that those IDs haven't changed in years) - *At least for the vanilla range
I am suprised the client didn't crash without a chat type of chat defined tbh. I'd have expected that after seeing how it deals with missing biomes
Yea, mojangs often very inconsistent in how they deal with that stuff
I mean, to be fair, biomes where in part a shoe horn, they didn't even have a palette for them
had to pester them for a little while over that one too
Hello, I have a question about Velocity API
So, i am running a proxy with online mode disabled, If I use event.setResult(PreLoginEvent.PreLoginComponentResult.forceOnlineMode()) on PreLoginEvent, will this set player's UUID to mojang's one or I need to write another code to assign his premium UUID from Mojang API?
No; this will force the proxy to go through the normal auth sequence
So i need to write a custom implementation to assign the mojang UUID for player right?
Sorry; no as in you don’t need to do anything extra.
Oh, thank you
With .displayName(int i) how do I change the display name? Trying to for an enchant
Right channel?
Hey, what is this new modern forwarding?
it's just a version increment which sends more data in the handshake
oh lol
If you don’t need the key data you don’t need to change anything
otherwise write a 2 as byte into the request buffer and you may get a v2 forwarding message but it may also be v1
V2 just has the key data at the end in the same format encoding as tablist or the server hello packet have
Thanks for the detailed response, but fortunately, I do not need to implement anything. I was just curios
if the player didn’t key auth then you’ll always get v1
Since a few hours ago you can get all the tasks from a plugin and cancel them https://github.com/PaperMC/Velocity/pull/696
awesome, thanks!
may be necessary in the future-
but not required atm since you do get the key in the hello packet anyway
some hacky setups require it in the forwarding data so it is there if its present and requested
hey guys
what was the name of this plugin for pterodactyl API request / server start on connect?
will there be a announcement when velocity for 1.19 becomes stable enough for production?
when i join a backend server which is on 1.19, these <> letters appear in front of all velocity plugin messages, however, it does not happen on servers which run on any older version
Hurrr durr will be fixed once chat registry is implemented on velocity
Hey, I'm not sure if anyone checks closed issues on GitHub, but could we have this one re-opened please? https://github.com/PaperMC/Velocity/issues/510#issuecomment-1151478071
Thanks!
I can provide all of our data, we've got profiles and whatever else you need
I mean, that's an error on the server itself, more than likely a joyous race condition on the backend server or something
We thought so too, so we removed Velocity entirely from the equation in our prod server for a few days, not a single failed connection
Reintroduced it and stripped all the Velocity plugins, same deal. Same situation on multiple Java distributions among other attempts
The two things we've spotted consistently during failed connections in the profiling is a cipher function appears to take a full second of CPU time longer during a failed connection (https://i.cwlf.uk/akKYB.png), and the function ProtocolUtils.writeVarInt is called only during a failed connection (https://i.cwlf.uk/mQJlr)
Other than that we'd need some more guidance on what data exactly we should collect, but this issue is absent with Waterfall, and without the proxy; we've attempted stable and snapshot versions of Velocity.
It appears to mostly occur when a new user joins, only on their first connection.
can velocity run wtih geysermc?
Basically, I don't see a justification for re-opening that issue unless you have any form of concrete evidence pointing towards something; We don't have the means nor the capacity to try to diagnose an issue which only occurs within a single specific environment, in which the only error which we can see is an error purely on the backend server due to something trying to send an unregistered packet or something out of phase
best guess would be to modify the server and see what that packet is, but, I don't think that theres too much we specifically can offer here
Curious; would anyone be interested in Velocity taking on a full SLF4J & Logback stack?
I do have something more or less ready for that at this point, while still keeping the terminal console with JLine & JANSI around.
does velocity allow you to use minimessage
CommandExecuteEvent
This are the latest docs
declaration: package: com.velocitypowered.api.event.command
is it a difference in speed and performance between player-info-forwarding-mode = "MODERN" and player-info-forwarding-mode = "LEGACY" ? seems like MODERN v2 broke Bedrock support with Geyser but only to 1.19, works fine to 1.18, unless there is a setting I am missing on 1.19 paper test builds somewhere?
broke it how?
I mean, it's not a performance thing
Like, modern forwarding has to send like an extra message between the server and the proxy and another one back
Ideally, not much if at all.
If you're running it off thread, then it shouldn't do anything to performance, assuming, well, your CPU isn't fully used up
Memory should be fine for SQL then
Unlikely that you'll hit a lot of usage
if u send a message like GetServer in channel BungeeCord will it work? is the plugin message system exactly the same for velocity?
Yes
It is
all right ty
Since events are async you should be fine
oh and when is rhe earliest i can send a resource pack?
ahh nm ill just use ServerPostConnectEvent
That's... interesting
Shouldn't it be possible to inline that entire chunk to just feed the inputstream from the classloader directly into the parser?
Oh... no
It seems that file is used to generate the default data because the builder doesn't accept another form
So, it's used, only because the code around the builder doesn't allow anything else
But it used right there on line 423&3 ?
Loading the file after that is just to ensure the copy succeeded
is @Inject from the constructor in the plugin like
where is it from???
is it com.google.inject
or the javax one
Si
how would i make a configuration in a velocity plugin
a yaml configuration
idk if velocity has any api for that...
The google's one
It clearly shown in Velocity dev docs
where
no it doesn't
oh i thought you mean the config one
how do I make a yaml config
configurate? ok
is thee any javadocs
ty\
how are you supposed to get a ChannelIdentifier
ChannelIdentifier identifier = MinecraftChannelIdentifier.create("pluginname", "name");
=
pluginname.name
Velocity but is it running on Logback or Log4J? 🍍
Did had to squish out a bug with, uh, ANSI where it shouldn't be
Did whitelist plugin for velocity exists?
how I understand I need to write it here
just make a plug-in with a file of UUIDs
add a listener for when players connect and deny connection if they’re not on the list
or use a permission plugin and block logins based on missing permissions (might be easier)
After updating Velocity to the latest version all chat messages plugins send to the player have a "<>" prefix, is this a bug?
yes
I have exactly the same problem!
are you using carbonchat proxy?
If using via, use the latest dev version of it
but the latest version is not the same as "-DEV"
wut
it's an issue in velocity, youll need to wait for them to fix it
Has anyone considered adding more command-line arguments to velocity? specifically --host, --online-mode, etc
just thought I'd ask before creating an issue/pr
i feel like brigadier is missing something
how would i get a player as an argument?
LiteralArgumentBuilder.<CommandSource>literal("command")
.executes(cmd -> {
CommandSource source = cmd.getSource();
//With casting:
if(source instanceof Player player){
String playerName = player.getUsername();
}
//With pointers
String name = cmd.getSource().pointers().get(Identity.NAME).orElse("Console");
return Command.SINGLE_SUCCESS;
}).then(RequiredArgumentBuilder.<CommandSource, String>argument("player", StringArgumentType.word())
.suggests((ctx, builder) -> {
proxy.getAllPlayers().forEach(player -> builder.suggest(player.getUsername());
return builder.buildFuture();
})
.executes(cmd -> {
//Player from an argument
String playerName = StringArgumentType.argument("player", cmd);
Player player = proxy.getPlayer(playerName);
})
tysm
That's for getting the player that executed the command. If you meant getting <player> from /command <player>, you need to add a RequiredArgument node to the tree
4drian3d wrote a pretty good guide on the wiki, see https://docs.papermc.io/velocity/developers/command-api
how many wikis are there
iirc the wiki on velocitypowered.com is being phased out in favour of Paper's
For now, they mostly host the same contents
okay ty
oh that doc is sooo much better than i remember it being
FYI, I like to use https://github.com/Incendo/cloud, simplifies a lot of the brigadier stuff imo
Unless it is used for a bungeecord plugin or in older versions of bukkit, I would personally prefer to use brigadier. In some cases I even access nms only to use brigadier 😅
its all a matter of preference ig ¯_(ツ)_/¯
whatever makes the plugin run
can anybody tell how if there's a way to either obtain a list of all registered Commands on the server or get a registered command by name?
no, velocity doesn't store that info
what's the xy?
unless you mean proxy commands
uh yep i mean proxy commands
there's a getAliases method on the command manager
but that only tells you if a command is registered
mhm i saw that one.. thanks thou :D


