#velocity-dev

164 messages · Page 2 of 1

hidden gale
#

Then, again using VarIntByte of Bungee kekwhyper

#

As i see velocity switched license.

fossil sundial
#

You can still do that but it has to be open-source

hidden gale
#

Well, i won't public my api, and bungee improvements

#

So i guess, backport again to the other thanks too.

astral elk
#

Anyone used the Velocity API to launch containerised servers on-demand?

#

I'm hoping to use Velocity as a launch proxy, and if the server isn't running, launch it (moving players from void lobby to their requested server once it reports online)

vapid prawn
#

Hi I'm developing a ban plugin, and I'm trying to check if the player is banned, and everything works grate, but when I deny the connection, it doesn't send any kick message, it just stays loading:
I check this in with the PreLoginEvent.
This is the code I use to deny the connection, but its not working:

e.setResult( PreLoginEvent.PreLoginComponentResult.denied( announcements.banPlayerKickMessage( ban ) ) );

vapid prawn
#

any solution here?

vestal nymph
#

moment i am stupid what does he want from me

agile ore
#

Plugin ids should be lowercase

vestal nymph
#

ok

#

thanks

#

This is my first velocity plugin

#

and puhh

#

hopefully i got all wright

#

is there no chatcolour?

spiral portal
#

Velocity uses Kyori Adventure

vestal nymph
#

what

spiral portal
pallid reef
#

Hi, I raised the issue yesterday but can someone fix the Velocity website to not point to a vulnerable version?

spiral portal
#

you can skip the Getting Started step as it's build in Velocity!

steel horizon
#

Quick question, is there a way to add permissions like you can in the plugin.yml in Paper plugins? That LuckPerms for example is able to auto-complete them?

vestal nymph
#

i get this error but i havent even imported the plugin for the api in my plugin

#

ok fixed that

pallid reef
#

Did something about Velocity build break recently? I'm trying to build the code from git (as I've done many times) and it's crashing on me, with a spotbugs error: https://pastebin.com/V6q7cJAn

vestal nymph
#

this is my first velocity plugin, and what does this want to tell me

pallid reef
#

Update: I removed spotbugs from the build and I got a working jar, but this still perhaps should be looked into?

flat pivot
#

woah i never knew i am a dev

vestal nymph
#

what does he wants to say me

rich hawk
#

Send /velocity dump url and your build file

vestal nymph
#

build file?

#

is this like some gradel shit i dont understand

rich hawk
#

either your Pom.xml or build.gradle

vestal nymph
#

what is the command for the proxy to dump

#

because i cant connect to the server

rich hawk
#

/velocity dump

vestal nymph
#

console*

rich hawk
#

That but without the slash

vestal nymph
#

where does he dump it?

#

in a file because the console isnt showing anything

#

idk id it is just cloudnet

rich hawk
#

Type that command

vestal nymph
fleet sailBOT
rich hawk
#

Don’t use 4.0.0

vestal nymph
#

ok

#

the intellij addon did use it automaticly

rich hawk
#

Use 3.1.1

vestal nymph
#

ok

#

is it tjust 3.1.1

#

or do i need to add like -SNAPSHOT

#

or some shit

rich hawk
#

No

#

Just that I think

vestal nymph
#

ok

#

after 300 maven errors i got it

#

Sometimes i want to throw maven against a wall

knotty mica
#

Just print out the entire source code of maven, then tie it to a rock

vestal nymph
#

ok

#

good idea

steel horizon
rich hawk
#

???

tender linden
#

how do I build a simple text component?

#

for waterfall I did new TextComponent("text") but I can't figure out how to do it in velocity

pastel bone
#

When exactly is the TabCompleteEvent being fired? I'm debugging my listener right now because it seems like The TabComplete isn't being fired at all.. Docs are saying "This event is fired after a tab complete response is sent by the remote server" so technically if I'm tab completing a Player Name on the Server the Event should be fired right?

bronze yoke
#

pretty sure that only works for 1.12.2 and older

pastel bone
#

That would explain a lot hhaha.. So Is it even possible to Interfere with the TabComplete in any version above 1.12.2?

vapid prawn
pastel bone
arctic lichen
#

How can I get the SQLite driver running on Velocity?

craggy pecan
#

You will need to shade it (there are plugins for both Maven and Gradle)

vivid plover
#

Hi, is it required to shade the velocity API or can I just set it to compileOnly?

agile ore
#

You don't have to shade it

vivid plover
#

alright thanks

wary tiger
#

You can't safely shade the SQLite driver in a public plugin, because it is impossible to relocate JNI libraries

bold wharf
#

use h2 (Well, take a look at)

#

iirc it's faster than sqlite and is generally much more stable

flat bolt
#

hey is the velocity to 1.18?

agile ore
#

yes

flat bolt
#

Could I ask you for a link?

slender fulcrum
coral haven
#

I'm trying to write a plugin for velocity and I'm getting the following error

#

Did not find a valid velocity-plugin.json

#

can't find anything on google

#

or on the actual documentation

#

I'm using Velocity 3.1.1

rich hawk
#

Kotlin / maven / gradle?

#

Use kapt

coral haven
#

k

#

what is kapt?

rich hawk
shut imp
#

would it be Component.text("Proxy shutting down").color(TextColor.color(123456));?

rich hawk
#

Yes

#

.adventure

fleet sailBOT
shut imp
#

thanks 🙂

coral haven
#

very pog

#

Is there a way to depend on maven dependencies without shading? I try to avoid making mega-jars

rich hawk
#

Yes slimjar or make your own (or just shade :p)

shut imp
#

where would i find a list of TextColor.color codes then? im a noob at this

#

i think the docs made me more confused than it should of 😄

rich hawk
#

You can use NamedTextColor

#

TEXTColor.color is for hex codes iirc

shut imp
#

ah

#

so would Component.text("Example text here").color(NamedTextColor.GREEN)); work for example?

rich hawk
#

Yes

solid ivy
#

@fossil sundial Btw, do you have specification/example implementation of that networking thing you talked before?

gloomy radish
#

Hi, can I send a message plugin to velocity so that it will transfer the player from server to server?

bronze yoke
#

yes, use the same channel bungeecord uses

#

bungeecord:main iirc

exotic nacelle
#

I am trying to migrate to Velocity 3.0.0 and have this problem

bronze yoke
#

.adventure

#

oop that doesnt work here

exotic nacelle
#

If I change the data type to Component it will complain that it cannot import String to Component from Config

bronze yoke
#

use LegacyComponentSerializer

#

or ideally minimessage

exotic nacelle
#

it only has midimessage

bronze yoke
#

what?

exotic nacelle
#

javax.sound.midi

bronze yoke
#

yes so add the library

exotic nacelle
#

No matter which of the two I use, it shows an error

#

I'm not good at Java btw

bold wharf
#

You can't just cast random things to random things

#

It expects a Component

covert folio
#

learn java first then

bold wharf
#

the legacy serialiser has methods to parse the legacy formatted strings into Components

gloomy radish
exotic nacelle
bold wharf
#

don;t mention

#

look at the methods on that class

tender spruce
#

is there a way to get a players inventory on the proxy? Im guessing not

frigid rivet
#

No.

tender spruce
#

Yeah figured as much. Can you talk with a mod on a server?

frigid rivet
#

