#velocity-dev

164 messages · Page 9 of 1

rigid vine
#

Thanks ^^ It's built now. But I'm not sure, if bstats is working

#

doesn't look like it :/

vernal compass
#

you probably also should shade it into something like eu.prellberg.nick.velocityplus.bstats so it does not conflict with your own classes. At least iirc thats the correct way of doing that

rigid vine
#

and what do I need to add to the class?

#

Okay. I need to go to sleep now. It's 1 AM for me 😅

rigid vine
bold wharf
#

You create an instance of bstats Metric class

#

the plugin id you get from bstats when you create the plugin on there

rigid vine
bold wharf
#

like you create an instance of any class

rigid vine
#

Sorry, if I ask too many questions 😅 I'm a little bit sleepy right now

bold wharf
#

new Class()

#

oh, looks like it's different on velocity, they do injection

rigid vine
#

Okay. :/ I can't get it to work. I'm trying it later.

Good night wAvE

restive idol
#

Uhm, is normal that velocity isn't recognizing Title method contained into kyori?

burnt dragon
#

what do you mean by "isn't recognising"?

restive idol
#

here is the error

burnt dragon
#

you're building against a version of velocity that includes an adventure api higher than the one your server is using

#

that specific method was only added one or so minor adventure versions ago

restive idol
#

i'm actually building on 3.1.2-snapshot

#

is that the problem?

burnt dragon
#

if your server isn't running on 3.1.2-SNAPSHOT then yes

restive idol
#

thanks man

#

🙂

ruby spear
#

so I don't think there's a reliable way to check if a player truly disconnected if they were connected from velocity

#

DisconnectEvent fires for various reasons even if they didn't disconnect, you could check if the server is present but that wouldn't work either since there's a bug where if you get kicked the server isn't present in the event

#

reported the issue a while back but there hasn't been any signs it's getting fixed or even if it's supposed to do that

#

there's also a similar bug with the kick event so I'm afraid that won't work either

tender spruce
#

Could somebody point me in the right direction for sending and receiving data from a backend server (fabric/quilt if it makes a difference)

ebon siren
#

There are 3 ways to do this
Sql: good for large amounts of data, but needs a sql server set up
Plugin messages: easier to do, but requires a player connected to the server
Sockets: doesn't require an external server, works without players online, but is probably the most difficult to set up

knotty mica
#

Redis is also good for latency, but it does also need a redis server

night forum
#

Yo is there any tutorials on how to use plugin messages in velocity cant seem to find any

ebon siren
#

(maybe read the javadoc)

oblique haven
#

There’s even a tutorial on the javase site about creating an echo server which is all most people need to know about sockets when running an MC server

oblique haven
bold wharf
#

I mean, sockets require a central server still, and you're basically going to start going down a potential rabbit hole of solving issues already solved by other solutions

#

There are message brokers written in pure java which are probs a better bet unless you're just shoving crap together

#

they're not really all that hard to create, however, it's just a stream of data and a bit of glue

oblique haven
bold wharf
#

sending data over sql is cancer, but, I mean, within this community, theres hosts which don't think MySQL servers are even important enough still (and people still stupid enough to be paying them) o.O

#

I mean, that's just making the proxy your central server

oblique haven
bold wharf
#

for private stuff, generally, prefer a broker

oblique haven
#

Either way - rabbit or nats is going to be better than whatever people could whip up in the 10 minutes it’d take to make a socket system so it’s better that way

bold wharf
#

for public plugins, bahahahahaaaa

oblique haven
oblique haven
bold wharf
#

there was some benchmarks somewhere, I kinda wanna say that velocity was slower in some respects but more stable overall vs what bungee did to speed that up

#

entity metadata rewriting

#

they didn't do anything to speed it up, just that horror show means that they avoid resetting the client state properly when switching servers, etc

#

first connection, idk if anybody ever really compared that

bronze yoke
#

oh no that’s just because mojang added a 2s delay before closing the ‘Loading terrain’ screen

bronze yoke
#

yup

dire saddle
#

Shouldn't

@Inject
@Named("pluginIdHere")
private PluginContainer container;

correctly inject the plugin container for the specified id?

#

plugin manager has bindings for it so I'd assume it works Thonk

chrome verge
#

hm

#

you can try debugging by injecting the com.google.inject.Injector and using Injector#getAllBindings()

fossil sundial
#

Yea that makes bungeecord even slower because they send a redundant respawn packet

fossil sundial
ruby spear
#

server is null

#

the problem is, I only want to detect if they disconnected if they truly connected to the proxy, like were connected to a server

#

but you can't, because if you get kicked server is null

fossil sundial
ruby spear
#

unsure

fossil sundial
#

If it’s not PRE_SERVER_JOIN then the server is present when the event is fired

ruby spear
#

someone responded to the issue trying to break it down, idk if you saw

#

it's really easy to replicate at least

viral blade
#

How does one listen for plugin messaging channels on velocity?
I can't manage to figure it out

rich hawk
#

can that get pinned? it was pinned in the velocity discord

lunar quail
#

is there an api for config files or unlike bukkit do I have to take care of this myself?

oblique haven
#

But you can just shade and use whatever

viral blade
#

Any thoughts as to why this (paper-API code)

        this.getServer().getMessenger().registerIncomingPluginChannel(this, "trials:request", new RequestListener());

would not receive requests from this?

player.sendPluginMessage(MinecraftChannelIdentifier.create("trials", "request"), new byte[0]);
#

the player is on the server

fossil sundial
viral blade
#

thank you! works perfectly

boreal shore
#

When I use shadowJar plugin with velocity api should I use jar builded by shadowJar task as the plugin jar, right?

burnt dragon
#

i mean, why would you use the shadow jar without using the shadow jar

ebon siren
#

Iirc it ends with -all.jar, and yes, you should use that one

verbal tartan
#

Im working on converting some classes from bungee to velocity can anyone help me with that and is it ok to ask here

rich hawk
#

yes

verbal tartan
#

ok

