#waterfall-dev

1 messages · Page 13 of 1

lean gobletBOT
#

you can only do proxy commands in a proxy plugin

wary inlet
#

why does acf bungee use those for color codes 🤮
@bleak current acf in general does

bleak current
#

oh wait i eralized why

#

i was misspelling the command lmao

#

phoenix616, so hmm, can I take the logic from serverstatus and take the logic from minequery and hack them both together to make my solution

lean gobletBOT
#

I guess, not sure why one would need the serverstatus part though but you do you ¯_(ツ)_/¯

bleak current
#

well

#

does minequery do the

#

checking if the proxy servers are online

lean gobletBOT
#

I mean, the socket wont be open when the server isn't running

bleak current
#

yeah

lean gobletBOT
#

serverstatus just pings the port without requiring a bukkit plugin

bleak current
#

oh

#

so i'm confused

#

how will i be able to do /uptime factions on the prison server

#

(for example)

lean gobletBOT
#

you query the server from your bungeecord via some way

bleak current
#

yeah so wouldn't i need umm

#

serverstatuschecker

lean gobletBOT
#

in the case of having a plugin like Minequery on the bukkit server you would contact the query port of that plugin and send it the command

#

no, you could query that information when the command is run if you don't want to do any logging

bleak current
#

hmm ok

#

i'll fork minequery and just

#

use my head from there

#

I can just remove all the password and stuff right?

#

seeing as i won't need any of it if i'm just getting the bukkit server uptime

#

with like, System.currentTime or sumting

lean gobletBOT
#

theoretically you don't even need to fork it, you could just use that plugin as is and just make a simple bugnee plugin to query the info

#

(of course if you don't want to query it via a command but directly you would need to modify it)

#

also the password is there so that nobody can run commands on the server as console unauthenticated xD

bleak current
#

yeah i want to query directly

lean gobletBOT
#

the gneral info (like palyers) is available without a password you could just stick the updatime in there

bleak current
#

yeah!

#

if all I want is just the uptime

#

do I need the port and stuff?

#

query port, etc

lean gobletBOT
#

the query port is the port the query server will listen on and which you need to contact to get the info

bleak current
#

what should that be

lean gobletBOT
#

tbh it might be easier to just use a pub sub system (like the one in redis or rabbitmq) to get that info rather than directly dealing with sockets but I guess that's up to you ¯_(ツ)_/¯

bleak current
#

idk man

#

i just want the plugin to work ya know

#

redis would make me have to install a totally different server and stuff

lean gobletBOT
#

don't we all just want that? ;D

bleak current
#

what about rabbitmq

lean gobletBOT
#

it's a pub sub messaging server

#

afaik there are some peer2peer pub sub messaging java libraries too which don't require an extra server but I haven't dealt with any of them that

bleak current
#

is that just a dependency i can add

#

or do i n eed to install external stuff

lean gobletBOT
#

no, rabbitmq would require a central, standaloine server to run

bleak current
#

dang

#

what about MySQL

#

actually that would be too laggy

lean gobletBOT
#

mysql isn't really suited for sending messages. I mean you could abuse it to do that but not ideal lol

bleak current
#

yeah hmm

#

damn it dude

#

alright so

#

what can I use that doesn't require an extra server

#

I just want to be able to do /uptime factions on the lobby and see 24h, 3m

#

or whatever man

#

ohhh

#

the minequery thing you wrote

#

is that using the query-port in the bungeecord config?

lean gobletBOT
#

no

#

it's the port that the plugin will start its query server on

bleak current
#

oh

#

is that all i need to do

#

open the port?

#

and configure minequery to use that

lean gobletBOT
#

basically, yes

bleak current
#

oh ok

#

i'll do that then

#

hmm

#

if all i'm doing in QueryData

#

is storing server uptime

#

I don't need the password right cause nobody could execute commands?

lean gobletBOT
#

afaik it shouldn't accept commands if no password is set but if you want to be sure just remove the command logic I guess

bleak current
#

hmm

#

for Request.java

#

should this not be implemented in core

#

and instead moved to bukkit

#

since i'm only getting one thing

lean gobletBOT
#

that's for you to decide xD

bleak current
#

i'm honestly confused on how this codebase is

#

like i'm only competent with java with what i knew through bukkit

lean gobletBOT
#

it's abstracted so that code that is shared between bungee and bukkit isn't included twice

bleak current
#

ohh

#

wait so how muchh of this do i actually need

#

do I need Request or QuerySender

#

I imagine I'd need QueryData and QueryServer

lean gobletBOT
#

QuerySender is just for executing commands

#

the important part that you want to look at it is the server

bleak current
#

yep I did the QueryServer

#

that's why I'm doing Request now

#

hmm I guess I need to modify Request to where it's only inquiring for like

#

the uptime? idk

lean gobletBOT
#

yes, you would either add a new uptime command case or just remove all the other functions and simply always return the uptime

bleak current
#

ok

#

this looks right, I think

#

phoenix616, is it fine to make the query port the same port the server runs on

#

or nah

#

and does it have to be open if utilized on the same system

wary inlet
#

because aikar decided that was nice

lean gobletBOT
#

needs to be a different port, you can't run two services on the same port

violet saffron
#

You can also modify it to anything you want.

lean gobletBOT
#

also you don't really need the response object or list if you just want to directly return it

bleak current
#

ah ok

#

looks about right I think

#

hmm so in my bungeecord plugin

#

oh

#

does the query port need to be diff

#

for every server?

lean gobletBOT
#

depends on whether or not to use different addresses to host them on

bleak current
#

they're all gonna be local

lean gobletBOT
#

I run every of my server on a different localhsot/lan address so I just use the same ports everywhere

#

but if you use the same address then you are going to have to use different ports

bleak current
#

hmm ok thx phoenix616

#

my final question and hopefully this will turn out great

#

how do i query a server

#

so now I'm writing the command part

#

how do I get the query data result from a specific server

trail plume
#

You'd need to ping that server

#

You'd need to pull up the needed code from somewhere or something, wiki.vg'll have docs and examples on it

bleak current
#

ohhh

#

The Response class tracks the server port

#

Didn't see that

#

hmm

#

so maybe i should also make a field for the server name in the config, right?

#

hmm ok

#

i think i did it

#

alright cool

#

@trail plume wdym wiki.vg? this is phoenix's personal project tho

trail plume
#

it's a website

#

it's literally the holy grail of protocol documentation

bleak current
#

yeah but

#

what does that have to do with minequery

trail plume
#

Well, I thought you was asking how to actually do the ping, not "I'm running through existing source for it"

bleak current
#

ahh nah

#

I don't need to do a ping or anything

#

I think I figured that part out but what I was asking phoenix616 is

#

how would I get a different server with the methods provided

#

ah ok phoenix616, so i think i know thhe structure

#

hmm

#

nope nevermind

#

lost again

#

FUCK

#

this is too hard

#

how do you inquire for a query @lilac crystal? that's what i'm stuck at

#

like, how do i request my query to be sent t ome

#

i can't find any code in that repo showing me that

#

oh

#

I may have an idea

#

nvm

#

@trail plume would wiki.vg have a page on covering sockets? i think i just misinterpreted

#

this code looks like it's reading whatever input is sent to the socket

#

so i think in my command i have to send input?

#

i wrote this

#

but i get

#
java.net.SocketException: Socket is not connected                                                                           at java.net.Socket.getOutputStream(Unknown Source)    
trail plume
#

I mean

#

you need to open a socket connection to somewhere

bleak current
#

hmm

#

this is run() in the QueryServer

trail plume
#

the guides on wiki.vg might cover that, but, they're a protocol doc site with examples of impls, not a "how2java" course

bleak current
#

it opens a socket with the ServerSocket

#

do you know how i could access that socket

trail plume
#

Off the top of my head, no, but, this is not something that's all too hard to google, nor do I understand the full context of what you're doing nor do I have the will to decode it

bleak current
#

I've been googling for like 20 minutes, either I'm just shit or for my use case nobody's tried it yet

trail plume
#

.g java open UDP connection

lean gobletBOT
bleak current
#

Basically I'm using my own fork of Phoenix616's minequery plugin to feed data from my bukkit servers to bungeecord

#

I don't know how to get the query though

trail plume
#

2 second look shows that it literally has a getQueryData which takes a Socket?

#

Just, create a socket connection and throw it in there?

lean gobletBOT
#

I think he's stuck on opening a connection to it from another server ;)

#

.g java connect to tcp server

#

(phoenix616) https://www.geeksforgeeks.org/socket-programming-in-java/ -- Socket Programming in Java - GeeksforGeeks: "Feb 26, 2018 ... This article describes a very basic one-way Client and Server setup where a Client ... To connect to other machine we need a socket..."

bleak current
#

oh!

#

do i do new Socket();

trail plume
#

Read the page?

bleak current
#

i meant for use with getQueryData

trail plume
#

Once again

#

read the page

lean gobletBOT
#

also TIL that I transfered that code over to github already thonk

bleak current
#

I'm doing this right now

#

ill check if it works

trail plume
#

walks out

lean gobletBOT
#

you need to open the socket from your bungee plugin, not in the plugin that you are querying xD

bleak current
#

YES

#

phoenix616 i was just trying to check if this was going to work

lean gobletBOT
#

that code doesn't really check anything

bleak current
#

now i'm confused

#

what do you mean i need to open the socket from my bungee plugin

trail plume
#

You're trying to open a connection to something

#

It needs to know where that something is

#

Once again, read the page you where linked

bleak current
#

the geeksforgeeks one?

trail plume
#

yes

bleak current
#

kk

#

wait, doesn't minequery already do that for me thoughh

trail plume
#

once again

lean gobletBOT
#

no, it only creates a server

trail plume
#

it needs to know where the connection is

lean gobletBOT
#

it doesn't have any code that connects to a server

bleak current
#

ohh ok

#
A ServerSocket which waits for the client requests (when a client makes a new Socket())
A plain old Socket socket to use for communication with the client.
#

does it write to the server phoenix616?

#

I assume this is my response is writing to the socket

lean gobletBOT
#

that part writes to the client which connected

bleak current
#

ahhh

#

but since there's no client that connected

#

nothing happens

#

alright so i get

#

in my command class

#

when the command is ran, i

lean gobletBOT
#

also why are you pressing enter that often? thonk

bleak current
#

sorry, I have adhd and get excited quickly

#

hm

#
    public void run() {
        try {
            for (; ; ) {
                Socket socket = listener.accept();
                new Thread(new Request(plugin, socket)).start();
            }
        } catch (IOException e) {
            plugin.getLogger().info("Ran into IOException! Stopping server");
            e.printStackTrace();
        }
    }
#

Ok I think I understand this code

#

Does this code take what's sent, then starts a Request with what was in the socket?

lean gobletBOT
#

it basically just starts a new thread for each new connection

#

the request object is just there to pass the data and the plugin

#

theoretically you could just use a raw runnable there

bleak current
#

as long as it doesnt massively affect performance i dont really mind

#

huh so what isn't this code doing for me

#

i need to connect to the server

#

with a Socket

lean gobletBOT
#

read teh "Establish a Socket Connection" part in the page that the bot linked after my google search

bleak current
#

ahh ok

#

the port is

#

the query port?

lean gobletBOT
#

yes

bleak current
#

awesome

#

great i established thhe connection

#

am i supposed to write something to the socket now?

lean gobletBOT
#

depends, if your server just instantly sends the uptime then you can just start reading from it I guess.

bleak current
#

uhh wdym

#

how is that determined

lean gobletBOT
#

whether you read input data on the server side and only then send a response or if you don't read anything and send it instantly

bleak current
lean gobletBOT
#

in my original code I read the command info etc

bleak current
#

ahh

#

i just do this

lean gobletBOT
#

then you should be able to directly read it

bleak current
#

Yes!

#

Not the input i was expecting but

lean gobletBOT
#

well you need to read the bytes and make that into a string ;D

bleak current
#

hmm

#

its printing nothing

#
13:09:19 [INFO] Printing socket input stream:                                                                           >                                             
lean gobletBOT
#

why are you writing to the socket's output stream?

bleak current
#

OH I GOT IT

#

YES

#

YESS

#

Awesome, thanks so much phoenix616!

lean gobletBOT
#

:)