Huh?

tender spruce
#

Like have your plug-in send and receive data from say a fabric mod on a server

frigid rivet
#

Yeah, you can use plugin messages.

#

A Spigot plugin will also work.

#

I don't know the best place for documentation on either.

tender spruce
#

Oh perfect. Is there any examples of this being used? If not I’m sure I can figure it out

opaque escarp
tender spruce
#

Oh it has custom packet support liiiit

gloomy radish
#

Hi, how do I get a Player that executes a command?

robust mural
#

CommandExecuteEvent

gloomy radish
robust mural
#

you're making a command?

#

I do not understand exactly what you mean

steady trellis
gloomy radish
coarse topaz
gloomy radish
#

I don't understand what should I use so that I can get a player executing a command

fossil sundial
#

the api-provided possible senders are ConsoleCommandSource and Player

#

if its neither it was likely added by a plugin

#

if its a brigadier command you already have the source provided

gloomy radish
#

another question for some reason I don't have a command written in velocity on my servers associated with it (it only works in the velocity console)

fossil sundial
gloomy radish
tender spruce
tender spruce
#

Thanks 👌

cursive jolt
#

Does the API allow to listen for packets from players? I want to analyse and possibly block some packets from players on a proxy level

agile ore
gritty valve
#

How do I issue permissions to a player?

round quiver
#

Hey, a question, which event is called first PlayerChooseInitialServerEvent or LoginEvent.

covert folio
#

Login

round quiver
#

thx

stone tulip
#

Is there a plugin that will make velocity show the names and player counts of each server instead of the ~12 players normally shown in the multiplayer server list (which velocity seems to never give a listing of)?

blazing kernel
#

Is velocity thread safe ?

oblique haven
blazing kernel
oblique haven
#

yes

blazing kernel
oblique haven
#

please someone correct me if I'm wrong

fossil sundial
blazing kernel
fossil sundial
#

tho no guarantees that properties of the players stay the same while you’re executing stuff

fossil sundial
blazing kernel
#

and with the scheduler ?

#

but shouldn't datas be accessed by one thread at a time ?

bold wharf
#

the proxy itself is designed to be reasonably safe

#

as for anything else, it's 100% on you to ensure that your own logic is thread safe, etc

blazing kernel
#

oh ok

pearl pulsar
craggy pecan
#

Iirc issuing updateCommands from the backend server also rebuilds the command tree in the proxy, so the proxy commands also get updated

#

There's no current way (other than switching servers or reconnecting). You can also send a message requesting the backend to send an update

#

I'm not sure about the safety aspect of this, Five probs knows more about this

bold wharf
#

the proxy would need to store every players command structure from the server in order to recalc it on its side

fossil sundial
#

You generally shouldnt update that at all. The client only expects it once but velocity tolerates it nonetheless

analog dew
#

I'm 90% sure that's not true and that the vanilla server resends the list to a player when they're opped/deopped

fossil sundial
#

I’d love to be proven wrong; if you know more do please correct me

bold wharf
#

it does

#

otherwise when you're op'd you'd need to relog to see the commands you're able to use now

pearl pulsar
#

Yea, I do understand that, however, I’m not connecting the user to any backend server, and just wish to display and update the players available commands on the proxy accordingly, but understand it is not possible atm

bold wharf
#

basically, it's doable

#

Just, you'd need to hook in somewhere and store the command structure from the client

#

to update it, you'd then need to pipe it through the logic in velocity which adds its commands

#

which, for the sole purpose of potentially needing to resend commands what is often once in a blue moon, is pretty bleh

#

if this is for personal use, can just basically get a plugin setup to send a message over to the backend to resend the structure def

vivid valve
#

Can you give log messages a color like you can do on Spigot and BungeeCord?

craggy pecan
low crypt
#

Does Velocity have some sort of ServerSwitchEvent?

low crypt
agile ore
#

that was fast

low crypt
#

How would you apply a certain permission to a player?

I see hasPermission and getPermissionValue within the PermissionSubject class, but I cannot find how to update permissions for a player.

fossil sundial
low crypt
quaint canopy
#

Hey,

I got the following error: https://pastebin.com/pvhMVwQT
This is the source code: https://github.com/Katzen48/minecraft-ingress

I don't quite understand, where that error comes from.

GitHub

Contribute to Katzen48/minecraft-ingress development by creating an account on GitHub.

craggy pecan
low crypt
#

i'm literally in love with velocity and its api

agile ore
#

same

glacial kraken
#

hi guys

#

i wanna make a multi-platform plugin

#

and i have plans to support velocity

#

i never made a velocity plugin before

#

from docs

#

it says there is no plugin.yml at all

#

and from some open source plugins

#

99% of plugin code is in 1 class

#

im wondering why

#

does velocity not load other classes or something

analog dew
#

what

glacial kraken
#

see this

#

the whole plugin in 1 class

#

well since its a multi-platform its not "the whole plugin" but still confusing

#

i see subclasses instead of just new classes