#
        TextComponent component = new TextComponent(TextComponent.fromLegacyText(pData.get("message").getAsString()));
        if (pData.get("clickEventAction") != null)
            component.setClickEvent(new ClickEvent(ClickEvent.Action.valueOf(pData.get("clickEventAction").getAsString()), pData.get("clickEventValue").getAsString()));
        if (pData.get("hoverEventAction") != null)
            component.setHoverEvent(new HoverEvent(HoverEvent.Action.valueOf(pData.get("hoverEventAction").getAsString()), TextComponent.fromLegacyText(pData.get("hoverEventValue").getAsString())));
        for (JsonElement element : pData.getAsJsonArray("extras"))
            component.addExtra(toTextComponent(element.getAsJsonObject()));
        return component;
    }```
#

Im trying to figure out the TextComponent events having lots of issues

#

the first link I think i can translate to TextComponent component = Component.text(pData.get("message").getAsString());

#

but the events are an issue for me

hidden gale
#

adventure đŸ„”

verbal tartan
#

but very confused about events

#

with adventure

rich hawk
#

use GsonComponentSerializer

verbal tartan
rich hawk
#

no

#

well yes

#

but not the last part

verbal tartan
rich hawk
#

yes

#

then either deserialize or serialize

verbal tartan
#

what should i be passing?

rich hawk
#

a string

#

which is json

verbal tartan
#

ok

#

GsonComponentSerializer.gson().deserialize(pData.get("clickEventAction").getAsString())

rich hawk
#

no

steady trellis
#

why no adventure sadpepega

rich hawk
#

you should serialize your component to a json string

steady trellis
#

that doesnt look like adventure or is it

rich hawk
#

then deserialize it back to a Component

steady trellis
#

i swear their events were like .hoverEvent and .clickEvemt

atomic leafBOT
steady trellis
#

event

#

not set

#

oh

#

nvm i read ur msg

#

ur trying to move from bungee to velocity

verbal tartan
steady trellis
#

yeah if u want to use adventure make ur life easier and use minimessage tbh

atomic leafBOT
verbal tartan
#

so the classes were just dropped on me

steady trellis
#

sad

#

yeah i'd recommend just using minimessage, add placeholders, then use replaceText

verbal tartan
#

and I have never done velocity coding so I have no clue what im doing

steady trellis
#

ah

verbal tartan
#

ive only done forge and spigot

verbal tartan
#

hence why im just looking to like make it work

steady trellis
#

though velocity is on like 3.1.2 now or smthn the old documentation somewhat works still

verbal tartan
#

yea

lunar quail
#

how can I disable these stacktraces?

#

if this is even possible

#

also, are there any plugin channels that always have some messages sent through it (to test the listener)? listening on PluginMessageEvent doesn't seem to work, but PlayerChannelRegisterEvent shows that channels are registered.

Listener code:

import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.event.connection.PluginMessageEvent;
import com.velocitypowered.api.event.player.PlayerChannelRegisterEvent;

public class VoiceProxyListener {

    @Subscribe
    public void onPluginMessage(PluginMessageEvent e) { // no output
        System.out.println("e.getIdentifier() = " + e.getIdentifier());
    }

    @Subscribe
    public void onRegisterChannelEvent(PlayerChannelRegisterEvent e) { // shows a bunch of fabric-specific channels and some mods' channels
        System.out.println("e = " + e);
    }

}

Listener registration code in the main plugin class:

@Inject
private ProxyServer proxyServer;

@Subscribe
public void onProxyInitialization(ProxyInitializeEvent e) {
    this.proxyServer.getEventManager().register(this, this.voiceProxyListener = new VoiceProxyListener());
}
vestal prawn
agile ore
#

minecraft:brand, but that might be filtered out

lunar quail
#

it's a part of login sequence, so probably it's filtered out

lunar quail
# vestal prawn You can try the Lunar channel and test with lunar client
[13:10:15 INFO]: [connected player] l_MrBoom_l (/***:35492) has connected
[13:10:16 INFO]: [server connection] l_MrBoom_l -> main has connected
[13:10:16 INFO]: e = PlayerChannelRegisterEvent{player=[connected player] l_MrBoom_l (/***:35492), channels=[transfer:channel (modern)]}
[13:10:16 INFO]: e = PlayerChannelRegisterEvent{player=[connected player] l_MrBoom_l (/***:35492), channels=[worldedit:cui (modern)]}
[13:10:16 INFO]: e = PlayerChannelRegisterEvent{player=[connected player] l_MrBoom_l (/***:35492), channels=[worldedit:cui (modern)]}
#

still no output from VoiceProxyListener#onPluginMessage(PluginMessageEvent)

lunar quail
vestal prawn
#

weird

#

i think i can't remember

dire saddle
#

Am I able to listen on the main bungeecord plugin messaging channel on Velocity somehow? I've got these in the main class and getting no logging, even though the backend plugin should be sending messages

fossil sundial
lunar quail
fossil sundial
#

They’re called for all registered channels on the proxy with the exception of the bungeecord:main channel if the proxy has it activated
The Minecraft channels brand register and unregister can also not be used

lunar quail
#

sorry for pinging if you don't like it

#

it's either me doing something wrong or it's a velocity bug

fossil sundial
lunar quail
#

I have PlasmoVoice plugin installed on the backend (Paper), it should send something through plasmo:voice plugin channel

fossil sundial
#

Then register that channel on the proxy

#

If you want to listen to it

lunar quail
#

They’re called for all registered channels on the proxy
by registered, you mean only those that I register with the plugin on the proxy, not all client/server-registered channels?

fossil sundial
#

Those aren’t registered on the proxy
The proxy only acknowledges channels as registered if (some) plugin registered it

lunar quail
#

ok thanks

fossil sundial
#

The player/server channel register event exists so you can see what’s going on and dynamically choose to listen to it (by registering them)

#

I’ve got a pretty bad headache I hope that was at least somewhat understandable

lunar quail
#

won't registering the channel (that exists on the server) on the proxy break something?

fossil sundial
#

You can totally break plugins and stuff yes

#

But that’s to be expected if you’re tampering with data

#

In any case the plugin message event has a result. How the data is handled is decided by the result (pass it on to the other end or don’t)

lunar quail
#

ok, thanks, I got it

ashen fiber
#

Imagine if velocity had a good tablist and teams api

#

Imagine

lunar quail
#

but they won't do it probably, since it will be unused in the vanilla server/client

ashen fiber
#

The current solution is to put each player in a team, and then give the teams numeric names to sort them.

#

But velocity does not let you do that. kekwhyper

lunar quail
ashen fiber
lunar quail
#

not sure what's better, because I've never used waterfull or bungeecord, but velocity looks more modern to me

ashen fiber
#

Well it is

#

But if you can't get the functionality you need, then the choice is made for you.

lunar quail
ashen fiber
#

I mean feel free to try.

#

Would be cool

lunar quail
#

off-topic: do you have transparent avatar or is it discord having issues or me?

ashen fiber
#

Check my about.

lunar quail
#

I've seen 2 people with transparent avatar today

#

oh what a coincidence lol

agile ore
#

it's very confusing when reading quickly lol

ashen fiber
#

Lol

#

I have had people complain about it

#

I had one server permanently mute me for it.

#

I don't care.

vestal prawn
#

it works by alphabetically order

#

so you can't use 1,2,3, 4 and stuff

#

except if you are below 10

lunar quail
#

yes, I solve this problem with teams

steady trellis
#

if i were to set a placeholder for the version string in the plugin annotaton, how would i have gradle (kotlin dsl) replace it on build?

burnt dragon
#

you can use a tool like kyori's blossom to do source file replacement

agile ore
burnt dragon
#

you can just listen to the choose initial server event and override that behaviour entirely

agile ore
#

okii

lunar quail
#

how can I modify data that is sent with a plugin message in PluginMessageEvent? should I set result to handled and then send a new message to the target from getTarget() method?

fossil sundial
fossil sundial
steady trellis
#

hey five whats so major abt polymer

lunar quail
steady trellis
#

why is /glist not runnable in game

#

it says unknown

rich hawk
#

no permission

steady trellis
#

player is opped tho

#

or does that not mean anything

#

oh right it doesnt

#

opped is a backend only thing

bold wharf
#

Well, velocity doesn't know if the player is op'd

steady trellis
#

does velocity have a permissions per user thing like bungee did

rich hawk
#

no

bold wharf
#

use a perm plugin like LuckPerms

rich hawk
#

use a permission plugin

steady trellis
#

gotchu thanks

verbal tartan
#

how do you add a softdepend?

fresh lark
#

i believe its a tag inside your plugin.yml file

softdepend:
  - <PLUGIN>
  - <PLUGIN2>
hushed sierra
#

velocity doesn't use plugin.yml

fresh lark
#

Wrong channel T_T

#

my bad

hushed sierra
fresh lark
#

could've sworn this was paper dev 😭

empty crow
#

Is there a way to ignore a ProxyPingEvent event to hide a server existing without having to use a firewall to accomplish something like this?

verbal tartan
#

anyone have any idea why velocity is freaking out about this?: [23:29:15 ERROR]: Couldn't pass ProxyInitializeEvent to partyandfriends java.lang.LinkageError: loader constraint violation: loader com.velocitypowered.proxy.plugin.PluginClassLoader @5136207f wants to load class redis.clients.jedis.JedisPool. A different class with the same name was previously loaded by com.velocitypowered.proxy.plugin.PluginClassLoader @11a00961. (redis.clients.jedis.JedisPool is in unnamed module of loader com.velocitypowered.proxy.plugin.PluginClassLoader @11a00961, parent loader 'app')

#

working on something and I just keep getting stone walled by this

novel bridge
#

you likely have two plugins competing against each other, in that both package jedis but aren't relocating it

verbal tartan
#

ah

#

ok

verbal tartan
#

how do I get around that?

burnt dragon
#

by relocating it

verbal tartan
#

Yeah how do I do that

bold wharf
#

depends on what build system you're using

verbal tartan
#

Maven

bold wharf
#

maven shade/gradle shadow both support relocating classes, suggest seeing their docs/looking at examples

verbal tartan
#

Ok

jovial bear
#

Hello, so basically im moving to Velocity soon but not used to its API, could anyone of u help me w smth simple ig

im just tryna make a /hub plugin

#

but dk how to connect player to a certain server

robust mural
#

Player#createConnectionRequest

hidden gale
#

You can close the connection with netty if incomming if beats the limit,but is better an Firewall

opaque escarp
empty crow
verbal tartan
#

How using maven do you relocate a class

opaque escarp
#

With maven shade plugin

turbid jay
#

Is there a way to add a new RegisteredServer? I'm trying to add a server on the fly instead of on startup.

burnt dragon
#

ProxyServer#registerServer

stray turret
#

I can't seem to find a configuration api in the docs, is there any?

fossil sundial
lunar quail
#

how do I register an incoming plugin channel (on paper server) so that the player's client does not know that there is such a plugin channel and cannot send messages over it?

#

this plugin channel should only exist between the proxy and the server

rich hawk
#

you check if the message came from a player and if it does ignore it

alpine glacier
#

How can I register plugin message?

#

I need to send something from paper to velocity

rich hawk
#

message above you

alpine glacier
#

I see

#

How can I send it from paper though

rich hawk
ebon siren
#

How can you get a list of all registered servers?

burnt dragon
#

ProxyServer#getServers or something

#

javadocs are your friend

rich hawk
alpine glacier
#

Does not work for me so idk

rich hawk
#

did you register the channel?

alpine glacier
#

Paper does not throw any error but velocity does not retrieve anything

rich hawk
alpine glacier
rich hawk
#

what is custom channel?

#

also you should use your own namespace

alpine glacier
rich hawk
#

i don’t think you can listen to bungeecord:main

bold wharf
#

You're not bungeecord ^

alpine glacier
#

If not that explains it

#

I saw this

#

That is why I used it

bold wharf
#

completely different

#

they're sending bungee plugin channel messages to the proxy to use the built in channel

alpine glacier
#

Oh ok

#

Thanks

#

Gotta say paper documentation and naming convention is much better than Velocity

#

With paper using javadoc was always enough

#

Still does not work

#

I do not really know what I am doing wrong

#

Main class


import com.google.inject.Inject;
import com.velocitypowered.api.event.proxy.ProxyInitializeEvent;
import com.velocitypowered.api.event.Subscribe;
import com.velocitypowered.api.plugin.Plugin;
import com.velocitypowered.api.proxy.ProxyServer;
import com.velocitypowered.api.proxy.messages.ChannelIdentifier;
import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier;
import org.slf4j.Logger;

@Plugin(
        id = "runcommandonvelocity",
        name = "RunCommandOnVelocity",
        version = "@version@",
        description = "Send messages from nodes to the proxy",
        authors = {"VelocityContributor"}
)
public class RunCommandOnVelocity {
    private Logger logger;
    private ProxyServer proxy;

    @Inject
    public RunCommandOnVelocity(Logger logger, ProxyServer proxy) {
        this.logger = logger;
        this.proxy = proxy;
    }

    // The messaging channel you're going to use as namespaced:key
    private final ChannelIdentifier customChannel =
            MinecraftChannelIdentifier.from("skinsetter:runcommand");

    @Subscribe
    public void onProxyInitialization(ProxyInitializeEvent event) {
        // Register the custom messaging channel
        proxy.getChannelRegistrar().register(customChannel);
        // Register an event handler to catch messages for it
        proxy.getEventManager().register(this, new MessageListener(customChannel, proxy, logger));
    }
}```
fleet sailBOT
alpine glacier
#