bleak current
#

My last question is, how would I get the socket a server is running on with its name?

#

like if i wanted to do /uptime lobby

#

should i store like

#

ok wait that wouldnt work nevermind

lean gobletBOT
#

easiest would be a config that holds the address (if it differs from the normal server address) and the query port

#

something like lobby: "127.0.0.1:12345"

bleak current
#

ahh ok

wide maple
#

I’m pretty sure #461 is happening because of tablist rewriting

#

Does Waterfall have an option to disable it?

trail plume
#

yes

weary grove
#

This is the obligatory mention that Velocity does not have this issue

bleak current
#

phoenix616 how do you get this working on docker

lean gobletBOT
#

T​he​Mi​ne​Be​nc​h: ¯_(ツ)_/¯ I don't do docker

bleak current
#

get what working on docker

dim gust
#

How do you get what working on docker @bleak current ?

bleak current
#

Hello, I would like to know if it is possible to make a waterfall cluster (I want several bungee in case of a crash) ?

trail plume
#

Yes, you just run multiple dozen proxies and have some way to distribute between them

#

DNS RR is the goto generally

bleak current
#

and how do we make the dns system?

trail plume
#

You create multiple records for the server

bleak current
#

on each SRV port?

trail plume
#

Well, yes

#

if you want to balance SRV records, you create multiple SRV records

bleak current
#

here I created on port 25565 and 25566 but in minecraft it just pings me the bungee 25566 and when I turn it off, it doesn't ping me the 25565 how to do ?

trail plume
#

0 = more priority

#

You'll also have to likely contend with stuff like DNS caching

#

Go test with whatsmyip or something

#

whatsmydns*

bleak current
#

okay but then what do I put in priority for both?

trail plume
#

set them to 0?

#

I mean, that's what you're using elsewhere

bleak current
#

ok let's leave them at 0

#

ah it's ok he pinged it

#

but it takes too much time to look for the right port...

trail plume
#

it's a website which calls out to a few dozen other servers, it's not gonna be fast...

#

Beyond that it's literally just DNS

bleak current
#

ah ok but then it works!

#

thanks

spring estuary
#

Registering new servers at runtime. Your thoughts on how to accomplish that? Implement your own AbstractReconnectHandler?

lean gobletBOT
#

just add them to the server map?

spring estuary
#

Yes... thanks ^^

exotic pike
#

Hey guys! I'd like to know if there's a way to catch messages coming back from servers on a Waterfall plugin? I've looked up events and couldn't find an event for it, maybe there's another way? Thanks! 🙂

weary grove
#

what kind of messages?

#

if we're talking chat messages there is a VERY good reason why the proxy doesn't intercept that

exotic pike
#

Like if a plugin sends a message and it gets forwarded to the player

weary grove
#

yeah you'd need to intercept every chat message being sent from the proxy (including any from the backend)

#

that's a world of pain and performance issues nobody wants

exotic pike
#

I'm trying to add live translation to the chat (that works) but also translate 3rd party messages on the fly

weary grove
#

good luck with that

#

hint: you will not be particularly successful

exotic pike
#

I don't need to translate every outgoing message, just want to catch messages from paper to waterfall

#

Well I'm using Deepl it works quite well with text tokenization

exotic pike
lean gobletBOT
#

you would need to register the corresponding packets... but uh, chat is a lot of pain lol

exotic pike
thin oar
#

Hey someone could help me with my question?

whole hazel
#

don't ask to ask it's a waste of you and everyone's time. Just ask

thin oar
#

Im sorry 😦

#

ok

#

Is waterfall like bungeecord?

whole hazel
#

Yep, drop in replacement

thin oar
#

And is it more complicated than bungee?

whole hazel
#

Paper and Waterfall are drop in replacements. You should just download the latest of each and use the same command to start each as you did with spigot/bungee and see what happens (still practice good backups)https://papermc.io/downloads

#

You don't need to change anything other than the jar itself

thin oar
#

So when i want to do plugins for waterfall is it more complicated then bungee pl?

whole hazel
#

nope

#

They are derivatives

#

which means the API is additive only. Aka anything that works on spigot/bungee will work on these.

#

Once you use paper/waterfall there will be even more useful API's added on top of spigot/bungee

#

If you're a developer then you can target paper/waterfall and use those new features, but that'll make your plugin not work on just spigot. You'll even see this on the spigot plugin list's, when the plugin says Only works on Paper at the top. Hangar is a new list of plugins so those authors can list them in a better place

thin oar
#

Ok thank you very much

#

ok thank you im really good at programming but i just wanted to see if the people are nice on this discord thank you and sorry for that stupid questions but after you told me all that stuff i really think i will switch to waterfall and paper

#

I always just thought its not that much better

#

But what you told me sounds really nice

#

Thank you and sorry if you see that as a waste of time but i didnt even know everything you told me rn

#