oblique haven
#
@Plugin(
        id = "velocity-load-balancer",
        name = "VelocityLoadBalancer",
        authors = {"Corey Shupe (FiXed)"},
        url = "https://github.com/CoreyShupe/VelocityLoadBalancer",
        description = "Simple load balancer plugin for velocity networks.",
        version = "0.0.1"
)
public class VelocityLoadBalancerPlugin {``` the main part which replaces the plugin.yml is this
#

the @Plugin dec makes it auto-generate a json file in the root

#

you should never write your own json file

glacial kraken
#

interesting

glacial kraken
#

thx for letting me know about that

oblique haven
#

this is a great wiki to follow

#

btw

glacial kraken
oblique haven
#

goes over everything you'll need to know

#

for everything else you can dig into the javadocs

#

(don't know where they're hosted though)

glacial kraken
#

thx anyways

oblique haven
#

👍 sure thing

oblique haven
#

can we see how you declared the event listener

#

and the imports

#

Glad I could help 🙂

glacial kraken
#

lmfao

#

lol

glacial kraken
#

so since i do it with an annotation

#

@Plugin

#
processResources {
    from(sourceSets.main.resources.srcDirs) {
        filter ReplaceTokens, tokens: [version: version]
    }
}```
#

will this work

#

this should replace @version@ with the version

abstract horizon
#

WARNING VELOCITY NOOB

Minecraft Server Target Version: 1.18

Java Version: 17

Information Source: https://docs.velocitypowered.com/en/latest/developers/command-api.html

ERROR: NoSuchMethodError: 'void CommandManager.register(Command, String[])'

log: https://pastebin.com/kNDFZEvu
pom.xml: https://pastebin.com/0fubjyYe
VelocityTest.java (Main Class): https://pastebin.com/imbF4fLm
** CommandTest.java (Test Command class):** https://pastebin.com/vvT9j9Yc

bold wharf
#

You're building against api 1.0.0 but running on a 3.1.1 proxy

abstract horizon
#

When setting the Dependency version to: 3.1.0 I get : Cannot resolve method 'register(com.vatoka.basic.CommandTest, java.lang.String)' (VelocityTest.java - line 13) as an intellij error along with Cannot resolve method 'of' in 'TextComponent (CommandTest.java - line 13) and Method does not override method from its superclass (CommandTest.java - line 11)

bold wharf
#

cos those methods no longer exist

abstract horizon
#

Are there updated docs?

bold wharf
#

Yes, they're linked somewhere but I don't really track velocity

abstract horizon
#

Ok, thanks ill look for them

#

tho I am having trouble finding the new methods...

abstract horizon
#

Nevermind... I figured it out. The docs are very outdated most of the methods used in the examples there no longer exist.

rich hawk
abstract horizon
#

hmm thanks. The docs I was looking at were still on version 1.0.0

vivid valve
#

How do I check the server the player will be sent to when he gets kicked from a server? I can't find a option for that in the KickedFromServerEvent
(Ping me)

#

ah set the result to RedirectPlayer class I guess

glacial kraken
glacial kraken
#

It looks like a plugin doesnt even spectify the version

#

Is that allowed in velocity?

glacial kraken
#

how can i send a colored message that also support &

rich hawk
#

LegacyComponentSerializer

#

Or better, use mini message

glacial kraken
#

thx

glacial kraken
#

TabCompleteEvent does not fire

#

ive tried to debug

fossil sundial
fossil sundial
glacial kraken
#

when client asks for the tab complete

#

/paper <version>

#

as soon as i click space after paper

#

the event should be fired

#

but this doesn't happen

#

if this isn't possible tell me i can use packets from protocolize

half locust
#

what's your end goal?

glacial kraken
#

im trying to remove some things

#

like

#

/tp

fossil sundial
glacial kraken
#

remove some players

glacial kraken
half locust
#

sounds like you're trying to do stuff proxy-level which should be handled at the backend level in the implementing plugins

glacial kraken
#

im trying to help the user so he doesn't have to install the plugin on every backend

#

ok well my minecraft crashed, my pc can't handle all of this at the same time

fossil sundial
#

It won’t be that simple because brigadier isn’t exactly a very easy subject.
You’re way better off doing this with a plugin on the backend. But we can’t stop you from attempting it anyway

glacial kraken
#

its a multi-platform

#

it works on backend

#

(with packets)

#

i just know the user will not like installing the plugin on every backend*

fossil sundial
#

If you register a command with the same name on velocity then it won’t ever go through to the backend
That is if I’m not mistaken and the overlap bug doesn’t exist anymore

glacial kraken
#

this isn't how it will work at all

#

ok ill do it with packets

#

PlayerAvailableCommandsEvent is fine?

#

its fired

fossil sundial
#

It’s fired but there is no result

glacial kraken
#

actually it works perfectly

#

modifying the root command works

fossil sundial
#

That might have been introduced sometime but the user can still run the command but it won’t complete

glacial kraken
#

running the command is not an issue at all

fossil sundial
#

I forgot this isn’t a transparent event anymore

glacial kraken
#

im sorry but what is a transperent event

#

how do u test velocity plugins, my game is now crashing bc of ram overload

fossil sundial
glacial kraken
#

oh okay

#

i am afraid there is no way to modify the tab complete from proxy

#

im waiting for protocolize support to help me with this

fossil sundial
#

Well

fossil sundial
glacial kraken
#

im also making a free version of a premium plugin so

glacial kraken
#

if i use 1.12

#

tab complete event will fire?

fossil sundial
#

I mean it should

#

Unless you have ViaVersion on the proxy

glacial kraken
#

ok well, i will stick with packets

glacial kraken
fossil sundial
#

Yes. Even better than it supports Bungeecord

#

I would know seeing as I’m on the Via team

glacial kraken
#

bungeecord does not support anything

#

if it was allowed i was gonna swear at it

worldly granite
#

how can I make a plugin that can load on multiple platforms

#

i.e. velocity, paper, waterfall

#

i want it to work on all of the above

#

i know bungeeapi

bold wharf
#

each of them have different files to say what is the main class

#

so, you basically have different main classes for each of them, each with their own module, and shade/shadow it all into one jar, basically

craggy pecan
#

Your solution seems like the best option

worldly granite
#

right now i just have a couple classes thrown into one

#

obviously this isnt perfect

#

ignore how theres only one class im using this as a learning tool

#

also how the hell do configs work in velocity it hurts my brain roundnthonk

#

we arent in kansas anymore

glacial kraken
#

plugin.yml and bungee.yml ok well that's messed up

#

u need diffrent modules

fossil sundial
glacial kraken
fossil sundial
glacial kraken
#

so u dont accidently use bukkit stuff in velocity classes

#

so it break on velocity

fossil sundial
#

That’s not necessary it just protects you from your own stupidity

glacial kraken
#

its not stupidity

#

its a mistake we all do

fossil sundial
#

As long as you don’t have any static fields in those classes you’re good

glacial kraken
#

if our ide is stupid

fossil sundial
#

It’s good practice to do so

#

But it is in no way necessary

glacial kraken
#

i tried making a plugin this way

#

and i broke it

#

ik its my own mistake

#

but i still dont like it

#

btw since velocity support is active does anyone know how to use protocolize

#

its been 11 hours no one responded in their discord

#

i need help

fossil sundial
#

Can’t really help you with that
Don’t know anything about it and plus I don’t like the concept
I’m still firm on believing packet manipulation is best done downstream

glacial kraken
#

looks like i need to find another packet lib

glacial kraken
#

my game crashed after im done with testing, my pc is 85% ram without minecraft

#

this is painful when debugging

worldly granite
fossil sundial
# worldly granite ?

You’re developing a plugin if I’m not mistaken? Velocity provides the sponge configurate library including the most common drivers like hocon

worldly granite
#

Is there a guide or an example for using that library

fossil sundial
#

We don’t have one but sponge has one in their how to create a sponge plugin wiki

worldly granite
craggy pecan
#

Check the wiki of Configurate on GH

worldly granite
#

with PlayerChatEvent, if i return an EventTask, will it wait for the task to finish excuting before it reads isCancelled
(im asking if i can cancel the event asynchronously)

worldly granite
#

wait

ashen fiber
#

com.velocitypowered.api.plugin.InvalidPluginException: Did not find a valid velocity-plugin.json

#

heh

#

Why?

analog dew
#

Either you didn't run the annotation processor, or you excluded the result from your build somehow

thick bramble
#

are you using maven or gradle?

ashen fiber
#

gradle (kotlin)

#
plugins {
    id("com.github.johnrengelman.shadow") version "7.1.1"
    kotlin("jvm") version "1.6.10"
}

repositories {
    maven { url = uri("https://nexus.velocitypowered.com/repository/maven-public/") }
    mavenCentral()
}

dependencies {
    compileOnly("com.velocitypowered:velocity-api:3.0.1")

    annotationProcessor("com.velocitypowered:velocity-api:3.0.1")

    implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1")
    implementation("net.dv8tion:JDA:5.0.0-alpha.2")
}
thick bramble
#

you've got to do something special for kotlin, what that is I'm honestly not sure though

#

although tbqh I'm not 100% sure, I haven't used kotlin

rich hawk
#

Yes

oblique haven
#

Is Velocity updating to 2.17.0 on Log4J, it seems like it shouldn’t affect servers out of the box, but I’m also not certain

#

Ah there we go lol

trim forge
#

Howdy - currently making a player balancing system for hubs but ehhh, I appear to have done a yikes. If one of the servers cached as a hub server is offline, velocity basically bricks itself and crashes - is there any way to check if a server is online before a player connects without putting masses of stress on the proxy? TIA!

#

Something like a server start event / server quit event that I've missed maybe?

bronze yoke
#

ping the server and wait for the response

trim forge
#

Will that not be quite intensive on high player counts moving around the network though?

#

As in if a server closes and like 300 players move from one server to another, will that not kill it a bit?

trim forge
#

Is there like a built in way that I can check if a server is online? Something like a #isOnline method?

#

This is driving me insane 🤣

bronze yoke
trim forge
#

Alrighty, I was hoping there was a better way but I'll do that.

#

Thank you!

fossil sundial
tidal belfry
#

How do you listen to packets directly on velocity?

#

Is there an existing api for it?

frigid rivet
#

No.

#

Generally if you're trying to listen for packets on the proxy you should consider if your application is better purposed for the backend servers.

#

But there are APIs such as Protocolize that allow you to work with packets, though it's generally frowned upon.

spiral thunder
#

Hey, is there a way to disable this try section.

I'm trying to develop a hub spreader plugin, but it's forcing me to hub1 now

fossil sundial
spiral thunder
#

Alrighty, thanks

spiral thunder
#

Next question,

Is there a way to check if the player specifically has a permission node, without hooking into a permission plugin like LuckPerms?

burnt dragon
#

hasPermission ?

spiral thunder
#

That'll include * permission

burnt dragon
#

well, that depends on the permission plugin

spiral thunder
#

Well, we use luckperms

#

I wnat to use the plugin on every proxy, no matter what permission plugin

burnt dragon
#

whether or not a star node is resolved depends on your permission plugin

spiral thunder
#

Hm okay

burnt dragon
#

but the hasPermission check will delegate to your permissions plugin (if it's doing stuff correctly)

fossil sundial
manic pumice
#

I'm trying to migrate a plugin that used plugin message channels from bungeecord to velocity.
I've found that the implementation of the message channels differs between the two. For server related queries bungeecord writes the requested subchannel name to the buffer before checking if the server exist and adding the rest whereas velocity does not return anything if a non-matching server is not found.

https://github.com/SpigotMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/connection/DownstreamBridge.java#L414-L428
https://github.com/PaperMC/Velocity/blob/dev/3.0.0/proxy/src/main/java/com/velocitypowered/proxy/connection/backend/BungeeCordMessageResponder.java#L103-L108

I had used this to detect if a server had been removed when polling for "PlayerCount" to remove a clickable NPC in the lobby. Should the velocity implementation work in the same way as bungeecord? Is there a native way to check for this? or should I search for a solution outside of plugin messaging channels. Cheers.

fossil sundial
spiral thunder
#

What event is called when some of my spigot servers restarts? @fossil sundial

frigid rivet
#

I don't see how Velocity would have context that a server restarted.

fossil sundial
spiral thunder
#

How would I be setting the server?

fossil sundial
#

You set the result as KickedFromServerEvent.RedirectPlayer

spiral thunder
#

aight

#

ty

fossil sundial
#

Basically setResult(KickedFromServerEvent.RedirectPlayer.create(server));

trim forge
gritty valve
#

Does speed support multithreading?

bronze yoke
#

yes

#

speed

gritty valve
#

velocity*

analog dew
#

now you too can calculate displacement over time async

fossil sundial
#

As for events; they roll as their own thread
They only differ in if they block or not

glacial kraken
#

How can i get a resource from jar

#

Im velocity

#

Without messing with other plugins that have same resource file

bold wharf
#

you get the classloader of the jar and then you can get a stream or something from the classloader to a file in the jar

glacial kraken
bold wharf
#

don't mention

glacial kraken
#

Oh sorry

bold wharf
#

getClassLoader on a Class object iirc

#

I mean, velocity is nothing special here, this is something easily googleable as it's a 'basic' java thing

glacial kraken
#

Do i get class loader on main instance?

bold wharf
#

of your plugin? sure

glacial kraken
#

I dont interact with class loading lol

green dune
#

Hey, I need some clarification. If I used EventTask.async() on my PreLogin listener, would PostLogin wait for it to finish or no? Because I have my PreLogin listener grab data then have it put in a hash map. The PostLogin listener would then get the data from the hash map. But how I have it currently, sometimes the data wouldn't be present for PostLogin to access.

fossil sundial
# green dune Hey, I need some clarification. If I used `EventTask.async()` on my PreLogin lis...

How is it PostLogin supposed to wait?
The answer is no but I have a proper solution for you.
Fire a CompleteableFuture with the get-code and the value you want as return from the PreLogin, put that future in the map and then on PostLogin/Login block the listener with the same future (get it from the map) using .complete() on that future
It’ll wait for the task in the future to complete if it hasn’t already completed and then return the data

green dune
#

Ah, tysm!

fossil sundial
green dune
#

I'll mess around with it in my free time

maiden hawk
#

Hi, does velocity have any main thread? If not, will blocking on a event not marked async slow down the proxy?

#

Using debugger I have noticed that the original "main" thread is used for console input, tho that doesn't mean there isn't any other main thread.

fossil sundial
#

Also if you wait too long on some events then the client or server will time out

maiden hawk
fossil sundial
maiden hawk
fossil sundial
#

Yes.

maiden hawk
#

Great! Also will the command event on bukkit run even when a velocity command was executed? And vice-versa?

fossil sundial
#

No; if you register a command on velocity it will not be forwarded to the server
You can make a plugin do that though

Vice-versa- velocity doesn’t handle command that aren’t registered, those are just passed through

maiden hawk
fossil sundial
#

Don’t misunderstand; There is no event for that on Velocity
If you want to block/remove a proxy-provided command you either need to deny the permission to use it or you have to overwrite or unregister the commands

#

But the paper part is true

fossil sundial
#

I didn’t know we added that

maiden hawk
#

Oof

fossil sundial
#

It may do what you want; though I haven’t ever used it before so I’m not aware

maiden hawk
#

So I guess I will have to try on my own

#

Anyway thanks for the explanation!

fossil sundial
#

Tho

#

Even if that event does what you want

#

It won’t stop commands from completing for the user

maiden hawk
#

To put this in context, I am creating an authentication plugin, which should be ideally placed only on Velocity

#

I am aware that I cannot block events like move etc.

#

But I would love to at least block the commands, otherwise I would need to add a counterpart for Bukkit.

fossil sundial
#

That’s possible; but blocking player from tab-completing commands will be a lot harder

#

Mainly because that’s not supported in the api

fossil sundial
#

Since that isn’t a resulted event I need to check if the output of that is ignored

maiden hawk
#

Allows plugins to modify the packet indicating commands available on the server to a Minecraft 1.13+ client.

fossil sundial
#

Would you look at that; this has to be the one exception to the rule of blocking non-resulted events

#

Yea that event is going on the list to be a bit more proper for polymer

maiden hawk
fossil sundial
#

Well I do agree

#

But at the same time the team is lacking the time for more

#

Plus I have a mountain of features waiting to be implemented

#

Which I’ll be crunching away at over after Christmas

maiden hawk
#

thank god I am using ACF so I do not need to mess much with commands

fossil sundial
#

You’re not alone with that
The only people that I haven’t seen complain are the people coming from sponge

maiden hawk
fossil sundial
#

The api concepts are similar;

maiden hawk
fossil sundial
#

And we do use a lot of sponge libraries

#

Including configurate and quite a few other things

maiden hawk
#

Oh configuration api

#

I've just imported external YAML lib

#

To make configurations

#

:)

fossil sundial
#

Yea that works; but you should shade and relocate that ideally

maiden hawk
#

I do not really care

#

But maybe when I'm done with this, I will take a look on Velocity and try to contribute somehow. I see you guys really need help.

#

@fossil sundial Also, are there some large networks that actually use Velocity? If yes, how much can a single proxy handle? (assuming unlimited cores, RAM and bandwidth)

#

From my experience the limit on Bungee was about 500-1000 players

#

So I hope it's better on Velocity

fossil sundial
#

Java does have a point of diminishing return with a single instance; that said I had a scenario in which I ended up pushing a single instance to about 1800 players

maiden hawk
fossil sundial
#

No idea where the absolute limit is

fossil sundial
maiden hawk
#

But I am afraid this ain't the case

fossil sundial
#

But velocity still does provide a good amount of resource usage reduction over bungeecord

maiden hawk
fossil sundial
#

Depends on how you define powerful, the more cores you have and the faster the memory speed the better

#

But even that somewhere has a limit

maiden hawk
#

or it will reach it's architectural limits by then?

fossil sundial
#

The 1800 player benchmark was achieved on a 2017 32-core Xeon with 3200mhz ECC ram

fossil sundial
maiden hawk
#

Wasn't it 16c/32t?

nova radish
#

Can you get a players coordinates from a velocity plug-in?

fossil sundial
fossil sundial
#

the phi-lineup scaleable processors at that time only had 2400mhz memory, this chip was "special" for having a different controller

#

theyre fom Q4'16

#

if I end up having access to that again Ill get the serial number

green dune
#

Is there a way to deny login and also prevent the particular connection from being logged?

fossil sundial
maiden hawk
#

I would like to see how it compares to a modern EPYC cpu

#

Or was it an Engineering Sample?

maiden hawk
#

@fossil sundial Oh god, it looks like ACF is only for Velocity 1.x, do you know any other solid command api?

fossil sundial
#

But I have to confess I still dont have a clear grasp of how to use that myself

maiden hawk
#

Well, from my today first use impression, it looks like Velocity is very chaotic

#

And I might consider using Waterfall

#

:(

fossil sundial
#

I may be one of the few velocity developers but that doesnt mean I have grasp of the entire project

silent needle
#

im not sure if cloud works with velocity 3, you could try that

maiden hawk
fossil sundial
maiden hawk
fossil sundial
maiden hawk
#

it fucks up on load because it uses wrong Component api packages

#

Here is their pom

fossil sundial
maiden hawk
#

But ACF isn't which would suck

#

I will try to update it

fossil sundial
#

ah

#

Ill run my update script on it to see if that produces something usable

#

¯_(ツ)_/¯

maiden hawk
#

So far it looks like only the Component api is broken

maiden hawk
#

But I hope I will figure it out

fossil sundial
#

also simplecommand changed a bit

#

not sure if thats applicable still

maiden hawk
#

ACFVelocityUtil, VelocityCommandCompletions are broken

#

And others probably too

#

But I didn't check them, cause I am currently fixing completions

fossil sundial
#

thats what my rigged script does for reference

maiden hawk
#

Specially the Chat Color

#

which is RGB in new

#

But the api used standard §x

#

But I fixed that

#

@fossil sundial It's far worse than I thought

#

3/4 classes are broken

#

And it has literally no documentation

burnt dragon
#

cloud supports velocity 3, if you're looking for a command framework

maiden hawk
burnt dragon
#

yeah that's understandable, although they're really not super different, especially if you use cloud annotations

maiden hawk
#

So Components fixed, Command api remaining

maiden hawk
#

Aand done

#

@fossil sundial So it looks like 3 people already did the same thing as me lol

#

Well there goes 4th PR for velocity update

#

@fossil sundial BTW, commands executed which do not match any velocity command appear in the event too

#

And you can cancel them.

#

Also that command list thingy is completely useless

kind lynx
#

Hello, is there any full documentation for velocity 3.1.1? I need it to develop plugins for my server. Thank you!

maiden hawk
kind lynx
#

Well...

#

Maybe you can say me, how can I send player to another server...

maiden hawk
#

But I need it to

#

Lemme check

kind lynx
#

Okay...

#

Maybe anyone who know how it does work can help us.
Can anyone help us?

trim forge
#

Having a bit of a weird issue, I'm listening to the KickedFromServerEvent so that I can catch any players that get kicked from a server and balance them in the best hub accordingly. Issue is, for some reason, it doesn't actually connect them to the hub. All the logic processes, and the code listening for initial player join hub balancing also balances them correctly, but the KickedFromServerEvent just kicks the player from the proxy when I #createConnectionRequest(server). Anything I've missed? Thanks!

burnt dragon
#

are you using the redirect player result?

trim forge
trim forge
burnt dragon
#

the event accepts a result that tells velocity where to send the player

#

you should be using that

trim forge
#

Am I just blind? kekw

#

Oh yikes

signal dagger
#

ehh, quick question:
Just HOW breaking is Velocity 1.1.10 -> 3.1?
I've been very inactive over the last few months

signal dagger
#

I'm asking because of my plugin (shameless self-advert while I'm at it https://github.com/itsTyrion/AntiVPN)
I just added Waterfall/Bungee support but realized it's still on Velocity 1.1

trim forge
signal dagger
#

Can't comment on that.
I barely tested it but it seems decent on the first glance.
I'd heavily prefer to still have iplegit.com around (I actually planned to combine both!), but, very unfortunately, they shut down without a trace at some point in the last few months :/

signal dagger
signal dagger
maiden hawk
signal dagger
maiden hawk
signal dagger
#

yup

maiden hawk
#

Wow

#

Lucky one

signal dagger
#

well I don't use any commands, only the LegacyComponentSerializer, and 3 events ((Pre)Login and ProxyPing) in this plugin

maiden hawk
signal dagger
#

I think I should make a forum post.
6 DLs is not a whole lot
actually.. there's probably already a WAY better plugin out there sooo

glacial kraken
#

it looks like permission checks cannot be done on some packets sent before join (returns false when true)

#

is there a way to bypass this

glacial kraken
#

let me commit my changes and tell u wait

#

using protocolize listening to that packet

#

permission check return false

#

goes badly

#

player.hasPermission("plhide.blacklist-mode")

fossil sundial
#

Well first of all direct interaction with packets is unsupported for this exact reason

#

Secondly

glacial kraken
#

i had to cancel the packet as this is a security problem

fossil sundial
#

GameProfileRequestEvent has to be completed for the PermissionsSetupEvent to fire

glacial kraken
#

if player is not active, event not sent

glacial kraken
#

ok nice works

fossil sundial
#

Yes, LuckPerms listens for that and registers itself. But the event is not fired before the player has a UUID assigned yet

#

it doesn’t make sense otherwise

glacial kraken
#

ok time to let my friend test the plugin

fossil sundial
glacial kraken
#

that bug was gonna be an exploit for my plugin

#

good thing i found it early

fossil sundial
#

the point of this plugin is to hide information about your server

glacial kraken
#

yeah

fossil sundial
#

Well, proxies are terrible at being hidden

glacial kraken
#

uhh it doesn't currently hide the proxy

#

my plugin would do all it can to make players unable to find plugins

#

only way left would be guessing

#

by the way the docs for isActive is not clear, does it check if player is online on a server?

fossil sundial
#

that’s for the channel, tho you really shouldn’t be touching that

glacial kraken
#

i trust that boolean for checking if perms are loaded

#

hope it goes fine

#

if this check goes wrong then exploit is made

fossil sundial
#

Since the event should be fired before the player is in the PLAY protocol stage that shouldn’t be an issue

#

though you are treading in unsupported territory so I can’t tell you

glacial kraken
#

Do i need a check for paper too?

#

Listening to COMMANDS and TAB_COMPLETE with protocolib

#

With no checks before perms

#

Is it fine for paper/spigot

burnt dragon
#

honestly, have you considered just negating the permission for that command and changing the spigot.yml setting to not send command namespaces?

glacial kraken
#

spigot.yml's option is dumb

#

also no, i do more than just removing plugin:name

#

good its working

maiden hawk
#

@fossil sundial Hey, how would I make the / completion commands disappear

fossil sundial
#

That was broken in the past but is now working correctly

maiden hawk
#

Will the command just not be there?

fossil sundial
#

they’re not sent in the available commands if the sender predicate you can set isn’t met; that’s essentially it

#

like try /velocity dump for example

#

without permissions vs with

maiden hawk
#

To put this in context, I want the commands to not appear when player doesn't have permission to execute them. It works like this normally on bukkit

maiden hawk
fossil sundial
#

then you just have to supply the permission as predicate when registering the command, and not check it when the command is executed

maiden hawk
#

oof ok

fossil sundial
#

That’s how brigadier works on vanilla too

maiden hawk
#

@fossil sundial This seems to work, however the root command is still visible.

#

how would I make that one dissapear?

maiden hawk
#

And returning an empty list when the sender doesn't have permission

#

which should I use then?

bold wharf
#

did you set a predicate on the root?

maiden hawk
bold wharf
#

don't mention

maiden hawk
#

anyway, any tip on how to do that?

#

@fossil sundial This is kinda awkward, but how do I set a predicate on root?

nova radish
#

Is @Subscribe(order = PostOrder.EARLY) the eqivalent to @EventHandler(priority = EventPriority.HIGHEST) ?

maiden hawk
#

HIGHEST is equivalent to LATEST

nova radish
#

Hmm alright, thanks!

nova radish
maiden hawk
nova radish
#

No problem, you helped good enough where I could put the last pieces together, thanks so much

maiden hawk
burnt dragon
#

that's what it says yeh, but it works fine on 3

maiden hawk
burnt dragon
#

yes

maiden hawk
#

Great

burnt dragon
#

assuming you set the permission on the command

maiden hawk
#

I'm going to switch to it

#

Thanks!

burnt dragon
#

good choice :p

maiden hawk
burnt dragon
#

i mean, the fundamentals are very similar but there are a lot of differences, some big some small

maiden hawk
burnt dragon
#

they have a discord as well if you need support

maiden hawk
rare osprey
#

Is there a easy way to send a Plugin message?

nova radish
#

cloud commandframework is the future!

#

Regardless, is there anything similiar to getResource or getResourceAsStream for Velocity?

dull sierra
#

Isn't getResourceAsStream just part of a class in general?

nova radish
#

Well, getResourceAsStream is from Bungeecord, getResource is from Bukkit, I was wondering if there is somehting like that in Velocity because all I'm trying to do is implement Velocity support for BanManager

burnt dragon
#

they are part of java

#

can be obtained from a class or classloader

#

so MyClass.class.getClassloader().getResourceAsStream("etc")

nova radish
#

Thanks! Still learning Java somewhat, may of skipped past a few sections 😛

spiral thunder
#

Hey,

Is there a way to check if the player was connecting to the proxy in a KickedFromServerEvent?

burnt dragon
#

did you have a look at the javadocs of that event?

#

there's a kicked from connect property

nova radish
#

Looking at the JavaDocs right now, I don't see any method to get a player class from CommandSource

#

I would search for this in the Discord, but you know, new Discord thing

burnt dragon
#

instanceof ?

nova radish
#

I don't want to check if the CommandSource is a player- wait would that work?

#

Okay, i think i confused myself.

burnt dragon
#

command source is an interface that is implemented by things that can be the source of a command

#

one of those things is the Player object

nova radish
#

Ah okay, so it's basically similiar to CommandSender like in Bungeecord?

#

That's what I was generally thinking, but I'm also thinking I'm gonna need to rethink this for a bit.

burnt dragon
#

essentially yes

latent kelp
#

Where can I find the resetting of a players information when they disconnect/transfer servers? Specifically resource pack, I can only seem to find the handling of them connecting

bold wharf
#

probs the client does that when it's sent the login packet again

#

that packet causes the client to reset a good chunk of state

latent kelp
#

loverfella manage to make it so the client doesn't change resource packs when switching between servers

#

or is that only possible on lilypad?

bold wharf
#

that's possibly on lily and the default behavior on bungee/waterfall

#

it basically involves a lot of extra crud in order to pull of that way, e.g. rewriting the metadata for entities, etc

latent kelp
#

Bungee doesn't do it either, well not the newer versions at least, so a fork of velocity which does that is very unlikely/would be hard to maintain?

bold wharf
#

bungee doesn't resend the login packet, it basically just makes it look like a dimension switch

#

no idea what lilypad does, that doesn't seem to have logic for doing the rewriting stuff

#

but, no reason they couldn't be doing that sorta magic on their own

#

In part am just theorising on it based upon past knowledge of how some stuff works

latent kelp
#

Yeah well its pretty annoying with the way I've got multi instances setup that when switching between zones you load the texture pack twice, once for leaving and once for joining, its a massive problem tbh

bold wharf
#

if it's what I think it is, velocity has no real control over that

latent kelp
#

so how do you think loverfella get around the loading screens of it?

bold wharf
#

as I said, they won't be using the join packet

latent kelp
#

hmmmm, okay, thanks

nova radish
#

and no I was not just stuck on this for like a hour.. I was doing other stuff that was easier

rare osprey
#
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:142) ~[velocity.jar:3.0.1]
        at com.velocitypowered.proxy.util.VelocityChannelRegistrar.register(VelocityChannelRegistrar.java:40) ~[velocity.jar:3.0.1]
        at de.lacodev.staffcore.StaffCoreLoader.initChannels(StaffCoreLoader.java:50) ~[?:?]
        at de.lacodev.staffcore.StaffCoreLoader.initialize(StaffCoreLoader.java:43) ~[?:?]
        at de.lacodev.staffcore.StaffCore.onProxyInitialization(StaffCore.java:41) ~[?:?]
        at de.lacodev.staffcore.Lmbda$1.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:47) ~[velocity.jar:3.0.1]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:585) ~[velocity.jar:3.0.1]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:466) ~[velocity.jar:3.0.1]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
        at java.lang.Thread.run(Thread.java:831)```
Could anyone help me? 😅 

`ProxyServer#getChannelRegistrar().register(() -> "labymod3:main");`
#