Any idea what is wrong

#

This is the sender from paper

rich hawk
#

did you register the outgoing?

alpine glacier
#

Of course

rich hawk
#

start logging stuff

alpine glacier
#

What can I log more

rich hawk
#

on the bukkit side

#

where you’re registering it etc

alpine glacier
#

Yeah but I know that it gets called so what should I log

rich hawk
#

random outputs

#

so you know what logged message is what

alpine glacier
#

I know it gets sent

#

But it never receives it

rich hawk
#

how do you know it gets sent

bold wharf
#

You know it gets sent how?

#

CB has some filtering logic in there which determines what gets out

alpine glacier
#

It prints

bold wharf
#

Yea, no

#

That just says that that logic ran

alpine glacier
#

I mean i know it reaches the point where it should run

bold wharf
#

CB will silently drop messages

alpine glacier
#

Perfect

#

😄

bold wharf
#

need to make sure that the players connection is in the correct phase to send messages, i.e they're in the world, and that velocity actually send the register thing

alpine glacier
#

How do you recommend me to verify those things

bold wharf
#

Not too sure

#

Only reason I became familiar with the filtering logic was through the debugger and stepping into that stuff

alpine glacier
#

I guess I just make a socket than

#

If it just randomly drops my data

#

Why the fuck this is not print something when they drop it

bold wharf
#

did sendPluginMessage have a return value?

rich hawk
#

no

alpine glacier
#

None of those got trown

#

I give up for today I guess

#

I know that luck perms work fine so it has to be something with my message

#

fucking finally

#

Changing the name many times worked

#
[13:59:29 ERROR]: Couldn't pass PluginMessageEvent to runcommandonvelocity
java.lang.IllegalStateException: java.io.EOFException
        at com.google.common.io.ByteStreams$ByteArrayDataInputStream.readUTF(ByteStreams.java:454) ~[velocity.jar:3.1.2-SNAPSHOT (git-45cfbdc7-bunknown)]
        at xyz.crittterz.runcommandonvelocity.MessageListener.onPluginMessageEvent(MessageListener.java:55) ~[?:?]
        at xyz.crittterz.runcommandonvelocity.Lmbda$562.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.1.2-SNAPSHOT (git-45cfbdc7-bunknown)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity.jar:3.1.2-SNAPSHOT (git-45cfbdc7-bunknown)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity.jar:3.1.2-SNAPSHOT (git-45cfbdc7-bunknown)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.io.EOFException
        at java.io.DataInputStream.readFully(DataInputStream.java:203) ~[?:?]
        at java.io.DataInputStream.readUTF(DataInputStream.java:614) ~[?:?]
        at java.io.DataInputStream.readUTF(DataInputStream.java:570) ~[?:?]
        at com.google.common.io.ByteStreams$ByteArrayDataInputStream.readUTF(ByteStreams.java:452) ~[velocity.jar:3.1.2-SNAPSHOT (git-45cfbdc7-bunknown)]
        ... 8 more
#

Now I get this

#

That is good

#

Cause it means it works 😄

#

Fuck yeah I did it

#

Last question does Velocity have something like dispatchCommand()?

rich hawk
#

yes

#

from the command manager iirc

bold wharf
#

^^

alpine glacier
#

Thanks

#

Velocity is so unintuitive

#

The naming conventions is pain

rich hawk
#

explain?

alpine glacier
#

Well overall getRegistrat is weird and commandApi

#

I like Bukkit's/papers naming conventions more

rich hawk
#

bukkit api old, velocity new and better

bold wharf
#

velocities naming can seem weird in some areas, runAsync just feels obtuse and forced

#

But, at the same point, bukkit is a sloppy design from years ago which favoured "ease of use" over sane design, stuff like dispatchCommand shoulda been on the CommandMap, but, bukkit refused to expose the CommandMap, thus it went into Server instead, etc

#

at the same point, getRegisteredServers follow general design sementics of ensuring that methods accuratly describe what they do in as little words as possible, Registered is maybe excess because, ofc, they've gotta be registered for them to be stored in the proxy, but, er, yea

alpine glacier
#

I am not saying they are not better in code sense

#

I just think some names do not make a lot of sense

fossil sundial
#

Here I am, the guy who decided to name the expiry date variable getter for the new public key api getExpiryTemporal
It’s programmatically a perfect description but it’s a bit hard to understand if you’re new to Java

bold wharf
#

and we shall forever judge you for it

alpine glacier
alpine glacier
#

I usually name based on what the thing does instead which name it has in the class

bold wharf
#

invalid data, apparently

#

what did you do?

#

try with a vanilla client, and if you're not doing dev stuff, #velocity-help

#

Well, we don't support protocol hacks

steady trellis
#

hey when i kick someone from the server on the backend, can i make it so it kicks them entirely from the proxy?

#

because i try to specify a kick message but it shows the unable to connect you to... msg

ebon siren
#

We do a little channel messaging

#

Also, proxy-side Player.disconnect()

steady nymph
#

Hey, for some reason my Plugin causes a com.velocitypowered.api.plugin.InvalidPluginException: Did not find a valid velocity-plugin.json. when starting, even tho the Jar contains a velocity-plugin.json which looks fine to me. (I use the Minecraft Dev Plugin for Intellij)