Im rlly going to switch my server to paper and waterfall thank you ❤️

potent lichen
#

don't ever consider your questions a waste of time

#

they're never a waste of time for you

exotic pike
#

@thin oar Sorry I'm a bit late, but yeah: Paper is Spigot but cooler, and Waterfall is Bungeecord but cooler. Configs are compatibles and you don't have anything to change. But for example, there's an anti X-Ray feature built-in that is much more efficient than solutions you can find on Spigot. For me, there's almost no good reason not to use Paper over Spigot and Waterfall for Bungeecord. They're the same, but better 🙂

#

Also the dev community is much more nicer and easier to talk to, on Spigot's IRC it's just dead, no one responds

exotic pike
#

Guys I'm so happy, I found a way to intercept, modify and cancel chat packets coming from the server on a proxy level. It's a bit hacky but no too much, I had to do some fields hacking in order to not import Waterfall's full .jar

civic valve
#

I highly suggest you don't do that in production but congrats!

exotic pike
#

I will, but it will be way more robust than this

wide maple
#

@exotic pike quick suggestion here; whatever you do DONT parse modify or add the data in this context. Just copy the packets contents and discard it. Once you’re ready send a packet with the contents you read (and modified). If you stop and process anything here in the packet pipeline it will block the entire rest of the players networking and also the network control thread. You don’t ever want that.

exotic pike
#

This is in fact my disclaimer: PS: that handleChatPacket is NOT async. if you do heavy stuff in there, it WILL hurt performance of your whole network in a (very) massive way. Also this is not production grade code and it lacks tests. Please bulletproof and profile this code if you're using it in production.

wide maple
#

I have one case I need to use this in, I fire a CompletableFuture and immediately discard the packet. The completableFuture then creates a ModifyableChat from my wrapping class for Chat and fires an AsynChatEvent. Once all handlers complete it will just fire the ModiyableChat packet down the pipeline.
my handler has: Instanceof Chat && !(instanceof ModifyableChat)

#

^ no blocking and thread-safe

exotic pike
#

That's clever to extend the Chat packet! I'll think about it, but in my case it's not a big problem because I'm operating between the Minecraft server and the Proxy, so if I just player.sendMessage() the thing it won't trigger my handler again

bleak current
#

Helo

#

What is waterfall ?

exotic pike
#

Waterfall is a fork of BungeeCord

bleak current
#

Ooouuuuuu

#

Interesting

#

What we can do in waterfall

#

?

exotic pike
bleak current
#

Ouuuu

#

@exotic pike I have a problem with my paper server my server laggg bec of 1000 of mobs how to turn off mob spawning

exotic pike
bleak current
#

Ok

wide maple
#

@exotic pike ah yea in my case I am just old. I’ve always done it this way. Is a relic from the time before clientbound and serverbound packet types split up. IDK how bungee handles either from the top of my head though

exotic pike
#

@wide maple I genuinely thought there was an event for this on Bungee, until I read the documentation, but while this solution is not perfect and clearly not for beginners, I think it's good enough for my use case but I'll profile this I really don't want to hurt performance

wide maple
#

@weary grove rely when you read this but do we have an event for that in velocity?

weary grove
#

@wide maple eh, no. It'll kill performance.

wraith idol
#

because I am a lazy bastard I still havent gotten rid of the connection.getAddress().getAddress() calls in my plugin - I assume the correct way to managed this - when i want to record ip address's for a connection is to cast the getSocketAddress. ?

potent lichen
#

getAddress() just casts getSocketAddress() anyway

#

so yeah, what I pretty much do is have a small helper method which casts the address itself. If I ever want a more descriptive error message when the address is of another type, I can add it there

snow bolt
#

how does one publish the waterfall api to a specified maven remote?

#

setting up our CI right now, not sure where to start with waterfall

trail plume
#

-DaltDeploymentRepository="valaria-deployment::default::https://repo.valaria.pw/repository/valaria-shady/" for example

#

reponame | leave this | url

snow bolt
#

right, does it publish automaticallly with ./waterfall build?

trail plume
#

No

snow bolt
#

i'll see if i can figure it out, thanks

trail plume
#

if you want javadocs too, bahahahahaaaaa

snow bolt
trail plume
#

Basically, in pre, we basically ./waterfall p and cd in Waterfall-Proxy and then build like any other maven project

#

mvn source:jar javadoc:jar javadoc:aggregate deploy -Dbuild.number=$BUILD_NUMBER -DskipTests -P deployment is what we use for the post step, I got no idea if the javadoc jar is delombok'd

ruby dust
trail plume
#

afaik, that's normal netty practice, that's only really there for accepting new connections last I knew

lofty hill
#

is it possible to disable the communication channels of spigot plugins and bungeecord? I don't use this feature so I would like to disable it, does anyone know where the code is where this listener is registered, is located?

trail plume
#

I always forget the directions, it's either in Upstream or Downstream bridge

sour shuttle
#

I want to override the glist command and modify the amount of people online visual in the multiplayer menu

how might this be accomplished with the api?

#

ok I learned I can just disable glist in modules.yml and make my own glist command in a proxy

#

still not sure about the other challenge though

#

also learned I can just set the players in the proxy ping event

#

wow that was easier than expected, NEVERMIND THAT

lofty hill
#

I always forget the directions, it's either in Upstream or Downstream bridge
@trail plume thank you very much

lean gobletBOT
#

waterfall upstream update wen?

#

runs

tawdry narwhal
plucky hearth
#

Is it possible to create a command then only allow it to be run from console? If ran by a player, it passes through the proxy to the backend server

wide maple
#

@plucky hearth forward it to the server when sender == player command sender

#

Problem solved

#

That way you don’t have to break lots of internal features

plucky hearth
#

How would I forward it to the server or at least where can I find what I need to do it? I've rarely worked with BungeeCord

lean gobletBOT
#

ProxiedPlayer#chat iirc

bleak current
#

How to create a fake player for sending plugin messages?

potent lichen
#

XY problem. Use a better message broker than plugin messages

bleak current
#

I need somethink to send message beetween spigot and bungee one time

lean gobletBOT
#

just use sockets. ideally one uses a message broker though

bleak current
#

My plugin uses socket, but I need solution for automatic reconnect when socket server crashs and restarts. I had idea to use fake players and plugin messages to inform client that Server is active again.

lean gobletBOT
#

just try to reconnect every second or so?

bleak current
#

it can overload network

trail plume
#

Use a message broker

#

These things have literally had the issue of "shooting messages around a network" sorted for years

lean gobletBOT
#

I mean, can't you just send a notification message to the other servers once you are back online?

trail plume
#

Also, for a "fake player", yea, that's viable, but you're going to need to code that fake player, as bungee doesn't have anything built in for that

bleak current
#

BungeeCord has protocol module I think.

trail plume
#

That just implements the protocol

#

It doesn't have any magic in there that would let you connect a fake player

bleak current
#

Maybe there's a library for fake players on the internet?

trail plume
#

Not that I'm aware of, it's basically the stupid way to go about it anyways

#

You're literally adding an extra player for the server to deal with ticking, when you could just use a message broker...

bleak current
#

But player i used for only one message.

#

After sending it can quit.

tall canyon
#

dear zzzCat, can you explain what's a message broker?

trail plume
#

pubsub

#

redis, kafka, etc

bleak current
#

But they needs additional application. I would like to keep everythink in one jar.

trail plume
#

Basically, afaik, nobody has done something for that as it's generally the stupid way to go about it

#

I guess your """best""" option, would be to look at one of the protocol lib things, but, really, erm...

#

Basically, the standalone tools which give you the protocol and you get to write a client to do whatever you want

bleak current
#

I think chcecking server status regullary isn't as bad as I thought.

lean gobletBOT
#

you don't need an extra application for a proper messaging system

#

you can just use some peer2peer system and make the proxy plugin work as a master to help with discovering or something like that

bleak current
#

But is any way to check is bungeecord connected to spigot server?

lean gobletBOT
#

(or directly run a broker in a proxy plugin but why even do that?!?)

little wadi
#

The bungee/plugin-messaging system is okayish for most use cases, idk why you want fake players

lean gobletBOT
#

the bungee is connected to a server when there is a player online on it

tall canyon
#

plugin messages dont get delivered when there's no players online

little wadi
#

Yeah, but how often do you need to send things to empty servers?

trail plume
#

I mean, there are some general concerns with how the proxy uses messaging channels anyways

bleak current
#

And they are putting load on sockets used by players

trail plume
#

There are 0 reliability contracts, if a player disconnects at an inopertune time, etc

bleak current
#