<@&748618676189528155> ?

scenic grove
#

If you need help just wait

eternal lark
#

Unless the help you want is getting punished. 😄

sleek nacelle
#

oh boy free warning

valid wasp
nova radish
#

Is it possible to dispatch commands to the proxy like Bungeecord?

#

Looked through the Javadocs a bit where I thought it would be, but I don't see anything like that

#

Found it. commandManager

nova radish
#

Is there anyway to get a command from the commandManager or at least get all the commands registered under the commandManager?

burnt dragon
#

what's the xy?

coarse topaz
#

You can get all of the aliases, and with that you can get the command meta using CommandManager#getCommandMeta(alias)

nova radish
#

Ah okay! Thanks!

nova radish
#

What would be a similar solution to event.setCancelled(true) for PlayerChatEvent?

#

This whole ChatResult doesn't say what I should be setting the value as

#

AHAH!

#

it's PlayerChatEvent.ChatResult.denied()

#

I'm so smart.

nova radish
#

Oh sorry! I forgot to turn off the ping option.

worldly granite
#

how do i go about using the plugin messaging channel

worldly granite
#

i'm trying to port a bungeecord plugin to velocity that fowards a plugin message and saves it

grizzled rapids
#

Where is Velocity Javadocs? I want to disable tab completions completely