{"id":"velocitybackend","name":"VelocityBackend","version":"1.0-SNAPSHOT","authors":["TeamHelios"],"dependencies":[],"main":"dev.teamhelios.velocitybackend.VelocityBackend"}```
steady nymph
#

okay it appears something gets messed up when its being build by TeamCity, I am just running gradle build. Is there something else I have to change?

#

the jar created by my intellij is about 4 kb, but the teamcity build is about 3 kb (its just barebones Plugin, so there shouldn't be much)

#

but the Jar structure is the same

robust mural
#

is the annotation processor specified?

agile ore
#

is there a way to make our NA and AU proxy member count show the member count of both proxies

rich hawk
#

yes

#

save the player count somewhere in say redis

#

get the count, proxy ping event

#

set it

agile ore
#

Ok

#

thanks

steady trellis
steady trellis
steady trellis
#

looking at velocity source i can serialize it to gson maybe

#

i lied

#

it did not let me

ebon siren
#

Maybe save as MiniMessage?

half shoal
#

Can velocity be configured in an entirely dynamic way?

#

I don't know what socket addy my servers will be at until after it starts up

#
@Subscribe(order = PostOrder.EARLY)
fun onPlayerJoin(event: LoginEvent) {
    event.player.createConnectionRequest(hub).connect().whenComplete { result, error ->
        error?.printStackTrace()
        println(result?.status)
    }
}

haven't tested much yet but simply doing this with invalid hosts in config doesn't work.

bold wharf
#

You can register servers dynamically, etc, yes

half shoal
#

Yeah IK that much, I just cannot remember how to insert myself in before it tries to connect to something that doesn't exist

bold wharf
#

registerServer method on ProxyServer?

half shoal
#
fun allocate(fleet: String): RegisteredServer? {
    val api = DynamicKubernetesApi(
        "allocation.agones.dev", "v1",
        "gameserverallocations", client
    )
    val allocation = DynamicKubernetesObject().apply {
        apiVersion = "allocation.agones.dev/v1"
        kind = "GameServerAllocation"
        raw.add("spec", JsonObject().apply {
            add("required", JsonObject().apply {
                add("matchLabels", JsonObject().apply {
                    addProperty("agones.dev/fleet", fleet)
                })
            })
        })
    }
    val response = api.create("default", allocation, CreateOptions())
    val status = response.`object`.raw.getAsJsonObject("status")
    if (status["state"].asString != "Allocated") return null
    val name = status["gameServerName"].asString
    val host = status["address"].asString
    val port = status.getAsJsonArray("ports").get(0).asJsonObject["port"].asInt
    println("Allocated: $host:$port")
    val info = ServerInfo(name, InetSocketAddress(host, port))
    return server.createRawRegisteredServer(info)
}

but then what? I effectively want to be in charge of deciding where players go as they join

bronze yoke
#

use the ChooseInitialServerEvent to decide what server they will connect to

half shoal
#

Ahah TYVM

steady trellis
whole aurora
#
Invalid ID for plugin net.linebeck.vbasic.internal.Main. IDs must start alphabetically, have alphanumeric characters, and can contain dashes or underscores.

I assume it means this:

@Plugin(
        id = "vBasic",
        name = "vBasic",
        version = "1.0",
        authors = {"Linebeck"}
)

Does this not contain the following described?

sour current
#

Id can't contain uppercase characters

rich hawk
#

that message should probably get changed a little

maiden hawk
#

How big of a performance impact would be blocking move packets from the proxy?

whole aurora
rich hawk
#

do you have perms for it?

whole aurora
#

yes

rich hawk
#

on the proxy?

whole aurora
#

Aye

#

Proxy using Luckperms

#

the perms are just vbasic.use & vbasic.admin which I have both.

rich hawk
#

try using verbose?

#

try making the perms lowercase idk if that matters

whole aurora
rich hawk
#

luckperms verbose

whole aurora
#

What's odd is that luckperms sees vbasic.use when I go to the web portal for it.

rich hawk
#

screenshot /lpv verbose command me <cmd>

#

pretty sure that’s the syntax been a while

whole aurora
rich hawk
#

yeah try making them lowercase in your code

whole aurora
#

When I run the command auto tab complete sees it. It just says "Unknown Command"

rich hawk
#

because you don’t have the right perms, make the permissions lowercase in your code

#

if you don’t have perms for it, it forwards it to the backend server

whole aurora
#

Alright so it is case sensitive. Good to know.

#

Thx

ocean osprey
#

Hello, I am trying to make a selector server and that when they click on a server I send it to that server. But the problem is that I don't know how to send the player there (I already put the API in maven and etc..)

#

someone can help me?

rich hawk
#

click on a server as in a menu?

#

is the plugin you’re trying to make bukkit or velocity?

ocean osprey
#

Ehm, bukkit

#

it's possible?

rich hawk
#

then you need to use plugin messaging

ocean osprey
#

thanks?

fossil sundial
whole aurora
#

Does velocity have a built in YAML api or do I need to get my own?

rich hawk
#

configurate

vapid quarry
#

Hi - I want to send someone to a different server from a velocity plugin (not spigot) on login. I already have the “RegisteredServer” and the login event, I just need to know how to send the player himself. I saw something about a messaging channel above, do I have to use that as well or is there just a method in the Velocity API?

fossil sundial
vapid quarry
#

Oh, that’s a thing?

#

I didn’t know, i’ll look into it. Thanks!

#

I probably need something similar for something else though

fossil sundial
vapid quarry
fossil sundial
#

on a command?

vapid quarry
#

Yeah, when a command gets executed

fossil sundial
#

commands are only usable post-login to a server for the player

vapid quarry
#

A velocity command

vapid quarry
fossil sundial
#

oh

vapid quarry
#

Ahh, I was trying to search for things like “send” or “transfer” on the docs

fossil sundial
#

yea its a bit less straight forward over bungee I admit

vapid quarry
#

And if i wanted to use a spigot command sometime, i’d have to use the messaging channel, correct?

fossil sundial
vapid quarry
#

What do you mean by that exactly?

fossil sundial
#

From where do you want to run a spigot command that should do what?

vapid quarry
#

From the player on a server

#

That should send them to a different one

fossil sundial
vapid quarry
#

Alrighty, tysm. Youre the best peepoLove

fossil sundial
#

What I see most often is people using npcs that trigger a plugin message to connect the player elsewhere

#

If that’s similar to what you’re trying to do then there shouldn’t be any issues

vapid quarry
#

Yea i need something like that as well

#

Npc gets clicked > player runs command automatically > player gets sent to different server

fossil sundial
#

Sounds about right

vapid quarry
#

Awesome

fossil sundial
#

Just know that you can’t force a player to run a velocity command from the spigot server

vapid quarry
#

I should have the inital connect already done, that was easy enough

fossil sundial
#

Cause those don’t exist on the spigot server

vapid quarry
#

With the plugin channel

fossil sundial
#

Yea we get lots of people that try to macro their npcs to run /server name and since it’s a command on velocity they don’t understand why it doesn’t work

vapid quarry
#

It’d be kinda nice if that did work though

fossil sundial
#

Can’t blame them though, doesn’t make a whole lot of sense.
We originally thought about allowing it with modern forwarding but opted against it because brigadier and the horrible legacy command system present on spigot clashed too hard

vapid quarry
#

Yeah.. spigot isn’t the best coded software

#

Couldn’t do better myself though!

fossil sundial
#

I’m currently just basically cooked after working on velocity updates for a positive 8h nonstop

vapid quarry
#

Jeez

fossil sundial
vapid quarry
#

Uff, I wish you the best of luck

raw valve
#

Can i send messages from a paper server to velocity?

#

So i can transfer player from server to server

bronze yoke
raw valve
#

Just the bungeecord one? Thought it was not in velocity

raw valve
#

And is custom data suported?

bronze yoke
#

the bungeecord channel is implemented by velocity

bronze yoke
chilly knot
#

Can someone tell me if it is possible to make a plugin which sets tablist prefixes? (Because i didnÂŽt find something like Scoreboard teams or setPlayerListName)

maiden hawk
#

iirc Velocity does not have support for tablist and scoreboard yet

spiral portal
#

Hello, I keep having this issue sometimes when I join the server, is it something on my end? I have no idea why this happens and sometimes doesn't
https://pastebin.com/raw/Gf0kqC35

atomic leafBOT
#

Please send large files/logs to a pastebin

bold wharf
#

It's failing to resolve a domain, check you network/DNS

#

or, wait, no, didn't fail to resolve, the connection just timed out, brain fart

#

so, either network issues, or, DNS 😄

raw valve
#

How do you get a player for a PluginMessageEvent

bold wharf
#

either the source or the destination can be casted to something which represents the player

#

see the JDs

raw valve
#

I send a message via paper and give a player with it but how do i get it? ```java
player.sendPluginMessage(plugin, "PARKOUR", out.toByteArray());

raw valve
#
[19:21:21 ERROR]: Couldn't pass ProxyInitializeEvent to proxy
java.lang.IllegalArgumentException: identifier is unknown
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.util.VelocityChannelRegistrar.register(VelocityChannelRegistrar.java:40) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at nl.timnl.dtw.proxy.Proxy.registerChannel(Proxy.java:64) ~[?:?]
        at nl.timnl.dtw.proxy.Proxy.registerChannels(Proxy.java:60) ~[?:?]
        at nl.timnl.dtw.proxy.Proxy.onProxyInitialization(Proxy.java:48) ~[?:?]
        at nl.timnl.dtw.proxy.Lmbda$5.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]``` i get this error
#
private void registerChannel(IChannelIdentifier channelIdentifier) {
        proxyServer.getChannelRegistrar().register((ChannelIdentifier) channelIdentifier);
        channels.put(channelIdentifier.getId(), channelIdentifier);
    }``` called on init.