I think the pure sockets can be faster than bungeecord

lean gobletBOT
bleak current
#

How this system works?

lean gobletBOT
#

magic

bleak current
#

smh just do zeromq

#

.g zeromq

lean gobletBOT
#

(DiscordBot) https://zeromq.org/ -- ZeroMQ: "ZeroMQ (also known as ØMQ, 0MQ, or zmq) looks like an embeddable networking library but acts like a concurrency framework. It gives you sockets that..."

balmy inlet
#

Hey, sorry if I am asking in the complete wrong section, but am I doing this wrong?

lean gobletBOT
#

you are not using waterfall

#

also why are you using a javadoc as dependency?

balmy inlet
#

Im following the tutorial I found

#

Alright lemme try with waterfall this time

lean gobletBOT
#

I suggest using the official resources provided by the developers of the software instead of some random tutorial

forest pike
#

what would they know

#

that the random tutorial people don't

balmy inlet
#

My tutorial was on spigotmc btw

forest pike
#

90% of stuff on spigotmc is trash

balmy inlet
#

anyone got a good tutorial?

forest pike
#

in fact 90% of spigot(mc) is trash

tawdry narwhal
#

Just use the official stuff

#

smh

trail plume
balmy inlet
#

cheers

lean gobletBOT
#

oh yeah, the bungeecord wiki needs updating lol

balmy inlet
#

Same problem. says its not found

lean gobletBOT
#

what happens if you run maven manually?

balmy inlet
#

By run you mean?

lean gobletBOT
#

run teh package task via the sidebar or directly via a terminal

balmy inlet
#

Said build success

#

ima try reloading Intellij

lean gobletBOT
#

yeah, sometimes intellij caching fucks up

balmy inlet
#

Yeah that was the issue

#

Thanks for the help!

lyric oak
tawdry narwhal
#

It is doing stuff, just give it the time it needs

sharp bloom
#

Has anyone experienced issues with intellij minecraft plugin? Seems like graddle can't resolve the waterfall-api jar

low moon
#

has nothing to do with intellij, just means you haven't set up your repos right in graddle

outer cosmos
#

When ./gradlew build works, then restart and invalidate caches. IJ has a problem since early 2019.

lean gobletBOT
#

and people laugh at me for running an 2018 version 👀

bleak current
#

you use maven too

#

you don't probably even run into that issue :p

lean gobletBOT
#

I use whatever is suitable for the project

lyric oak
#
Could not determine the dependencies of task ':BungeeCord:shadowJar'.
> Could not resolve all dependencies for configuration ':BungeeCord:runtimeClasspath'.
   > Could not resolve net.md-5:bungeecord-api:1.15-SNAPSHOT.
     Required by:
         project :BungeeCord
         project :BungeeCord > project :Common
      > Could not resolve net.md-5:bungeecord-api:1.15-SNAPSHOT.
         > Unable to load Maven meta-data from http://minevolt.net/repo/net/md-5/bungeecord-api/1.15-SNAPSHOT/maven-metadata.xml.
            > Could not get resource 'http://minevolt.net/repo/net/md-5/bungeecord-api/1.15-SNAPSHOT/maven-metadata.xml'.
               > Could not GET 'http://minevolt.net/repo/net/md-5/bungeecord-api/1.15-SNAPSHOT/maven-metadata.xml'.
                  > Connect to minevolt.net:80 [minevolt.net/73.64.241.253] failed: Connection timed out: connect
      > Could not resolve net.md-5:bungeecord-api:1.15-SNAPSHOT.
         > Unable to load Maven meta-data from http://repo.maven.apache.org/maven2/net/md-5/bungeecord-api/1.15-SNAPSHOT/maven-metadata.xml.
            > Could not get resource 'http://repo.maven.apache.org/maven2/net/md-5/bungeecord-api/1.15-SNAPSHOT/maven-metadata.xml'.
               > Could not GET 'http://repo.maven.apache.org/maven2/net/md-5/bungeecord-api/1.15-SNAPSHOT/maven-metadata.xml'. Received status code 501 from server: HTTPS Required
#

My build.gradle:

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.4'
    }
}

subprojects {
    apply plugin: 'java'
    apply plugin: 'maven'
    apply plugin: 'com.github.johnrengelman.shadow'

    group = 'net.modrealms'

    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8

    repositories {
        mavenCentral()
        jcenter()
        maven { url "https://jitpack.io/" }
        maven { url "http://minevolt.net/repo"}
        maven { url "http://repo.spongepowered.org/maven/" }
        maven { url "http://repo.maven.apache.org/maven2" }
        maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
        maven { url "http://files.minecraftforge.net/maven" }
    }

    dependencies {
        compileOnly 'net.luckperms:api:5.2'
        compileOnly 'org.spongepowered:spongeapi:7.3.0'
        compile 'com.googlecode.json-simple:json-simple:1.1.1'
        compile 'org.mongodb:mongo-java-driver:3.6.0'
        compile 'xyz.morphia.morphia:core:1.4.0'
        compile 'net.md-5:bungeecord-api:1.15-SNAPSHOT'
        compile 'org.apache.commons:commons-lang3:3.3.2'
        compileOnly 'org.projectlombok:lombok:1.18.8'
        compile 'net.dv8tion:JDA:4.2.0_211'
        annotationProcessor 'org.projectlombok:lombok:1.18.8'
    }

    shadowJar {
        baseName 'chat'
        exclude 'docs'
        exclude 'GradleStart**'
        exclude '.cache'
        exclude 'LICENSE*'
        tasks.withType(JavaCompile) {
            options.encoding = 'UTF-8'
        }
        minimize()
    }

    artifacts {
        archives shadowJar
    }
}
trail plume
#

please don't paste huge ass things into discord

#

it also tells you the issues in the log output

lyric oak
#

Probably should of used pastebin

#

So did the repo go down, im guessing?

trail plume
#

Well, it failed to connect to it, so, yea, probably, either that or something on your end

#

For the second one, it tells you, use https

lyric oak
#

Yea thanks, i got it all working now

bleak current
#

How to disable all commands without /login for a time?

trail plume
#

There's the chat event

bleak current
#

so before the command is parse the chat event is called?

tall canyon
#

I guess it's cancelable

#

So basically you need to keep canceling the chat event until they use /login

bleak current
#

I know how event works, but I thought the event is only called for normal chat messages.

trail plume
#

it's called for all chat packets

bleak current
#

That was what I needed.

#

thx

wide maple
#

oh

#

I forgot to submit my patch

#

sorry zzzCat

#

lol

wooden edge
#

"Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.1:shade (default) on project waterfall-bootstrap: Execution default of goal org.apache.maven.plugins:maven-shade-plugin:3.2.1:shade failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-shade-plugin:3.2.1:shade: java.lang.AbstractMethodError: Receiver class com.github.edwgiz.maven_shade_plugin.log4j2_cache_transformer.PluginsCacheFileTransformer does not define or inherit an implementation of the resolved method abstract processResource(Ljava/lang/String;Ljava/io/InputStream;Ljava/util/List;)V of interface org.apache.maven.plugins.shade.resource.ResourceTransformer."

#

I get this error when trying to compile Waterfall