rich hawk
fleet sailBOT
#

https://jd.velocitypowered.com/

Velocity Javadocs. Pick a version: Velocity 3.0.0 (latest) · Velocity 1.1.0 (LTS until December 2021) · Velocity 1.0.0 (unsupported) · Velocity Polymer ...

lofty tapir
#

I'm having a problem with sendResourcePackOffer... basically I'm sending this in the ServerPostConnectEvent, but when joining a server, the resourcepack prompt appears for a moment but then it seems the server (or client) forcefully close the prompt during the join process - will delaying this method by a second ensure the player is shown the prompt?

fossil sundial
nova radish
fossil sundial
#

Did you try to refresh your dependencies?

nova radish
#

Trying now

#

Nope. And yes, I checked my pom.xml and it's currently set to 3.0.0, it was previously set to 3.0.1

fossil sundial
#

Any 3.x should have it
Also you sure you didn’t change the version of the annotation processor and forgot to update the api?

#

I’ve made that mistake too many times to count

nova radish
#

I don't believe so? I just have Velocity as a simple dependency with the type of jar and javadocs :hmm:

fossil sundial
#

You’re using IJ right?

nova radish
#

Intellij?

fossil sundial
#

Yea

nova radish
#

Yep

fossil sundial
#

You can check the imported dependency under libraries in the tree on the left