```java
public interface IChannelIdentifier extends ChannelIdentifier {
    void onMessageRecive(PluginMessageEvent event);
}``` The interface.
```java
public class ParkourChannel implements IChannelIdentifier {

    private final ProxyServer proxyServer;
    private final TeamLoader teamLoader;

    public ParkourChannel(Proxy proxy) {
        this.proxyServer = proxy.getProxyServer();
        this.teamLoader = proxy.getTeamLoader();
    }

    @Override
    public String getId() {
        return "PARKOUR";
    }

    @Override
    public void onMessageRecive(PluginMessageEvent event) {

        DataInputStream dataInputStream = new DataInputStream(new ByteArrayInputStream(event.getData()));

        if (event.getSource() instanceof Player) {
            Player player = (Player) event.getSource();
            try {
                String command = dataInputStream.readUTF();

                switch (command) {
                    case ("SEND"):
                        sendCommand(player);
                        break;
                }
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }

    private void sendCommand(Player player) {
        RegisteredServer parkour;
        Team team;

        if (proxyServer.getServer("parkour").isPresent()) {
            parkour = proxyServer.getServer("parkour").get();
            try {
                team = teamLoader.getTeam(player.getUniqueId());
                if (team == null) {
                    return;
                }

                Player teamCaptain = team.getTeamCaptain();
                Player teamMember = team.getTeamMember();

                teamCaptain.sendMessage(Component.text("test"));

                teamCaptain.createConnectionRequest(parkour);
                teamMember.createConnectionRequest(parkour);

            } catch (SQLException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
```the class
bronze yoke
#

the identifier has to be along the lines of namespace:path

#

iirc

raw valve
bronze yoke
#

what's line 64 of Proxy

#

or line 48

raw valve
#
proxyServer.getChannelRegistrar().register(channelIdentifier);
raw valve
fossil sundial
raw valve
#

Ah i did now i get this error: [20:06:45 ERROR]: Couldn't pass ProxyInitializeEvent to proxy java.lang.IllegalArgumentException: com.velocitypowered.proxy.VelocityServer does not have a container. at com.velocitypowered.api.plugin.PluginManager.lambda$ensurePluginContainer$0(PluginManager.java:69) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)] at java.util.Optional.orElseThrow(Optional.java:403) ~[?:?] at com.velocitypowered.api.plugin.PluginManager.ensurePluginContainer(PluginManager.java:69) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)] at com.velocitypowered.proxy.event.VelocityEventManager.register(VelocityEventManager.java:343) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)] at nl.timnl.dtw.proxy.Proxy.registerChannel(Proxy.java:68) ~[?:?] at nl.timnl.dtw.proxy.Proxy.registerChannels(Proxy.java:61) ~[?:?] at nl.timnl.dtw.proxy.Proxy.onProxyInitialization(Proxy.java:49) ~[?:?] at nl.timnl.dtw.proxy.Lmbda$5.execute(Unknown Source) ~[?:?] at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)] at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)] at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) [?:?]

fossil sundial
#

You did something wrong in your main class?

#

I’m guessing you called the event manager with an argument that’s not a plugin main class object

raw valve
#

Yes and fixed it. Now i get something about hikaricp which i use but it gives this error:

[20:10:21 ERROR]: Couldn't pass ProxyInitializeEvent to proxy
java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariConfig
        at nl.timnl.dtw.proxy.storage.database.ConnectionManager.startConnection(ConnectionManager.java:28) ~[?:?]
        at nl.timnl.dtw.proxy.storage.database.ConnectionManager.<init>(ConnectionManager.java:19) ~[?:?]
        at nl.timnl.dtw.proxy.Proxy.onProxyInitialization(Proxy.java:52) ~[?:?]
        at nl.timnl.dtw.proxy.Lmbda$5.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassNotFoundException: com.zaxxer.hikari.HikariConfig
        at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:85) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass(PluginClassLoader.java:62) ~[proxy.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        ... 10 more```
fossil sundial
#

We don’t provide those. You’ll have to shade and relocate that library

raw valve
#

Ah thats the problem

fossil sundial
#

I highly recommend you check it out; still needs to be made part of the official documentation

raw valve
#

And how to send via papermc?

raw valve
#
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("SEND");
player.sendPluginMessage(plugin, "dtw:parkour", out.toByteArray());``` this does not work
fossil sundial
#

What’s your version

raw valve
#

Or you mean server version?

#

1.18.2

fossil sundial
raw valve
#

Ah that was it

raw valve
#

I did but with the wrong identifier

raw valve
#

Is it wrong to send it via a player?

raw valve
#

Im gonna use redis

raw valve
#

Nevermind i forgot to register the command đŸ€Š

restive idol
#

is possible to check if a command has argument using CommandExecuteEvent?

craggy pecan
#

The event only provides the raw command input and shouldn't be used for parsing

#

But a dirty solution is to check if that string contains a white space ' ' character

sick ether
#
[21:48:58 INFO]: [server connection] Jakubixoo -> arenaBW has connected
[21:48:58 INFO]: [server connection] Jakubixoo -> LobbyBW has disconnected
[21:49:00 ERROR]: Couldn't pass PlayerChatEvent to velocitycore-rafi
java.lang.IllegalArgumentException: plugin is not registered
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.scheduler.VelocityScheduler.buildTask(VelocityScheduler.java:70) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at pl.rafi67000.velocitycore.listener.ChatListener.onChat(ChatListener.java:48) ~[?:?]
        at pl.rafi67000.velocitycore.listener.Lmbda$70.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]

what's wrong? can someone help

                VelocityCore.server.getScheduler()
                        .buildTask(VelocityCore.server, () -> spammed.remove(player))
                        .delay(3L, TimeUnit.SECONDS)
                        .schedule();

my code

rich hawk
#

you need to pass your plugin instance not proxy server instance

sick ether
#

how can I get plugin instance bruh

#

I'm stupid I know

fossil sundial
sick ether
#

own

fossil sundial
#

the object thats generated from the class that has the @Plugin annotation is your plugin instance

#

you can use the proxyServer to get your plugin container

#

but I dont see why you would want to do that

sick ether
#

^^

fossil sundial
#

just pass your plugin instance down to where you run that?

#

I dont understand your issue

fossil sundial
#

but alas I would link you to the apidocs to get your plugin instance

#

but I cant because one of the other staff broke the velocity apidocs for the time being

#

sorry

sick ether
fossil sundial
#

404

fossil sundial
#

well thanks cloudflare, cache is stale

#

am getting a 404 myself

sick ether
#

and I have question can I reduce "cannot connect to server" console log?

fossil sundial
#

with a custom log filter yes

sick ether
#

because I have many players and my console is one big error if any server is off

fossil sundial
#

https://jd.papermc.io/velocity/3.0.0/com/velocitypowered/api/plugin/PluginManager.html#getPlugin(java.lang.String)

Optional<PluginContainer> optionalContainer = proxyServer#getPluginManager#getPlugin(String id);
if (optionalContainer.isPresent()){
PluginContainer container = optionalContainer.get();
Optional<Object> optionalInstance = container.getInstance();
if (optionalInstance.isPresent()) {
Object plugin = optionalInstance.get();
}
}

sick ether
#

thanks

fossil sundial
# sick ether thanks

you’re much better of just having a
public static VelocityCore instance;

public VelocityCore(
) {
instance = this;
}

#

that said I still dont really approve of that

sick ether
# fossil sundial that said I still dont really approve of that

ok so what I can do with this?

[21:48:58 INFO]: [server connection] Jakubixoo -> arenaBW has connected
[21:48:58 INFO]: [server connection] Jakubixoo -> LobbyBW has disconnected
[21:49:00 ERROR]: Couldn't pass PlayerChatEvent to velocitycore-rafi
java.lang.IllegalArgumentException: plugin is not registered
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.scheduler.VelocityScheduler.buildTask(VelocityScheduler.java:70) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at pl.rafi67000.velocitycore.listener.ChatListener.onChat(ChatListener.java:48) ~[?:?]
        at pl.rafi67000.velocitycore.listener.Lmbda$70.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity.jar:3.1.2-SNAPSHOT (git-aa38d3e5-b137)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
#

you dont approve of that so what I can do with this

bold wharf
#

How are you getting the plugin reference there?

fossil sundial
#

this just screams to me like you dont have a correct plugin main class

bold wharf
#