dim osprey
#
[ERROR]     Child module M:\Github\Repo\Waterfall\Waterfall-Proxy of M:\Github\Repo\Waterfall\pom.xml does not exist```
#

Why can't I compile it?

#

even using WSL to compile via bash gives me./waterfall: line 2: $'\r': command not found ./waterfall: line 3: syntax error near unexpected token `$'in\r'' '/waterfall: line 3: `case "$1" in

trail plume
#

bad line endings

#

reclone the repo in WSL

dim osprey
#

okay

#

bruh Bungeecord catalog did not get downloaded

trail plume
#

Would need to see the build output, make sure that you actually cloned the waterfall repo vs the zip download, etc

dim osprey
#

I mean, I used git clone

weary grove
#

windows pepega

wide maple
#

I wonder how many people have had issues with building waterfall in the past because they didn’t use unified line endings

paper maple
#

i know that Plugin Messaging Channel need player connection between bungeecord and paper server.
But net.md_5.bungee.api.connection.Server::sendData did not require any player connection by parameter. the reason why?

trail plume
#

it just picks the first player connected to that server to send the data (or, queues it if nobody is on)

paper maple
#

I see.

paper maple
#

what is different between ServerInfo::sendData and Server::sendData ?

#

ok. ServerInfo::sendData call Server::sendData.

#

Server seems not stable. It will change frequently by player.

dim osprey
#

Hi, long story short, when I try to run ./waterfall rb to test one of my patches it deletes all content of BungeeCord-Patches dir

#

why is that happening?

#

even when I try to do rebuild on clean waterfall clone it delets everything

trail plume
#

Well, that's what rb does, it zaps the entire argument and rebuilds the patches

#

scripts/rebuildPatches.sh: line 51: cd: /mnt/m/Github/Repo/Waterfall/Waterfall-Proxy: No such file or directory

#

Is your issue

dim osprey
#

WSL

#

well

#

time to move over to linux

wide maple
#

here we go again, snapshot 20w45a is out

wide maple
wide maple
civic valve
#

wish they just let the server handle the behavior when declining

#

(and have the default be kick)

#

that way you could send someone to a hub server for example

lean gobletBOT
#

oof

#

time to write another feedback post -.-

#

oh wait, it's an optional setting ¯_(ツ)_/¯

#

"A dedicated server can enforce custom resource packs by setting require-resource-pack in server.properties"

#

I wonder if they properly stop the esc bypass lol

forest pike
wide maple
#

They do. If you don’t accept it buy any vanilla means you get kicked.

#

I already made a mod to bypass it but still

lusty sphinx
#

Glory from 20w45a. You can now force a custom resource pack. Deactivating it in the server list entry will kick you immediately instead
this will kill a bunch of plugins

potent lichen
#

they'll continue to exist to serve older client versions

wide maple
#

I’m interested as to how PS and Via will translate forced resource packs

#

Cc @vestal trellis

vestal trellis
#

you will just immediately be kicked if you deny

#

(but still have the normal "Download resourcepack?" buttons if you have it set to default/prompt)

lean gobletBOT
#

@l​ag​ not really, my plugin can do a lot more (bungee support, per server support, region support) as well as not just kick the player ;D

#

although it's nice that there now is a better interface

void lion
#

Hello everyone!
Does anyone know how I can run a command on one server from another server?
For example I have a server1 and a server2, I type on server1 /runcommand server2 say Hello world and it run /say Hello on the server2

I was thinking of using the BungeeMessagingChannel but I couldn't find a function to send a command...

trail plume
#

you'd send a message

#

You'd also have a plugin listening for said message to run the command that's sent

stark bone
#

The below is ocassionally returning null... Is this normal?

player.getServer().getInfo().getName()```
trail plume
#

'returning null'?

stark bone
#

Sorry i should be clearer

#

I am occasionally getting a NullPointerException when calling player.getServer().getInfo().getName()

#

and i haven't experienced this before

#

as, the player always has to be in a server right?

#

Oh - I am looking at the stack trace. It's a PlaceHolder - BungeeTabListPlus is running it as a BungeeTask - so the player might not have actaully been put in a server yet...

#

Seem i just needed to write it out to understand the error

trail plume
#

I got the perfect solution for you

#

.debugging

stark bone
#

Thank you. I appreciate the advice

#

and not the sarcy responses some other communities give...

#

it means a lot ❤️

lean gobletBOT
#

j​am​es​09​05​00​: ProxiedPlayer#getServer returns null if the player isn't connected to a server yet (e.g. on join to the proxy) ;)

lean gobletBOT
#

🌮

tawdry narwhal
#

What kind of taco-irc conspiracy is going on here 👀

stone fiber
#

moved all the bridged channels to esper

#

just double checking with the best food ever

tawdry narwhal
#

oic

#

Any reason for that?

stone fiber
#

spigot irc has registration limits, and generally being on spigot's irc network may hurt us in the future

#

rest of MC is on esper

tawdry narwhal
#

plus mbax is here panda_heart2

stone fiber
#

I mean what

tawdry narwhal
#

;p

lean gobletBOT
#

a

#

b

wide maple
bleak current
#

Hey, so I am hosting a Minecraft Network Server. I was wondering that is there anyway a player can see the IPs of my backend servers with some kind of networking tool or something?

low zenith
#

as long as the ports for your backend servers are closed, nobody can see the IPs of them

obsidian kite
#

This just literally answered a question I had lol.

forest pike
#

it's an enumeration of some of the keys that can be used in a translatable chat component

#

they will be translated to the corresponding key the player has configured in keybinds

#

like E for INVENTORY

#

myes

signal mica
#

Is it possible to disable BungeeCords default modules like find or glist so I can implement custom versions of it using the same command.
Registering a find command overrides BungeeCords find command, but my glist command gets overwritten by BungeeCords version.

trail plume
#

use, modules.yml or whatever it was, just remove everything in there

lean gobletBOT
#

you can also just register the commands a millisecond after your plugin loaded

signal mica
#

Ah nice. Many thanks 🙂

lean gobletBOT
#

that fully depends on whatever plugin you use

dark perch
#

Does bungee/waterfall overwrite PlayerInfo packet?

rough trout
#

Is bungeecord-side PreLoginEvent async?

trail plume
#

no

#

But, it uses the intents/callback system, so you can always hop off the network thread

rough trout
#

Oh, good lead -> what is the intent system

trail plume
#

You, erm, register an intent and release it once you're done

#

that's covered in the bungee dev docs iirc

potent lichen
#

event.registerIntent, event.completeIntent

rough trout
#

oh so you can move it to a separate thread

#

perfect

wide maple
bleak current
#

Forking "Travertine" and when building i run into an error any clue why?