#

If that’s still on the old version you might have to re-import the maven project

nova radish
#

Looks to be just 3.0.0 and a lot of red, I'll reimport real quick

fossil sundial
#

Your classpath/index (cache) is broken

#

A reimport should fix it

nova radish
#

Alright

fossil sundial
#

Do you have an overlapping dependency on the root module?

#

Or is a dependency overshadowing your imports?

worldly granite
#

ok i got it

#

how do I use config

#

I looked at the sponge config but it didn't make much sense to me

#

so

nova radish
#

But generally, I think it's fine since my functions accept null from the function, moreover to the more important thing that is preventing me from testing the plugin..

@Plugin(
        id = "banmanager",
        name = "BanManager",
        version = "7.6.0",
        url = "https://banmanagement.com",
        description = "A suite of moderation plugins & apps for Minecraft servers",
        authors = {
        "confuser"
        }
)
public class BMVelocityPlugin {
  @Getter
  private BanManagerPlugin plugin;
  @Getter
  private VelocityConfig velocityConfig;
  private final String[] configs = new String[]{}; // this is filled with stuff u dont need 2 see
//  private final Metrics.Factory metricsFactory;
  public final ProxyServer server;
  @Inject
  private Logger logger;

  private final File dataDirectory;
  @Inject
  public BMVelocityPlugin(ProxyServer server, Logger logger, @DataDirectory final Path directory) {
    this.server = server;
    this.logger = logger;
    this.dataDirectory = directory.toFile();
//    this.metricsFactory = metricsFactory;
  }
  @Subscribe
  public void onProxyInitialization(ProxyInitializeEvent event) {
    onEnable();
  }
  @Subscribe
  public void onProxyShutdown(ProxyShutdownEvent event) {
    onDisable();
  }
}```

Error: https://paste.gg/p/anonymous/0751adaddd83480e9fdf31f30217a8ff
fossil sundial
#

Well that is unless you provide it appropriately

tough olive
#

is it possible to bind in ipv4 and ipv6 ?

fossil sundial
tough olive
#

yes before 1.9 for client

#

because this netty version before does not support ipv6

nova radish
#

My apologies, left the ping on

jolly sandal
#

Hi guys Im trying to open a book to a player but it isnt shown here is my code:

this.proxy.getServer().getScheduler().buildTask(this.proxy, () -> {
            player.openBook(Book.builder()
                    .title(Component.text("News"))
                    .author(Component.text("Pseudow"))
                    .addPage(Component.text("§c§lNOUVEAUTES: \n§cSoon").asComponent())
                    .build());
        }).delay(1500, TimeUnit.MILLISECONDS).schedule();

It is fired in the PostLoginEvent

rich hawk
#

afaik you can’t do books on velocity

jolly sandal
rich hawk
#

From adventure

jolly sandal
fossil sundial
# jolly sandal what?

The text-library velocity uses has that feature, but Velocity doesn’t provide it as a feature. I still think it should be removed from the adventure api proper or moved to a separate module

jolly sandal
#

oh okay

#

thanks

fossil sundial
#

The reason this isn’t a feature is that it would require velocity to have a full implementation for the player inventory

#

which isn’t good for performance and isn’t really a good idea for a proxy which doesn’t track states

manic pumice
glacial kraken
#

can i use color codes (like &c) in log messages?

ashen pawn
burnt dragon
glacial kraken
#

what is the event when player joins the proxy

agile ore
#

Pre/PostLoginEvent

glacial kraken
#

can i send messages here?

agile ore
#

should be fine in the post login event

#

pre probably not since the player isn't actually logged in yet

glacial kraken
#

ok thx

glacial kraken
#

getClass().getClassLoader().getResourceAsStream("version-config.json") NPE

#

i just need to read a resource bruh

proper gulch
#

Hey, can I use plugin messaging channel on a spigot plugin when the proxy is running on velocity?

fossil sundial
fossil sundial
glacial kraken
#

umm yes its in the resources in src

#

and i see it in jar

proper gulch
#

Thats possible right?

#

Without any velocity things in my spigot plugin

glacial kraken
fossil sundial
manic pumice
fossil sundial
#

Bungeecord has the GetServers subchannel command which id much recommend over your approach

#

GetServer should also work; the response should be empty on that one

#

Though I’m not quite sure in that case

manic pumice
#

I will switch out some logic and use one of those then. I can always store the last time I got a PlayerCount response back from a server and ping off a GetServer if its been a long period to check if it still exists (that's if the GetServer responds I'll shout if not). Thanks again for looking in to it.

glacial kraken
#

how can i run an async task

#

how to auto make links clickable in component?

burnt dragon
#

there's no way to do it automatically, you'll have to use the replacement system matching a url regex

#

or just construct the component with correct click events in places

verbal rain
#

hey so
trying to add velocity as a dependency and intellij is angy
this is the correct dependency right?

  <dependency>
        <groupId>com.velocitypowered</groupId>
        <artifactId>velocity-api</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <scope>provided</scope>
  </dependency>```