(cos, like, idk what you're doing, but, you're clearly grabbing something it's not happy with)

fossil sundial
#

does your main class have the @Plugin annotation

sick ether
#

yes

fossil sundial
#

and if yes does your buildsystem respect and run the velocity annotation processor

#

also

#

now I am confused

sick ether
#

that's my chat class and I wanna remove player from spammed arraylist

#

but this sheduler don't work

fossil sundial
#

this isn’t the issue

#

the buildTask uses server instead of your plugin

half locust
#

what is that permission node...

fossil sundial
#

ALSO the way you’re registering the listener is wrong

steep glade
#

TextColor.color(NamedTextColor.RED) đŸ€”

novel bridge
#

whole bottom section could be replaced with a Caffeine cache, but what I don't get here is that unless a player has that specific permission, they just won't be able to talk at all

fossil sundial
#

sorry i was wrong, but yea, replace server with your plugin instance

#

you could just
public class ChatListener {

private final VelocityCore instance;

public ChatListener(VelocityCore instance) {
    this.instance = instance;
}




}

and do .registerListener(this, new ChatListener(this)) to register it

#

and then pass instance instead of proxy

silent breach
#

Hi, when I put the bungeeguard in the server of velocity appear this

hushed sierra
#

it says the error pretty clearly

strong nest
silent breach
bold wharf
#

BungeeGuard is not a velocity plugin

#

in fact, velocity has native bungeeguard support, you just need to enable it in the config for velocity

#

then you need the plugin on the backend server

silent breach
#

Ok, but I need to active the bungee in every server or only in the velocity?

bold wharf
#

you need bungeeguard on all the servers

silent breach
bold wharf
#

See the player info forwarding stuff

full crescent
#

how can i get the list of arguments in a command as a String[] from a CommandContext<CommandSource>?

fossil sundial
bold wharf
#

Well, you can't just "block" said packets without causing a desync, unless the server is going to be forcing them back periodically

#

so, just blocking packets, practically nothing, depending on how you do it

#

if you wanna make the client actually try and stay where they are vs just blocking them, much more involved

maiden hawk
maiden hawk
bold wharf
#

I mean, if you block the packet, the client will still move

queen girder
#

how does cancelling the move event work then, does the server send a packet to move the client back then?

fossil sundial
#

You also desync the player entirely with that. You can’t just swallow the move packets and the server will expect answers from the client if anything were to collide with the player hitbox

#

So no, not impossible, however very impractical and hard

bold wharf
#

cancelling the move event teleports you back

inner surge
#

Let's say i'm trying to port my server to two different locations, US and EU

#

What is the ping relation between both, having only 1 proxy in US

#

To reach the most low ping do I need an EU proxy within the US proxy too?
Or its not needed and what really matters is in what server the player is, I'm just wondering

covert folio
#

trafic always goes through the proxy they are connected to

bold wharf
#

^

inner surge
#

That includes everysingle packet the player sends?

bold wharf
#

Yes.

#

It's literally a proxy

inner surge
#

Alright, then i have my answer

#

thanks guys

final stirrup
#

I'm very new to java and I'm getting the following error.

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project ServerManager: Compilation failure
Invalid ID for plugin io.minematic.servermanager.ServerManager. IDs must start alphabetically, have alphanumeric characters, and can contain dashes or underscores.

I obviously understand what this means but I have no idea what its referring too. Can I not have . in my package? I'm really confused.

Any help is appreciated

bold wharf
#

package is irrelevant

#

it's the name, basically

#

needs to be lowercase alphanumerical

final stirrup
#

Where should I change that?

bold wharf
#

your plugin annotation

final stirrup
#

ahh

#

ty

#

it compiles!

#

thanks a lot

final stirrup
#

How would I go about putting a library in my plugin? I want to have REST API support for something I'm working on

#

I've tried adding this to my pom.xml

<dependency>
    <groupId>com.konghq</groupId>
    <artifactId>unirest-java</artifactId>
    <version>4.0.0-RC2</version>
</dependency>
#
java.lang.NoClassDefFoundError: kong/unirest/Unirest
        at io.minematic.servermanager.ServerManager.onProxyInitialization(ServerManager.java:40) ~[?:?]
        at io.minematic.servermanager.Lmbda$1.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.1.2-SNAPSHOT (git-3ae93875-b139)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity.jar:3.1.2-SNAPSHOT (git-3ae93875-b139)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity.jar:3.1.2-SNAPSHOT (git-3ae93875-b139)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassNotFoundException: kong.unirest.Unirest
        at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:85) ~[velocity.jar:3.1.2-SNAPSHOT (git-3ae93875-b139)]
        at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass(PluginClassLoader.java:62) ~[velocity.jar:3.1.2-SNAPSHOT (git-3ae93875-b139)]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        ... 8 more
bold wharf
#

you'd need to shade the library into your own plugin using maven shade

final stirrup
#

I'm sorry but can you explain that, I'm not super familiar with all the terms

bold wharf
#

Not really, am half dead

fleet sailBOT
final stirrup
#

i'll look it up then

final stirrup
final stirrup
#

I don't know if you will see this, but ty a lot electroniccat, I got my things working

maiden hawk
bold wharf
#

yes

mild crest
#

currently it's not possible to disable the message logging from console commands feedback (VelocityConsole$sendMessage) in the logs. Do you mind a PR to add a config option to disable that?

bold wharf
#

can you not just fake a sender or something?

#

I don't really see a reason to disable command feedback in general as it just creates its own set of fun issues

mild crest
#

I don't want to disable it completly, I just don't want to log it to the log file. Output to System.out should be still there.

mild crest
#

okay, I added a command without user feedback for that. dump Multicraft without any config options for that...

craggy pecan
languid rover
#

Hi! I'm following the docs on docs.velocitypowered.com but have gotten a bit stuck

...
import com.velocitypowered.api.command.Command;
...

public class CommandTest implements Command {
    @Override
    public void execute(@NonNull CommandSource source, @NonNull String[] args) {
        return;
    }
}

but I am getting error Method does not override method from its superclass.

#

am I supposed to use this? looking at the jdoc I see InvocableCommand, RawCommand and SimpleCommand

#

any ideas?

#

I'm really confused here. The master branch on github has an actual Command class but on dev/3.0.0 that's...

oblique haven
#

It’s the easiest implementation

languid rover
#

I still can't quite figure out how to register the command though

#

nvm i think i got it

languid rover
#

afaik Tebex (formetly Buycraft) only has a plugin for Bungeecord. No idea whether that's compatible. In any case, this is development support (at least I think so) so maybe you should ask on #velocity-help

ruby spear
bronze yoke
#