[ERROR]
[ERROR]   The project io.github.waterfallmc:waterfall-parent:1.16-R0.4-SNAPSHOT (G:\devs\Some CheatBreaker Bungee\Travertine\Travertine-Proxy\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for io.github.waterfallmc:waterfall-parent:1.16-R0.4-SNAPSHOT: Could not find artifact io.github.waterfallmc:waterfall-super:pom:dev-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
#
Bungee/Travertine/Waterfall-Proxy-Patches/*.patch' for reading: No such file or directory
  Something did not apply cleanly to Travertine-Proxy.
  Please review above details and finish the apply then
  save the changes with rebuildPatches.sh
/g/devs/Some CheatBreaker Bungee/Travertine/Travertine-Proxy /g/devs/Some CheatBreaker Bungee/Travertine
wide maple
#

@bleak current the waterfall sub-module isn’t present or invalid. Re-clone your repository with the recursive parameter git clone --recursive REPO or git submodules init

bleak current
#

oh ok

#

let me test.

#

It didnt work, all files are here.

#
./scripts/applyPatches.sh: line 31: cd: $'/g/devs\n.\nBungee/Travertine/Travertine-Proxy': No such file or directory
Resetting Travertine-Proxy to Waterfall-Proxy...
Your branch is up to date with 'origin/master'.
fatal: ambiguous argument 'upstream/upstream': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
  Applying patches to Travertine-Proxy...
fatal: could not open '/g/devs
.
Bungee/Travertine/Waterfall-Proxy-Patches/*.patch' for reading: No such file or directory
  Something did not apply cleanly to Travertine-Proxy.
  Please review above details and finish the apply then
  save the changes with rebuildPatches.sh
/g/devs/Some CheatBreaker Bungee/Travertine/Travertine-Proxy /g/devs/Some CheatBreaker Bungee/Travertine
#
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'parent.relativePath' of POM io.github.waterfallmc:waterfall-parent:1.16-R0.4-SNAPSHOT (G:\devs\Some CheatBreaker Bungee\Travertine\Travertine-Proxy\pom.xml) points at io.github.waterfallmc:travertine-super instead of io.github.waterfallmc:waterfall-super, please verify your project structure @ line 6, column 13
[FATAL] Non-resolvable parent POM for io.github.waterfallmc:waterfall-parent:1.16-R0.4-SNAPSHOT: Could not find artifact io.github.waterfallmc:waterfall-super:pom:dev-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project io.github.waterfallmc:waterfall-parent:1.16-R0.4-SNAPSHOT (G:\devs\Some CheatBreaker Bungee\Travertine\Travertine-Proxy\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for io.github.waterfallmc:waterfall-parent:1.16-R0.4-SNAPSHOT: Could not find artifact io.github.waterfallmc:waterfall-super:pom:dev-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 6, column 13 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
#

try building it in a directory tree which does not contain spaces

#

waterfall and travertine scripts are quite crap and lack double quotes in many places, leading to vague errors like those

#

ah

#

fair enough

rigid bridge
#

this is a really small thing but if I opened an issue would the dev team consider making the build server for waterfall lowercase instead of capital so that it's consistent with paper? i.e. waterfall.jar and papermc.io/ci/job/waterfall instead of Waterfall.jar and papermc.io/ci/job/Waterfall

stone fiber
#

no

#

the build server is going away

#

automated access to downloads is expected to be done through the downloads api, see #announcements

bleak current
#

hey
how can i access to javadoc of Waterfall 1.16-R0.1-SNAPSHOT ?

lean gobletBOT
#

.g waterfall javadocs

#

(phoenix616) https://papermc.io/javadocs/waterfall/ -- Overview (Waterfall-Super dev-SNAPSHOT API): "Packages. Package, Description. io.github.waterfallmc.waterfall · io.github.waterfallmc.waterfall.event · io.github.waterfallmc.waterfall.exception."

#

btw. why are you depending on both, paper and waterfall at the same time? using different modules would be the cleaner solution

bleak current
#

i depend of paper and waterfall because i work with a lib who need to be compatible with paper and Waterfall servers

wide maple
#

^ that doesn’t conflict with that

astral oasis
shell lagoon
#

What exactly are you confused on? Isn't the pom.xml being opened, doesn't it have </project> in it, etc.?

astral oasis
#

like pasting it

tawdry narwhal
#

Pasting what?

#

If you don't use something like mcdev, you'll need to fill out the pom yourself

astral oasis
#

well im using eclipse

shell lagoon
#

Looking at the tutorial seems like Eclipse generates a dependencies part for you. So assuming that's still the case, remove everything in <dependencies> to </dependencies> and replace it by the code in the tutorial.

tawdry narwhal
astral oasis
wide maple
#

Might I suggest you use IntelliJ Idea if you’re not dead-set on using eclipse, it will save you a lot of pain. There are also plugins to IntelliJ that make it very easy to set up projects for most minecraft plugin or mod loaders

#

Eclipse isn’t easy to handle, especially not with build systems. Sometimes that makes it perfect, but that’s more often than not NOT the case

astral oasis
#

rip i coded 3 plugins on eclipse

#

so can i move something or transferable

tawdry narwhal
#

Yeah, IJ is fairly capable to pick up any other projects.

astral oasis
#

ok

dense mist
#

^keep in mind IJ is paid, but you can get a free student licence quite easily @astral oasis

lean gobletBOT
#

community edition is free ;)

astral oasis
#

i know

bleak current
#

don't even need to use UE, doesn't give anything extra for minecraft-related stuff

bleak current
trail plume
#

something apparently mangled the player list

thorny holly
#

trying to do stuff on ServerSwitch, ServerConnect events

trail plume
#

private

thorny holly
#

i just looked at it

#

you know bukkit doesn't have an issue with that

#

:|

trail plume
#

Yea, bukkit doesn't care, pretty sure bungee does

thorny holly
#

it do be like that sometimes

bleak current
trail plume
#

Don't ping

#

I have no idea what caused that on your setup

buoyant parrot
#

should I use h2 or sqlite for a small plugin?

#

Also, how should I implement it (I'm using maven).

#

I'm not familiar with sql at all

tall canyon
#

h2

lean gobletBOT
#

depends on whether or not you want to read it with other languages

buoyant parrot
#

java only

rigid bridge
#

I'm interested in making a fork of waterfall (continuing Billy's avalanche patches, not adding anything else), but I can't for the life of me figure out how to update Waterfall upstream. Any chance there's some documentation on how forks of MC software works that I could look at to learn how to maintain Waterfall upstream?

trail plume
#

fork travertine

#

use the scripts in there, upstream is basically, ./trav p, ./trav up, ./trav rb (once it patches)

rigid bridge
#

ooh alright tysm :)

astral oasis
#

bruh when i pasted some thing into pom.xml it shows error
Description Resource Path Location Type
Test cannot be resolved to a type AppTest.java /elixions/src/test/java/com/mattrolol/elixions line 15 Java Problem
The import org.junit cannot be resolved AppTest.java /elixions/src/test/java/com/mattrolol/elixions line 3 Java Problem
The import org.junit cannot be resolved AppTest.java /elixions/src/test/java/com/mattrolol/elixions line 5 Java Problem
The method assertTrue(boolean) is undefined for the type AppTest AppTest.java /elixions/src/test/java/com/mattrolol/elixions line 18 Java Problem

potent lichen
#

probably messed up your pom and removed the junit dependency

astral oasis
#

is there the way to fix it?\

potent lichen
#

undo whatever you pasted into your pom and see why pasting that segment breaks your dependencies

#

check xml syntax, etc.

outer cosmos
#

Looks like JUnit isn't defined as a test dependency.

brazen anvil
#

Hello,
I currently make an server network and i want know how i can sync the data on cross the network.

Initially i have naively store all Account player on Redis, on bungee AND on minecraft server but this is cost too many RAM and make desync.
I have also try only store on Redis and access directly (no local cache) but this is make some latency.
So i currently change my system, but i want know if an better way exist.

My current reflection of my system:

  • When player login to bungee : i pull account from Mongo, save it on Redis and only store necessary data on bungee player (like locale and group)
  • When player login to minecraft server : i pull account from Redis and only store the necessary data (like on bungee)
  • When player update data (like locale from bungee SettingsChangedEvent) : I publish the change with the old and new data with Redis PUB/SUB, and listen it on spigot for change it on the player
  • When player leave minecraft server : Save the server data (like game stats) on Redis account
  • When player leave bungee : Save the account from Redis to Mongo and set TTL to something like 1 hour

My infrastructure: I run the minecraft servers, bungee, Mongo and Redis on Kubernetes cluster.

So, my question is: My reflection is good or i can make an more optimized/clean way ?
Thanks by advance for your help.

trail plume
#

There is no magical solution, all you can do is mix and match as needed; stuff that needs uber fast access must be in ram, stuff that needs uver fast access that must be kept in sync should generally be pushed back to the central store fast, anything that doesn't need to be fast but must be kept in sync, keep it in the db and just update as needed

#

if you ever find a way to store data across instances with 0 latency and is safe, don't tell us, you'll make a mint licensing it out

brazen anvil
#

i have also ask this message on spigot discord, and the current "solution" is :
Store only pertinent data in Redis like game id, server id, locale balance and direct access to it (not store in server memory).
Store the locale (is used when i generate message) in player instance.
For game: store in server memory (from mongo at login) the stats like kills, death, ratio and save it in mongo when leave the game

Sync the data between redis and mongo on logout

bleak current
#

What exactly is a "messaging-channel" is it basically the same to a port to socket?

#

Does essentially direct a specific-set* of traffic

#

sort of like certain lanes on the highway

#

Bungee Data -> Spigot Receiver
Spigot Date -> Bungee Receiver

wide maple
#

a messaging channel is a registered channel under an active netty minecraft-protocol connection

bleak current
#

is there main purpose to transfer strings through different connections?\

paper maple
#

How to get player's mod list if they use Fabric?

wide maple
#

@bleak current yes

#

@paper maple listen to the fabric register plugin channel messages

paper maple
#

which channel should i listen?

wide maple
paper maple
#

Thank you. I will check.

bleak current
#

Guys, can anyone tell me how programmatically I can force my plugin to start before everyone else?

#

I use the Proxy, Velocity

stone fiber
#

if this is for a proxy plugin, and you use velocity as your proxy, shouldnt you be asking in the velocity discord?

twilit pewter
stone fiber
#

^ they're nice people over there, theyll help you out

civic valve
#

proxi is my proxy

wide maple
proud kayak
#

Hello,
is there a way to change the waterfall messages?
In Bungeecord there is a "messages.properties", which can be edited by extracting the .jar file.
But i dont won't to do that for every new version, so I simply wanna replace the messages with customs one in my code.

Thanks in advance! 🙂

trail plume
#

within the bounds of the API? no

#

But, you don't gotta do that for each version

#

That file rarely ever changes, and any missing strings will be read from the one in the jar last I recall

#

So, just grab it, throw it in the proxy folder

proud kayak
trail plume
#

No, you don't

proud kayak
#

I have to Extract the file from the .jar file, and after editing it I will have to put it back into the jar, or am I wrong here?
So everytime I download the up-to-date .jar I would have to do that thonk

trail plume
#

No, grab the file, edit it, save it in the same folder as you run waterfall in

proud kayak
#

Oh wow I didn't think of that. Thank you I will do it!

queen cave
#

how does one list/find all servers under waterfall/bungee?

queen cave
#
Request.send(plugin, sender, "GetServers");

public static void send(Plugin plugin, Player player, String type) {
    ByteArrayDataOutput out = ByteStreams.newDataOutput();
    out.writeUTF(type);
    player.sendPluginMessage(plugin, plugin.getName().toLowerCase()+":default", out.toByteArray());
}

so i'm trying to send a message to the bungee proxy to get all servers as a response, however the onPluginMessageReceived is never triggered

#
this.getServer().getMessenger().registerOutgoingPluginChannel(this, this.getName().toLowerCase()+":default");
this.getServer().getMessenger().registerIncomingPluginChannel(this, this.getName().toLowerCase()+":default", new BasicPluginMessageListener(this));

both are registered too

#

i'm not sure if i should see this happen on the bungee console

#

cuz nothing is appearing there

trail plume
#

is it registered on the proxy too?

#

I just recall plugin messages being dumb because of the enforcement over places

queen cave
#

hmm no i didnt add anything to bungee, i thought i wouldnt have to since its default messages

trail plume
#

Plugin messages and the way the API works iirc was kinda dumb

queen cave
#

is there an alternative to plugin messages then?

trail plume
#

use a messaging service?

queen cave
#

such as?

twilit pewter
trail plume
#

Ah, yea, you should just be able to register it on the proxy

queen cave
#

sounds overkill

trail plume
#

and then it should register it to the server

#

Well, messaging service would generally be along the lines of a proper messaging broker, rabbit, redis, etc

queen cave
#

i just need to get a list of online servers, and get essentials warps from all servers, i really dont want to start messing with reddis and shit for that

trail plume
#

Many hosts these days don't really give you the ability to have an extra server instance

#

Well, extra port

queen cave
#

can something just work for once

trail plume
#

register it on the proxy

#

should work

queen cave
trail plume
#

yes

queen cave
#

is there a way to list plugins on bungee?

#

welp, its in the logs but still not working

trail plume
#

built in command? no

lean gobletBOT
#

I just added my own /bplugins command to my core plugin ¯_(ツ)_/¯

queen cave
#

so should the proxy show plugin messages sent to it?

lean gobletBOT
#

no

queen cave
#

sigh

trail plume
#

Why would it show them?

#

Would be spammy af if it did

#

make your plugin listener log them

queen cave
#

yeah well now i have no clue why its not working, cuz its sending and not receiving

#

yeah thats the thing

#

its not getting them

trail plume
#

if it's not recieving then it's likely not registered somewhere or you're sending it the wrong place or something

queen cave
#
this.getServer().getMessenger().registerOutgoingPluginChannel(this, CHANNEL_NAME);
this.getServer().getMessenger().registerIncomingPluginChannel(this, CHANNEL_NAME, new BasicPluginMessageListener(this));

In onEnable

wide maple
#

careful there

queen cave
#

my BasicPluginMessageListener implements PluginMessageListener and implements the onPluginMessageReceived method, so that should be fine

wide maple
#

since youre registering both ways you need to make sure the sender is instance of server

#

and not player

lean gobletBOT
#

I mean, not registering both way means that your channel is exploitable if you are listening on the same name on the Paper side...

trail plume
#

Well, you just need to make the plugin discard any plugin messages from the client

wide maple
#

^

trail plume
#

(and make it not send the message to clients either)

queen cave
#

that really doesnt matter if i cant make it work in the first place

wide maple
#

do try it with a normal event handler

queen cave
#

on bungee i have this: this.getProxy().registerChannel(CHANNEL_NAME);

trail plume
#

did you fix the thing we said in #waterfall-help as I somehow ended in there

#

the sending of the thing

queen cave
#

oh yeah

#

player.sendPluginMessage(plugin, BungeeWideWarps.CHANNEL_NAME, out.toByteArray());

#

should this not be player then?

trail plume
#

No

lean gobletBOT
#

you need to send it to the server

queen cave
#

right

trail plume
#

You mean for player., that's fine

lean gobletBOT
#

if you send it to the player it gets sent to the client

trail plume
#

you hijack the players connection

#

You need to make your proxy listener

  1. ignore packets from the client
  2. cancel the packet from being sent to the client from the server
queen cave
#

uhu, but i'm not getting the packet there yet.
so
plugin.getServer().sendPluginMessage(plugin, BungeeWideWarps.CHANNEL_NAME, out.toByteArray());
then?

trail plume
#

does the exact same thing as before

queen cave
#

reee

trail plume
#

all packets are sent from the servers by a players connection

queen cave
#

then i have no clue why i'm not receiving anything in the eventlistener

lean gobletBOT
#

did you register the event?

queen cave
#

isnt that what this.getServer().getMessenger().registerIncomingPluginChannel(this, CHANNEL_NAME, new BasicPluginMessageListener(this)); does?

trail plume
#

no

queen cave
#

bruh

trail plume
#

wait, wut

#

That's on the server.

#

You're not wanting the server to recieve the message right now

#

You're wanting the proxy to recieve the message

queen cave
#

thats on the client

#

on the bungee i just register the channel

#

nothing more

lean gobletBOT
#

wat wat

trail plume
#

You're sending a message from the server

#

Where do you think a message sent from the server, is going to go?

queen cave
#

to the proxy, and i assumed it would send back the response to the server?

lean gobletBOT
#

you need to register a listener for the PluginMessageEvent on the proxy

queen cave
#

i see

trail plume
#

No, the proxy does nothing with plugin messages bar passing them through by default

lean gobletBOT
#

not sure how you think the server proxy would know how to respond to your custom plugin message?

queen cave
#

cuz its a built in message?
My thought process was:
Plugin sends message to proxy on channel x requesting "GetServers"
Proxy replies to plugin with the serverlist
plugin handles it

trail plume
#

No, no, no

#
  1. if you want to use bungees own messaging stuff, e.g. GetServer, you use bungees own messaging channel
#

You can't just create your own channel and expect the proxy to hijack it

#

That would be dumb

lean gobletBOT
#

oh

queen cave
#

hm right

#

i just thought they used "BungeeCord" as example channel name

lean gobletBOT
#

no

trail plume
#

it's called the bungeecord messaging channel for a reason

queen cave
#

ok, so change the channel name, register the event on the proxy for other channels?

lean gobletBOT
#

yes

queen cave
#

gotcha

#

also, should i cache such requests or are they fast and inexpensive enough to not worry?

trail plume
#

They're sorta like broadcasts

lean gobletBOT
#

I mean, with standard Bungee you can't even add or remove servers on runtime ¯_(ツ)_/¯

trail plume
#

You send a packet, you get one at some point

queen cave
#

fair

queen cave
#

am confusion:
org.bukkit.plugin.messaging.ChannelNotRegisteredException: Attempted to send a plugin message through the unregistered channel 'bungeecord:warps'.

#
public static String CHANNEL_NAME = "bungeecord:warps";
//onEnable
this.getProxy().registerChannel(CHANNEL_NAME);
#

plugin is enabled on the proxy too

#

oh nvm forgot to register them on the client

#

bungee is weird

queen cave
#

How do you send a plugin message to a specific server?

#

also i take it you cant get data from a server that doesnt have players?

grim haven
#

HEY, i tried to fork (use the code and modify it) waterfall but waterfall is reseting somehow the code in the file:

C:\Users<user>\Documents\GitHub\Waterfall\Waterfall-Proxy\proxy\src\main\java\net\md_5\bungee\command\CommandBungee.jar

Does anyone knows how ti fix the reset of this file???

potent lichen
#

git reset --hard HEAD

#

will reset all the changes since the last commit

#

you have been warned

grim haven
#

@potent lichen ???

#

i dont want to reset the files

potent lichen
#

Does anyone knows how ti fix the reset of this file???

#

please articulate what you want to do, if not that

grim haven
#

i want to change a specific file and recompile it WITHOUT a reset

#

but if i change the file somehow it gets a reset

potent lichen
#

probably some issue with whatever editor or environment you are using

grim haven
#

i was changing the code with notepad and tried to compile it with git bash (./waterfall b) but ehh... ye it just reseted

wide maple
#

@ zzzCat, the disable entity meta rewrite patch is alright and works

#

the == conditions will only ever apply if its an integer instance. The tags in 1.16 will never be the same object so it can never reach the integer cast inside

#

I did confirm that when I did the 1.16 update for waterfall and I now remember

queen cave
#

does the BungeeCord channel also only work when a player is on the server?

#

if thats the case, how does one obtain the id of a connected server?

#

i'll do it myself then

civic valve
#

plugin channels use the player's network connection to transfer packets

#

so yes they require a player

queen cave
#

oh ffs

#

how do i obtain the id of a server then?

civic valve
#

id?

queen cave
#

like the name

#

"lobby" "pvp"

civic valve
#

from where

#

the proxy?

queen cave
#

the proxy

civic valve
#

api lol

queen cave
#

anything more specific?

civic valve
#

what are you trying to do i guess i should ask

#

why do you need the name

#

and when

queen cave
#

ik you can do out.writeUTF("GetServer"); but that requires a player to be online

#

on startup of the mc server

#

but i cant do that since there are no players online then

#

if i can obtain it from the proxy myself i can send it over my own connection

civic valve
#

oh you need the name of the server on the bukkit side?

#

not the proxy side?

queen cave
#

yeah basically

#

i need to send it from the proxy to the client anyway tho

civic valve
#

ah okay then ur out of luck

#

you'll need to either make ur own socket, use something like redis, or read from the bungee config file lul

queen cave
#

i have my own socket

#

i just need a way to obtain the name associated with the connection ig

civic valve
#

well bukkit knows nothing about the proxy until a player connects

#

so no

queen cave
#

fair enough

#

guess i'll handle it on player join instead of startup

queen cave
#

is there some way to know when the proxy is back online?
i'm using my own socket but if the proxy goes down so does the connection and i have no way of reinstating it other than restarting

#

i could trigger a timed connection attempt if the connection is lost, but its not ideal

civic valve
#

like i said yesterday, spigot servers have no information about the proxy

queen cave
#

worth a shot

#

dum dum servers

zinc rose
#

Anyone know of any Bungee/Waterfall Prometheus exporters? (not sure if this is the right channel to ask this)

queen cave
#

So why does teleporting to other servers work without other players online? I mean obviously it has to for anyone to ever connect. But how is it different from the other plugin messages

trail plume
#

Because TCP requires a connection to be established to send data

#

the server does not have a means of opening a rando channel just for plugin messages

queen cave
#

Fair enough

#

So the server switching just does the handshake again.

#

Yeah that makes sense now you say it lol

rough trout
#

What's up with velocity : how does it compare to waterfall

weary grove
#

Waterfall is only around to satisfy the needs of legacy setups, if you are starting a server today you should use Velocity.

rough trout
#

Ahh, i see. I've never used the API, how does it differ from that of the bungeecord api?

weary grove
#

It's different but it's much better

rough trout
#

sounds... interesting

wide maple
#

@brittle panther yo. I looked at the source right now and I can’t think of a valid reason this should happen. I can’t think of anything that can invoke it either, would you mind assisting me in reproducing it? It might very well be something with the changes I made

#

I might also add, the version of ViaVersion that is installed on your instance is an old broken dev instance

brittle panther
#

Huh?

#

Oh, by the way, I already tried it with a newer ViaVersion.

#

@wide maple do you mind bringing this to DMs or do you want to stay in here?

brittle panther
brittle panther
wide maple
wide maple
#

@brittle panther did you try that already or no?

brittle panther
#

Are you getting any errors when you try to connect to a 1.17 (20w51a) server on your test network?

wide maple
#

@brittle panther add me as friend. This is gonna be somewhat lengthy

brittle panther
#

done

grizzled thistle
#

Does Waterfall support Java 15?

primal grove
#

i have a waterfallserver runnning on my server, which has java 15, and it works great

wide maple
#

depends on your plugins. Waterfall should be able to run on java 15

#

however your plugins may not be able to. The Via plugins are an example of that

lean gobletBOT
#

Via shouldn't be running on the proxy anyways, and they work fine on paper with java 15

wide maple
#

^

nimble vale
#

what packet is used while proxy plugin is sends a message to the player on bukkit server?

lean gobletBOT
#

you mean a plugin message or..?

nimble vale
#

yes

#

i'm trying to remove this message

wide maple
#

Are you trying to cancel or intercept a chat message that is displayed on the players client or an internal plugin channel server-proxy message?

nimble vale
#

First

#

proxy plugin sends message by message channel and I want to remove it

wide maple
#

Don’t call it channel if it’s a chat message. It’s just a message. People will get confused, the only channel there is in the minecraft protocol is either the register or plugin channel

#

Let me quickly check against the api

#

I checked and it looks like there is no API for interacting messages originating from the proxy or the server

#

Someone correct me if I’m wrong

#

But I don’t think there is an intended way to cancel chat messages from downstream

nimble vale
#

Ok, thanks

fallen crag
#

hey everyone I just want to do 2 bungeecord gateway for ddos protection. How can I connect bungeecord to bungeecord (or maybe tcp forwarding without leaking real ip address) I have 1 powerful non-ddos protection server and weak full ddos protection server and also I'm gonna connect directly that means I need first bungeecord too...

trail plume
#

bungee in bungee is not supported

wide maple
#

Don’t do that. That’s unsupported

trail plume
#

use haproxy

wide maple
#

Yea use something like HAProxy or even TCPShield if you need something against DDoS

fallen crag
#

thank you i will check HaProxy

marble flint
#

I want to use the waterfall-api from the maven papermc repo but I'm unable to use it. Using paper-api or spigot-api works fine but with waterfall-api there is only the message Could not resolve io.github.waterfallmc:waterfall-api:1.16-R0.4-SNAPSHOT.

wide maple
#

I’d advise you to clean your maven cache

bleak current
#

what exactly is the ProxyQueryEvent

#

"This event will be posted whenever a Query request is received."

#

When does this actually get fired

#

nvm it's not useful

frosty kayak
#

How do I go about sending a message to a ProxiedPlayer? I have a "broadcast" plugin that takes entries from config and broadcasts across all servers (sends message to all players)

#
proxiedPlayer.sendMessage(TextComponent.fromLegacyText(""))
#

Does this accept colour codes like &aGreen &bBlue?

#

(please note this is my first attempt at a bungee/waterfall plugin 😄)

potent lichen
#

it accepts § colour codes

#

to convert & codes to § codes, use ChatColor.translateAlternateColorCodes

#

I recommend taking a look at velocity, by the way. It has a much nicer API

#

on velocity you can use full components without being burdened by bungee-chat

#

thanks to adventure support

frosty kayak
#

thanks! so would i do something like this?

#
proxiedPlayer.sendMessage(TextComponent.fromLegacyText(ChatColor.translateAlternateColorCodes('&', messageString)))
#

I have tried velocity before and had trouble getting it working, maybe i'll give it another shot in future

potent lichen
#

that will work, yes

fallen crag
#

i use TCPShield but pings are so high with 40 players, is this normal or are there any settings for ubuntu single connection unlimited data flow or sth like that :/

signal mica
#

Hello, I have a question:
Is it possible to get a players skin texture with a bungeecord plugin? I don't mind extracting the data using reflections if thats required.

trail plume
#

To a degree, yes

#

the packet for the player being added to the list is sent through the proxy, not sure if there is an event for that

#

but, you can get the json passed for that, you'd need to decode the json and grab the texture URL from it, however

signal mica
#

Nice. Can you give me a little tip, where I can look for information on how to read that data, so I can figure out how to do this?

trail plume
#

as I said, I got no idea if there is an event or not

#

easy option would be to register your own tab list rewriter thing, not sure where the API for that is but pretty sure there is one for that

#

But, the proxy doesn't store that info

signal mica
#

I think I can start from there. Many thanks.

signal mica
#

I have another general question. Are there truly asynchronous events?
I want to do some db querying when a player logs in and don't want to black the whole proxy for all other players, so I want to do this asynchronously.
But even my custom async event blocks the proxy for the whole duration its event handlers take.
So if one login takes 1 second, 10 logins will take 10 seconds and not just one.
If I use the scheduler the player connects even before the task has finished, which I don't want.
Is there a better was of doing this?

trail plume
#

the async events are called on the relevant threads, you'd need to jump off the thread yourself, and then finish the intent

potent lichen
#

use the AsyncEvent registerIntent / completeIntent API

#

then you don't have to block the execution of the event, but can resume it asynchronously

signal mica
#

And this will ensure that the player only connects, after the async stuff is finished?

#

So that the player isn't online on the server before the db was queried

trail plume
#

Yes, the logic after the event only runs when you call completeIntent after all the intents are done

lethal kernel
trail plume
#

did you add the paper repo?

lethal kernel
#

whoops, mb

#

ty

lethal kernel
#

can someone give me an PP.sendTitle example? i'm not getting it xd

#

nvm, got it

signal mica
#

I got the async, non blocking event to work, thanks for the help there.
Is this also possible for normal Events like the ServerConnectedEvent?
I want to edit Values in redis in an ServerConnected Eventlistener, but don't want to block other players from connecting to server. But I also don't want the player to connect before the values are set in redis.
Is that possible?

trail plume
#

Nope, you'd need to deal with it in an earlier event, basically

#

bungee does pretty much all the things in the event loop pretty much

queen cave
#

in what cases does "Already connecting to this server" trigger? my plugin message is only sent once, but occasionally it'll trigger that message