fossil sundial
verbal rain
#

ah that would be the trouble then

#

thanks m8

median vessel
#

How do you kick someone from the network programmatically?

#

(from a paper plugin, not a velocity plugin)

harsh saddle
#

When will velocity support forge 1.13>?

limpid vine
fossil sundial
#

Using the bungee plugin messaging channel; Assuming you didn’t disable it you can use that to kick a player from the proxy with a plugin message.
We didn’t bother reinventing the wheel and this way we stay somewhat compatible to downstream plugins that just need basic proxy functionality.

You can read about that here
https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/#kickplayer

fossil sundial
agile ore
#

?

agile ore
#

Hello

#

what's new with velocity 4.0.0 api?

analog dew
#

Velocity 4.x barely exists right now

agile ore
#

oh right

#

so I should just go for 3.1.0?

analog dew
#

Yes

agile ore
#

okay 😄

slow terrace
#

Just wondering is there anyway to send a message between a server and the proxy without using a player? or does velocity have its onw messaging channel i can access within a pluign)

burnt dragon
#

nope, you have to send it through a player

slow terrace
#

ok

glacial kraken
#

You can just encrypt the message if u don't want them to see, i think

quaint canopy
#

Is it possible, to get the ClassLoader, which loaded the plugin?
It's possible in PaperSpigot and I need this, to use the ServiceLoader