(this one isn't compatible with velocity 3.0.0 ^)

languid rover
#

Hi! I'm using net kyori adventure text. Any idea how to make click event suggest command?

#

like

Component.text("test")
    .color(NamedTextColor.YELLOW)
    .clickEvent(Component.suggest("/something like this"));
languid rover
#

any way to send raw JSON message? I've no idea how this lib works

atomic leafBOT
weary moth
#

you can compile from his branch

bronze yoke
#

i know

sacred ice
#

How can I replace a hex color code in a string to a valid color? I don't want to use 'Component.text().color(hexCode)', because my messages can contain multiple colors.

burnt dragon
#

you can append multiple components

#
var text = text()
  .append(text("hi", RED))
  .append(text(" not red", someHexColor)
  .build()
#

for example

sacred ice
#

But thats very uncomfortable. I would prefer it to have a converter so that I can use "#hexThis is #hexa message"

#

In Spigot it is possible like this but not in Velocity because there is no ChatColor. đŸ€”

fossil sundial
sacred ice
#

Why should this be an awful format? If I would know a reason to be forced to write multiple lines for one simple message I would agree with you, but I don't understand the advantages of the Adventure Component API.

fossil sundial
#

It’s a problematic format because chat is formatted as json internally and the token format doesn’t clearly label where it’s supposed to be used
You end up using redundant reset characters and endings
And it’s also a nightmare to parse or use

#

I highly recommend you check out MiniMessage if all you’re worried about is it using up a lot of space

sacred ice
#

Ah okay thank you. I will check MiniMessages out right now.

naive patrol
#

how to i get the name of a commandsource?

#

a pointer i assume?

burnt dragon
#

yup

#

unless you wanna instanceof/cast

naive patrol
#

nay

burnt dragon
#

should be something like uh audience.get(Identity.NAME)

#

or DISPLAY_NAME

naive patrol
#

ill try NAME

burnt dragon
#

one's a string and the other is a component, whatever you need really

naive patrol
#

so the Identity class has cross platform pointers right?

burnt dragon
#

there are pointers all over the place

naive patrol
#

that sounds painful

burnt dragon
#

but most of them are in the identity class yes

naive patrol
#

is there a list?

burnt dragon
#

haha yeah it is a bit :') no list afaik

naive patrol
#

alright

#

and does velocity have any of its own?

burnt dragon
#

ill make a note, would be a good point of improvement for the docs for sure

#

no velocity doesn't have any of it's own

naive patrol
#

thanks a bunch

#

different topic

#

if i call thenAccept(Consumer) on a future returned by CommandManager#executeAsync(), the consumer will be executed on the same thread that the command was executed on, right?

#

and unfortunately VelocityConsole doesn't seem to have either of the name pointers

#
Logger.getLogger().info(source.pointers().getOrDefault(Identity.NAME, source.toString()));
Logger.getLogger().info(source.pointers().get(Identity.DISPLAY_NAME).map(CrossplatForms.PLAIN_SERIALIZER::serialize).orElse(source.toString()));
[11:41:04 INFO] [crossplatforms]: com.velocitypowered.proxy.console.VelocityConsole@68484c09
[11:41:04 INFO] [crossplatforms]: com.velocitypowered.proxy.console.VelocityConsole@68484c09
fossil sundial
rich hawk
#

what means..?

fossil sundial
# rich hawk what means..?

Since clients can now authenticate with key instead of client signature you can use the key to identify the client before the login verification happens
Quite convenient for preventing repeated authentication requests by banned users

queen pasture
#

Hey i just bot attacked a velocity proxy and it worked great.
The cpu usage was relatively low and the ram usage too unlike bungeecord.
All the existing connections were still alive and the ping was also normal.
I noticed a strange thing that after the bot attack ended even though the existing clients were still connected new clients would be stuck on the connecting to server screen.
Funny enough i faced the same issue while stress testing my custom cloud management server which also uses latest Netty.
It also behaved in a similar way where existing connections would stay alive but new connections would throw an out of thread error, but velocity didnot throw any kind of thread error yet it fails to create new connections. Is there a fix and what is problem that causes this?

#

Also after a restart it works normally

fossil sundial
#

I just assume the netty responder tracker got stuck
Usually happens when the system handle limit is reached for inet
Those connections must be untracked by velocity or else they would definitely throw something

#

Also

#

If the server was still able to ping this wasn’t the issue

languid rover
#

Is there a ServicesManager alternative for velocity? I want to use LuckPerms API after it has loaded and simply adding it as dependency doesn't seem to do the trick. ideas?

fossil sundial
languid rover
#

@Dependency(id = "luckperms")

#

LP plugin has loaded but I get

#

LuckPermsProvider$NotLoadedException: The LuckPerms API isn't loaded yet!

#

on bukkit they suggest

#
RegisteredServiceProvider<LuckPerms> provider = Bukkit.getServicesManager().getRegistration(LuckPerms.class);
if (provider != null) {
    LuckPerms api = provider.getProvider();
    
}
fossil sundial
#

Where are you calling the LP api from?

languid rover
#

class that implements SimpleCommand

fossil sundial
#

And you’re registering that in which event?

#

Or is it only called post proxy init complete?

languid rover
#

i'm using @Inject and commandManager.register()

fossil sundial
#

And the command object is created during or after the proxy initialize event?

#

You can only @Inject something that requires the plugin to be initialized fully after that event is done

languid rover
#

not sure, I'm pretty new to this.
My plugin is basically
main

public class MyPlugin {
  ...
  @Inject
  public MyPlugin(ProxyServer ...) {
    ...
    CommandManager commandManager = server.getCommandManager();
        CommandMeta meta = commandManager.metaBuilder("command")
                .build();
        commandManager.register(meta, new TestCommand(this.server));
  }
}

and TestCommand

public final class TestCommand implements SimpleCommand {
  ...
  LuckPerms luckPerms = LuckPermsProvider.get();
  @Override
    public void execute(final Invocation invocation) {
    ...
}
fossil sundial
#

First of all

@Dependency(id = "luckperms", optional = false)

Since you absolutely need it

Secondly that’s what I was referring to.
Don’t register it in the constructor of your main class

Add a method
@\Subscribe
public void onProxyInitialize(ProxyInitializeEvent e) {
//Register command here
}

languid rover
#

okay thanks, i'll try that

fossil sundial
#

Apologies to the person I pinged just now

#

Formatting on mobile is nearly impossible

languid rover
#

awesome, this works perfectly. thanks for the help

languid rover
#

is there any way my paper plugin can send a message to the proxy?

robust mural
#

yes you can use plugin messaging

languid rover
#

Thanks. From what i've read the Bungee messaging channel should work with velocity so im gonna try that out

fossil sundial
#

for anything custom like plugin-plugin use your own channel

languid rover
#

thank you

wary tiger
wary tiger
fossil sundial
#

This is still very much indev

languid rover
#

is there an event when player disconnects from a server (but not the proxy)? I'm trying to find one in the jd rn but no success so far

#

like the opposite of ServerConnectedEvent

magic forum
#

Still works like a charm

fossil sundial
languid rover
magic forum
#

Tomorrow I will be done with 1.18.2 compatibility

#

Til then, I will verify 5 additional mods compatibility with my mod

fossil sundial
#

If that’s a modification to velocity that changes how the event flow works then we can’t consider it for the official velocity repo

magic forum
#

Not really, I have separated it in a good way 🙂

#

I'm trying to make it as modular as possible

#

But I had no trouble mergin with latest

fossil sundial
#

Something else
There’s a plugin out there I don’t remember the name of it
But it allows you to use forced hosts to use modern forge

#

You record the handshake and give the plugin a sample file

#

The plugin then replays the handshake for a certain forced host

magic forum
#

That's actually clever

fossil sundial
#

It works surprisingly well

#

Since velocity has all api you’d need for it

magic forum
#

Yea, I'm gonna give it a try

#

very very prototype stage, but it works to some degree

ashen fiber
#

Does there happen to be any Velocity forks which have Team and Scoreboard APIs for Tablists?

queen pasture
lilac minnow
#

Hello, is there a way to override the virtual host used by the player when connecting this player to a sub-server? Reflection on final fields doesn't work anymore since jdk 12 apparently...

#

that, or change anything about the player really.. (username, UUID)

fossil sundial
languid rover
#

is it possible to convert a string with colour codes like "&ctest" into a text component with the proper formatting?

agile ore
#

with the legacy serializer, yes

languid rover
#

so i was wondering if there's a utility or something to convert configurable strings to components

burnt dragon
#

it is recommended that you use a modern format like minimessage

languid rover
#

I see, I think I can work with that format

#

thanks

fossil sundial
#

purposefully joined the vanilla server with Via first

#

(as a worst case scenario)

fossil sundial
magic forum
fossil sundial
#

The recorded messages have both sides of the answers
So if the server requests it gives the appropriate answers

fossil sundial
magic forum
#

But how does the client know what mods are installed on the new server

#

?

#

The new server meaning the server you switch to

bold wharf
#

it can't

fossil sundial
#

Yea because you can’t reset it the client is fooled into thinking it’s always connected to an appropriate server

magic forum
#

Well this is what I was told NOT to do by the forge devs because it can lead to unpredictable behaviour

bold wharf
#

Well, yea

fossil sundial
#

That was true before 1.13 too

bold wharf
#

There is a reason why what ive is doing there is stupid

#

Five*

#

Just, outside of forcefully reconnecting to the client, hackery is all ther eis

fossil sundial
#

1.12.2 forge and older also doesn’t support what we are doing

#

What I posted is a proof of concept, nothing more. It can be used and will probably work fine in a lot of cases but I don’t expect it to

magic forum
#

The funny thing is; Years ago, I made that same thing you did but with bungeecord.

fossil sundial
#

I remember that. We had a heated conversation about it

magic forum
#

Heated to say the least

#

What mods have you tested with?

fossil sundial
#

Just about twenty or so
Again this wasn’t meant as a solution but more as a proof of concept

magic forum
#

How do you handle mods' own argument type command packets?

fossil sundial
#

Passthrough

#

Yea ideally you’d need crossstitch

magic forum
#

Oh, but velocity has its own commands

#

To declare

fossil sundial
#

Yea I cheated; I added my own ontop and copied the existing into a new slice at the bottom

#

You’d need to use a crossstitch type encapsulation method to do it right

magic forum
#

Yeah, I'm currently trying to port it to forge

fossil sundial
#

Shouldn’t be terribly difficult since you can use the same mixins

#

Well more or less

magic forum
#

Yes, but the problem I'm having is that neither fabric or forge1.16 use mojmap

fossil sundial
#

You can make both use mojmap

magic forum
#

Fabric side: yes i have already. Forge side: its sticks with mcp.

#

Btw I'm also trying to learn mixins since this is the first time I have looked at a mixin ever

fossil sundial
magic forum
#

@fossil sundial You know what @Redirect(method = "writeNode", at = @At(value = "INVOKE", target = "Lnet/minecraft/command/argument/ArgumentTypes;toPacket(Lnet/minecraft/network/PacketByteBuf;Lcom/mojang/brigadier/arguments/ArgumentType;)V")) means?

agile ore
#

That's a mixin

#

it's replacing a certain method call, probably before packet serialization

fossil sundial
#

Yes

magic forum
#

whats "Lnet/minecraft/command/argument/ArgumentTypes;toPacket(Lnet/minecraft/network/PacketByteBuf;Lcom/mojang/brigadier/arguments/ArgumentType;)V"?

agile ore
#

the method that's being called

fossil sundial
#

That’s the call it’s referencing

magic forum
#

hmm

#

I have trouble finding it in the source

fossil sundial
#

You’ll have to find the brigadier argument type class

#

There it’s the method that accepts a friendly/packetbytebuf and an argument type

magic forum
#

so it's path:method(argument;argument)returnType?

fossil sundial
#

L<class>;methodname(
)returntype

magic forum
#

oh

#

ok

#

also, I think it's in yarn names.

fossil sundial
#

As for how this works
V for void
Z for Boolean
.
And Lpackage/classname; is for classes

magic forum
#

yeah, I read somthing about that, just wasnt sure

fossil sundial
#

Just direct path names in Java

magic forum
#

I still can't find the "toPacket" method

#

I think it's called something different in my forgedev environment

fossil sundial
#

Yea it’s probably named differently
Just look for a method that accepts a friendly or packetbytebuf and an argument type

magic forum
#

inside ArgumentTypes class?

fossil sundial
#

Yes

#

If you need to find the class search for “minecraft:uuid”

#

That string should only be found in that class

magic forum
#

I found the class, but the method is still nowhere to be seen

#

o shit

#

I think i found it

#

gonna have chat with the bot about that name

valid wasp
#

lol

bold wharf
#

also, five, like, was there a way to use mojmap with fabric that you knew of? or was that just forge? thonk

valid wasp
bold wharf
#

Ohhhh, ;3

fossil sundial
#

It was fabric ages before forge I may add

magic forum
#

@fossil sundial help

#

I'm trying to build

fossil sundial
#

Not build

magic forum
#

this one?

#

That gave me the same error

fossil sundial
#

Something in your build file is messed up

#

Your mixin is declared and mixin processing is enabled?

magic forum
#

But I don't use refmap

#

The original project for fabric doesnt use it

#

I also got this error first

fossil sundial
#

The guide is one thing

#

But a working setup as reference is usually more helpful

magic forum
#

Yes

magic forum
#

@fossil sundial When I try to run it I get: forgeserver\mods\modid-1.0.jar constructed 0 mods: [], but had 1 mods specified: [examplemod]

#

Dafuq

fossil sundial
magic forum
#

yes, I think It's because I don't specify the refmap in the mixin config

#

ok, setting the refmap didnt change anything

fossil sundial
#

Yea somewhere your mod def is empty

#

It’s compiling but it’s not referencing right

#

You do have your @modid annotation ?

magic forum
#

annotation? In what file?

#

O shit

#

I don't have a main class

#

Should I just create an empty one?

fossil sundial
#

Well yea if you don’t need it

#

It has to be there though

magic forum
#

Ok, now it runs

#

HOLY SHIT IT WORKS

#

@fossil sundial Thank you so much for your help!

fossil sundial
#

No problem; you haven’t published any modifications to your velocity fork yet so I can’t gauge how likely we are to actually incorporate it

#

In any case, please don’t get your hopes up too high

#

Also as side note; 1.19 and my exams have priority before I can seriously deal with this again

magic forum
#

Yeah, I understand. My plan is to have this fork co-exist with velocity for a while

#

I haven't planned for any PR

fossil sundial
#

I’d even be happy to support a mod that hacks this into forge rather than making the proxy deal with it

#

Just

#

It can’t be like that lightfall or whatever it was called mod for forge

#

That approach was just bad

magic forum
#

Was that client side modifications too?

fossil sundial
#

Yes

magic forum
#

ah ok

fossil sundial
#

But crossstitch is a mod you may also need on both sides so-
Realistically you can’t get away without modifications either way

magic forum
#

Yes, but I'm aiming at ONLY modifications at Server side (server + proxy). I don't want players getting into this hassle, server admins can have an understanding alteast why this matters.

#

From the players perspective, it just works

fossil sundial
#

How are you going to do that

#

My stupid POC also works like that

#

In a way at least

magic forum
#

It's not impossible to solve the server switching reset problem

fossil sundial
#

Yea we arrived at that conclusion

magic forum
#

...Without client modification

fossil sundial
#

And it’s also not possible to join a vanilla server and a forge server without risking breaking something

fossil sundial
#

For the same reason I may add

magic forum
#

Yeah, so server switching with forge shouldn't be required but be possible if people really want to try.

#

In my opinion the server switching mechanism should be a separate plugin only relying on velocity API

fossil sundial
#

The switching mechanism for forge?

#

You know as well as I do that that’s not possible thanks to the history of the notchian protocol

magic forum
#

Ok, lets jump straight into it: You type /vanilla. You get a prompt that says:"[Forge Switcher] Ready to connect to vanilla server please disconnect here". You get kicked. Then you rejoin and the server has now switched your forced host to the vanilla server. TADA!

#

XD

#

It is POSSIBLE but not beautiful

fossil sundial
#

But that would still require you to know how the forge server responds to the next login plugin messages before you connect to it

#

Which is how you arrive back at the stupid poc I did

#

Something else rq:

magic forum
fossil sundial
#

Here’s what a large network I helped out has done:
They have proxy plugins that mimic the communication of mods that aren’t present on the backend server if you’re on a vanilla server and a custom login implementation that interactively mimics being a forge server for the client

#

That’s probably the best solution

#

You give a special plugin your mod list or the server pings the backend to get it
Then the proxy will interactively cater to that

magic forum
#

But why not just use my fork that already works with forced hosts and just change the forced host everytime you want to switch?

fossil sundial
#

Forced hosts have a try list too

#

You can’t step over that

magic forum
#

Ah, you mean when it checks for compatibility with the destination server?

fossil sundial
#

Also forced hosts are a suggestion, plugins may still decide differently on the choose initial server event

#

Yea

magic forum
#

Yeah, that will need a mechanism 5 times bigger than my modifications to velocity

#

That's why it's better to have a separate plugin do that. Saving and mimicing

fossil sundial
#

It’s not entirely out of scope

#

But I refuse to bend over backwards just to make forge happy. We’ve reached the consensus with fabric that they’re willing to implement a soft reset packet to skip login plugin during LOGIN and mimic them during play

#

But that ain’t gonna happen on forge

#

Again when I have time I’ll try to break the deadlock here

#

If you know of a way

#

The issue was bumped again

magic forum
#

Yes, that's the best approach.

fossil sundial
#

The handshake hostname token isn’t required

#

You can skip it

#

You know

#

I have a very very very stupid idea

#

One that you could help with

#

What if

magic forum
#

OOooOOooO

fossil sundial
#

We make a mod for forge server only

That mod returns the mod list + registries in the server ping packet if the server is pinged

You could then make a velocity plugin that pings the server you could use
Use that data to handshake the client
And then set that server as destination

magic forum
#

Hmm, I like it, well, If we are gonna make modifications we might as well make em work together

fossil sundial
#

Crossstitch can be a part of that forge mod

magic forum
#

Yeah, one complete velocity forge support packet mod

fossil sundial
#

Yea but

#

What I suggested requires zero modifications to velocity

#

And only a serverside mod

magic forum
#

Only if the right apis on velocity exists

fossil sundial
#

Client > Velocity
Plugin > Pings forge server
registries and forge info > Plugin
Plugin > Client
Client > Plugin (store response)
Plugin > Velocity set the pinged server in the ChooseInitialServerEvent
Plugin > forge Server (stored response)

magic forum
#

Yeah, but the problem is that the api doesn't allow you to send packages when they need to be sent

#

To the client

fossil sundial
#

?

#

Wdym

magic forum
#

You need to suppress the login success

#

So the velocity doesn't send it right away

fossil sundial
#

Yea and? As long as you’re communicating it is suppressed

#

Otherwise the replay wouldn’t be working

magic forum
#

But velocity sends as one of the first things it does

#

After authentication

fossil sundial
#

You can do the pings in the PreLoginEvent and from there chain the forge sequence

#

That’s exactly how it’s intended

magic forum
#

Ok, I will need to sleep on that

#

Gtg

#

It's 1 am here sooo