glacial kraken
#

Yes u can getClass().getClassLoader()

paper geyser
#

is there a way like bungeecord to be able to talk to the proxy via server side. I'm asking as i want to be able to send players cross server on server-side

fossil sundial
teal sand
#

Hi I have a question regarding velocity.
Does Velocity natively support the bedrock protocol?

burnt dragon
#

no

tender spruce
median vessel
#

Follow-up to my earlier question - is there a way to test if the BungeeCord plugin channel is available? I basically want it to do a proxy kick if it is, and a server kick if not so I need to know if its available

teal sand
tender spruce
#

Ah

agile ore
#

Most plugins seem to handle this with a config option

harsh saddle
#

Im purely using velocity for 1.7 support

ancient cosmos
#

Is there any way to not have certain servers included in the /server command?

agile ore
#

^

bold wharf
#

No, basically, you'd need to implement your own /server command with its own stuff and implement your own restrictions, etc

tender spruce
#

how can you run a velocity server in a dev environment?

maiden hawk
#

At least, that's how I do it

trim forge
#

Any way to handle when a player joins from an outdated client? Velocity poos itself when that happens

tender spruce
maiden hawk
#

if you use maven

#

you can do it the same way as I do

#

and use the maven jar plugin

#
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <outputDirectory>test/plugins</outputDirectory>
                </configuration>
            </plugin>
tender spruce
#

Is there a similar tool for gradle?

maiden hawk
#

probably google something like

#

gradle specify jar location

#

or smth like that

tender spruce
#

Okay lit thank you

maiden hawk
#

np

fossil sundial
steady kettle
#

Does ChatResult#message not support coloring? Because I’m having an issue with it

trim forge
# fossil sundial Outdated as in? Velocity supports 1.7-1.18.1 currently and there are events for ...

Sorry I was just being slow

One issue I can't seem to figure out though is litebans not working properly on velocity. Bukkit seems to override any litebans commands, and there is no way to stop it doing that. I'd have presumed that the proxy would handle commands first, but and commands in litebans that are also on a bukkit instance (e.g. /ban) is used as the bukkit command rather than the velocity one. Any ideas? TIA

vestal prawn
#

Normally litebans on bukkit override /ban of bukkit

trim forge
#

That'll be a yikes kekw

#

Let me go take another look, apologies if I've just been stupid

vestal prawn
#

But the override thing of bukkit has nothing to do with the proxy

trim forge
#

Oh my goodness I've had a MASSIVE yikes

#

Any chance we can just delete these messages and forget about it? wheeze

vestal prawn
#

i already screenshot the messages, these messages will stay forever in our minds

#

@trim forge did you encounter issue with Litebans on Velocity ? Because it's pretty new and i want to switch to Velocity

trim forge
#

No issues apart from ones that I made myself

tribal adder
#

Hi! I'm trying to create a plugin that removes commands from the / command menu.
Bukkit has an event called PlayerCommandSendEvent to get the list and remove commands from it.
The only thing I can find in the velocity javadocs is TabCompleteEvent, but the description says it's below 1.12.2 and it doesn't exist in the maven dependency (intellij intellisense cannot import it).
Is there an event for it, or is there another way to remove commands from the menu?

craggy pecan
#

Although you should use permissions to remove suggestions, your idea is a really ugly hack

tribal adder
#

Thanks for your help!

tender spruce
#

how do you create a listener to listen for messages on a MinecraftChannelIdentifier?

trim forge
#

I'm trying to make a method that falls players back to a hub server if a main server goes offline, as for some reason velocity doesn't always do that, but the KickedFromServerEvent isn't catching it - any ideas what's best to do? Thanks

tribal adder
#

In velocity, is there a way to open inventory menus for players, for example a custom /server command with an inventory to select a server?

fossil sundial
fossil sundial
tribal adder
#

Ok, thanks for your response!

tough olive
#

how to delete the log of the initial disconnected connection, it spams that when my anti-bot plugin denied the result from preloginevent

#

or how to disconnect from preloginevent without any log

agile ore
#

Hey, is there a velocity plugin messaging system? I've found this - https://jd.velocitypowered.com/3.0.0/com/velocitypowered/api/proxy/messages/package-summary.html - but not sure how to accessi t from Paper

Our Bungee Messaging plugins which worked on latest BungeeCord aren't working on latest Velocity, so just trying to fix it. Using the channel BungeeCord

In velocity.toml, we've set player-information-forwarding to legacy in order to support it, too.
In the [advanced] section we've also set bungee-plugin-message-channel = true

Maybe we're missing something?

fossil sundial
#

No; that should just be it. What’s your game version?

agile ore
#

1.17.1

fossil sundial
fossil sundial
agile ore
#

Latest BungeeCord supports BungeeCord but Velocity only supports bungeecord:main?

#

I'll try swap all chan names to bungeecord:main, tyty

fossil sundial
#

This is md_5 breaking game design again if true

#

1.13+ requires the namespaced:key format for channels

#

Which is why just BungeeCord shouldn’t work

agile ore
#

Alright thanks, I've encountered new errors but moving to #paper-dev for that 😄

agile ore
#

I've changed my code now so that there's an outgoing channel - "BungeeCord" (as this method will make it bungeecord:main) and an incoming channel - bungeecord:main (as this method will make it "BungeeCord" for some reason)

burnt dragon
#

honestly that is a genuinely terrible method that needs to be split into incoming/outgoing

agile ore
#

I mean it's deprecated. It's still just used.... alot

#

I'm just going to fuck it and set up a Velocity plugin/channel to handle forwarding messages to servers lol

fossil sundial
agile ore
#

Idk where my problems lie but for now I'm just going to blame that lol. Thanks for all the help

fossil sundial
fossil sundial
agile ore
#

yee that's the proxy

fossil sundial
#

my brain is fried; server