#waterfall-dev
1 messages · Page 2 of 1
you dont need to ping me a second after you type that.
I was checking if the Command class is an interface
its not
show your whole code + line numbers + error
Okey and how do i fix it? (I am not very good at coding thats why i have many questions)
I cant help unless you read what I write.
https://pastebin.com/PdswUMfp
'class' or 'interface' expected
What’s the name of your file
The folder its in is a own folder and its called hub and the file is called Hub and its in the folder hub
Now is all errors away
But when i tried to run it and get the java file i got the error Cannot Resolve symbol "Hub"
that’s because you misspelled your class name. It should be “Hub”
if it still shows up then, delete the import and import it again
ProxyServer.getInstance().getPluginManager().registerCommand(this, new hub.Hub(this));
Even if i set it to "Hub" ore "hub" its still not working and if i remove the import and add it again not working
just new hub() unless you renamed the class to “Hub” then capitalize the H
How do you mean?
Are it going to be like this? ProxyServer.getInstance().getPluginManager().registerCommand(this, new hub.hub()(this));
ProxyServer.getInstance().getPluginManager().registerCommand(this, new hub()(this));
Unexpected token
Not a statement
';' expected
')' expected
remove the (this)
https://pastebin.com/2HNRUQ5P
Anyone now why?
My code: https://pastebin.com/ZJq3WX18
well for one you are trying to save null to a file
To get 1.7 working on waterfall we just needa do the protocols right?
In theory yes: in practice it'll be a lot more tedious. You're best off taking the 1.7 travertine patch from travertine and modernizing it
Velocity supports 1.7 out of the box if you don't want to deal with that
Ye doing it
I'll spare you at least some of the work
Take this here
It's also abandoned but it's more recent
https://github.com/FlightByWire/Travertine/
it's 1.19?
Maybe they'll even release updates publicly again if you open an issue. Don't know/don't care
Not sure
Says last updated 2022?
I guess then
Thanks for your help
what should i do now
use a supported client version? seeing as that's not really related to waterfall that's outside of the support we can provide
if you want 1.19.1+ support you will need to get them to update it/update it yourself I guess?
*1.19.3 I mean
As I said open an issue on their project. They may extend their updates again
So Joshua must have seen that message because by some stupid miracle the fork just got updated.
Enjoy I guess
in which occasion is this error thrown? im again working with scoreboard and packets. This time, with the ScoreboardScore packet
Some text is null?

That's all that that says
i tried to see with the debugger but nothing is null, i'll check it again later
Look at the source code
All we can see is that something in the scoreboard packet is null that shouldn't be
can custom channel registered multiple times?
channel registeration code is simple
plugin.getServer().getMessenger().registerIncomingPluginChannel(plugin, BUNGEE_HOOK_CHANNEL_NAME, new BungeeListener());
plugin.getServer().getMessenger().registerOutgoingPluginChannel(plugin, BUNGEE_HOOK_CHANNEL_NAME);
...
private static final String CHANNEL_SUFFIX = "bungee_messenger";
public static final String BUNGEE_HOOK_CHANNEL_NAME = "siglib:" + CHANNEL_SUFFIX;
SigLib.jar is a server custom library that we depend upon.
server A , server B, lobby all have SigLib.jar
so all server will try to register channel .
It works fine when server I stop and restart server A and B together
problem
sending data with custom registered channel happens 2 times or 3 times , not even sure of the pattern
setup
server A , B , lobby all have SigLib in their servers
all register same channel
reproduction
proxy + server A, B , lobby are up
stop server A and restart
data sends 2 or 3 times in server A

Took me a while to understand what you're trying to.
Yes there's no limit to how many times you can reuse the channel.
If you register it in a connection then you can assume it's available.
Do note that a channel is only available as long as you have a player associated with the channel
For anything else you'll have to be more specific
^ the player part:
If you have player 1 connected to server A
Then server A will be able to talk to the proxy
Server B which has no player connected to it will not
The plugin channels piggyback of the player connections: no player, no communication
Also: if you use serverA .sendmessage(...) on bungee
and you have both player 1 and player 2 connected to server A at the same time then the message will be sent twice: once for every player
feel free to send a PR if you want
But there is already a PR
merged
I've even created a new one without looking into already existing before but closed it just after doing that

https://github.com/PaperMC/Waterfall/pull/789/files
Could you merge this?
https://github.com/SpigotMC/BungeeCord/commit/5cdba87b8775e7f3e51bd480bb117d888fbd748a
Since Upstream reduced from 4 Bytes to 3, waterfall patch should be same.
done
Thanks
Is there a sample plugin to start coding form like in paper mc for waterfall?
No, but the Minecraft development plugin for IntelliJ Idea should provide an ample template
I think it's similar to Bukkit/Spigot API
Hey guys, why when i use ServerInfo#ping the first time it works but after that is always timeout
Im using this function to make sure the ping dont go long than 5 seconds:
public static void ping(ServerInfo info, Callback<ServerPing> callback) {
CompletableFuture.runAsync(() -> {
final CompletableFuture<Void> future = new CompletableFuture<>();
info.ping((result, error) -> {
callback.done(result, error);
future.complete(null);
});
try {
future.get(5, TimeUnit.SECONDS);
} catch (final Exception e) {
callback.done(null, e);
}
});
}
But not sure if the ping have some sort of intenral delay, let me know
Even if i dont have that timeout of 5 seconds some time later i get "io.netty.handler.timeout.ReadTimeoutException"
Yeah but why a first ping would work but the others after that dont?
Because if players can still join the server and the first ping works there is something weird
I mean not sure how this could be about wrong address/ports
Could be that other plugins are messing somehow with that but is still weird
and sorry for the ping
If you use CompletableFuture.runAsync like this -- without error handling -- you are potentially swallowing exceptions (a problem whose solution will help you regardless of whether it relates to the particular reason you originally posted in this channel)
Not to mention you're creating a thread pool that will probably not shut down correctly when the proxy does an orderly shutdown
How do I connect a running server to Waterfall? I mean, my server is not in the config, but I want to connect it with a WaterFall (with plugin)
i created this a while ago not sure if it will work and i think i made it for bungeecord? not sure but try something similar to this
public void addServer(String name, String ip, boolean restricted, String motd) {
String[] args = ip.split(":");
int port = Integer.parseInt(args[1]);
ProxyServer.getInstance().getServers().put(name, ProxyServer.getInstance().constructServerInfo(name, new InetSocketAddress(args[0], port), motd, restricted));
}```
Ok thanks 😄
Can i use kyori Adventure Component
importing via Gradle is no problem
but i cant find any use case in sendMessage for example
Or is there any other way to use Hex colors in Waterfall messages?
not without the platform adapter
damn
Cant have things just working ._.
just use velocity
true
whats the difference in term of Development?
the fact that it's not bungeecord
sounds good to me
with other words: pretty much everything beyond the base concepts and that it's for Minecraft
Just looked at the Documentation and i am already kinda scared tbh
Constantly getting :
Invalid ID for plugin dev.velocity.Velocity. IDs must start alphabetically, have alphanumeric characters, and can contain dashes or underscores.
When trying to build
Googled found nothing..
Any idea where i need to change stuff?
@Plugin(
id = "Velocity",
name = "Velocity",
version = BuildConstants.VERSION,
description = "First Plugin",
authors = {"HolyFire"}
)
This?
i havent changed anything in the build.gradle since i am using the Intellih Minecraft Plugin
oh
i forgor
works thanks
Is it possible with the API to delay the join in the server and while player is waiting to join, a message in their client is sent?
Sort of like 2b2t that has a queue, where you don't left the server, but you are like stuck in the joining screen that gets updated with your queue position(this is an example of what I mean)
they do that with a limbo server
you cant stall making a connection to a backend server, and even if you could, the only thing the player would see would be the loading world screen or whatever
well you can stall it, but not for very long
to do things like checks and etc, is it better to use the HandshakeEvent?
Is there a way that Waterfall can catch Direct Messages?
er, direct messages?
if you mean the commands, basically; yes; worse case, replace the commands on the proxy, or see if the chat event fires
Hey! Not sure if this is the right channel but I plan on making my mini game server that runs paper and waterfall multi regional (united states and Europe) without needing to have excess lag from the proxy, is there a way to bypass this lag with waterfall or do I need velocity or something else.
if you manage to bypass that lag, you'll be a billionaire
it is a proxy
a proxy is an intermediary server between the minecraft client and minecraft server
it will always add latency
But don't servers like hypixel have different servers in different regions?
no
Oh
that is the only reason hypixel has been asking for a transfer packet
it is the only sane way of handling multi-region minecraft servers
So if I manage to do this I'll be ahead of hypixel?
it's not possible
you're essentially asking if it's possible to remove the 100ms latency that occurs when crossing the ocean
i don't think that's physically possible yet
either you use a transfer packet which doesn't exist, or you split your network in two and host US & EU servers; doing this has a larger impact on your community than anything else
perhaps one day in a future minecraft version
but realistically, no sane option unfortunately
What if I do an insane way until it comes
it'd be one of the above two options
okay well option 3 is running a modded client, but at that point your possiblities are pretty endless anyways
Alright thanks for all the info
0:52:23 [SEVERE] [CloudInTheCloud] <-> DownstreamBridge <-> [test] - encountered exception
java.lang.IllegalArgumentException: Objective _s28671 already exists in this scoreboard
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:220)
at net.md_5.bungee.api.score.Scoreboard.addObjective(Scoreboard.java:55)
I use this:
https://github.com/MegavexNetwork/scoreboard-library
@remote oxide Velocity has an event for it

Is it possible to customize what this says
basically, you can customise everything after "Waterfall " inside of the waterfall config, thing it's like game_versions or something
how can i create a docker-compose.yml with a waterfall proxy and paper servers?
not a waterfall-dev question
and you're also kinda on your own with that
either create your own docker image or use something like itzg/minecraft-server
there are no official docker images
i'm sorry
thank you^^
does anyone know a good plugin for going between servers? like a one click type thing
Is there a way to check if a Plugin is on the Proxy AND enabled? Right now I'm unable to find any method that would allow me to check this...
Either through configuration like electroniccat said, or through the ProxyPingEvent by altering the text through ProxyPing#getResponse().getVersion().setName(String)
Oof.
Any other way to check if a Plugin would be present (and working) then? Like what would be the best aproach if I soft-depend on one?
just check if it's there
Hey! I was just wondering if there's any way of getting the entire waterfall project as a dependecy, because the "waterfall-api" artifact is not complete for all the things I need to do.
you'd need to publish it to your own maven reposomehow
jitpack may also work
but you still shouldnt really do this, the API exists for a reason
jitpack won't
Well, I am in need of more, that's why I'm asking.
Of course... I'd forgotten I could do that.. Thanks!
is it possible to send a player from one waterfall proxy to another waterfall proxy?
(ping me when u respond pls)
no
k
Redis or somehow modify waterfall function
what does redis have to do with that
I mean
if you mean a whole separate proxy then no, not possible
you can do proxy in proxy to do that
ofc, such a layout is generally dumb and unsupported
minehut in a corner
Hello, does someone know a good plugin that sends you always on a different lobby server when joining?
Mostly #waterfall-help
when doing commandSender.hasPermission(x), if the commandsender is actually the console, will it always return true or always return false (or null)
It will return true. Your question is actually a very good one.
thanks!
How would I go about checking if a player is vanished, on PostLoginEvent ? It would have to somehow check with the initial server somebody logs into, right?
basically. I have join/leave messages turned off on the servers, and I have a join and leave just for when somebody joins and leaves the proxy.
but when people join vanished, I want to not show a login message.
If I have a Connection object and I call Connection#createArrayOf() and receive a SQLFeatureNotSupportedException, is that due to Waterfall using a JDBC driver that doesn't support that call or something else?
That is because the driver providing your Connection implementation does not support this method. That may be a JDBC driver shipped with Waterfall or whatever other JDBC driver you are using. Sometimes, the JDBC driver cannot support the method because the RDMS doesn't provide the underlying feature; other times, it is simply unimplemented.
I'm using HikariCP I haven't explicitly defined any other driver for JDBC
Is getServerInfo returning null for non-existing servers?
https://github.com/SpigotMC/BungeeCord/blob/master/proxy/src/main/java/net/md_5/bungee/BungeeCord.java#L659-L663 bungeecord is, waterfall probably didn't change the logic
You either supplied a JDBC url or a DataSource. Your choice of JDBC url is used to determine which driver to choose. For example, jdbc:mysql is the prefix for a MySQL connection using the Connector-J driver
Sometimes a JDBC url can be used with more than one driver. In this case, which driver is chosen depends on the specifics of the configuration and classloading at play.
is it normal that plugin messages sent, let's say, to my lobby server also arrive on my survival server? I am using this method https://jd.papermc.io/waterfall/1.19/net/md_5/bungee/api/connection/Server.html#sendData(java.lang.String,byte[])
no
that method just grabs the first player from the connected players list for that server and sends a packet over their connection
could it be because the first server has 0 players online?
and it tries to send it to the first server with at least 1 player online?
...or could it be because I am sending it from inside a ServerSwitchEvent and it tries to send it through a player who may have already switched servers
actually I was wrong, the plugin message does not arrive twice, it just arrives at the wrong server
yep, that was the problem... anyways, is there a way to cancel ServerConnectEvent without having to connect the player to another server or disconnecting them?
so there's no way to prevent connections to a server without a cancellation server right?
I mean, they need to be connected to something
if you want further understanding of the behavior, you'd need to look at the source code
ok but isn't the event called before the new connection happens? (as it is cancellable)
afaik yes
but idk what the logic for that event looks like
being frank, i'm highly out of tune with waterfall right now, and a lot of the event logic inside of bungee often rarely makes sense, especially around this stuff
I see... its not even a really cancellable event
it seems to be working now... maybe I should have tried it before - this does prevent me from connecting and does not throw any exception
isn't there a like ServerSwitchEvent that is intended for that type of functionality that you could use? Then you don't have to worry about where they go because you're cancelling the switch, meaning they should just stay where they already are. Be careful tho, as I'm pretty sure that event also fires when they initially connect in addition to whatever event fires only when they initially connect. Cancel a switch event when that situation occurs will actually disconnect them from the proxy. Also it's not ideal to mutate a cancelled event that you haven't uncancelled.
(645a84894b7232301e8fefbc) // @midnight karma (898711083567693834) has been banned by @mint heron (1098722699116810331)
the latter
cafebabe > sentinel
True
perhaps i could connect to a plugin on one of the servers on the network and check
i wonder if anything could go wrong there tho
basically, no; the proxy doesn't care about users and so doesn't store any info about them; the only thing that does is the "last server rejoin" thing
Is there a way to disable the inbuild server command (override it with my server command)?
I mean, you can just register your own command in place of it?
or just disable the module if its your own server
I registered my own, but the default still uses the bungeecord one. I also tried to remove the jar from the modules dir but it gets redownloaded instantly
Do I have to disable them somewhere else?
oh what a shame. Thank you completely missed it
Hey, is there a way to check if the proxy is fully loaded? Also all plugins loaded and so on. Like a ProxyReadyEvent
Is there any kind of event to know when a new ServerInfo was added or one was removed?
Or a bit more precisely, is there a way to know about the known servers connected by a proxy?
No
Hey this is my plugin.yml:
name: BungeeCordPlugin
main: com.kinqdos.bungeecordplugin.Main
version: "1.0"
author: Kinqdos
depends:
- LuckPerms
- BungeeTabListPlus
- WaterfallLib
But unfortunatly the depend und BungeeTabListPlus isnt working. My plugin always loads after btlp. I also tried depend but it makes no difference
Sry im dump. Is loadbefore was what im looking for.
Is the LoginEvent fired one after one like a queue or can 2 players login at the same time?
Its either fired from the netty pipeline or from some thread pool thing, you'd need to look; but, like, multiple
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.github.waterfallmc</groupId>
<artifactId>waterfall-super</artifactId>
<version>dev-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>io.github.waterfallmc</groupId>
<artifactId>waterfall-parent</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Waterfall-Parent</name>
<description>Parent project for all Waterfall modules.</description>
<url>https://github.com/WaterfallMC/Waterfall</url>
<inceptionYear>2015</inceptionYear>
I get some errors:
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project io.github.waterfallmc:waterfall-parent:1.19-R0.1-SNAPSHOT (C:\Users\lebub\Documents\GitHub\FlameCord\FlameCord-Proxy\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for io.github.waterfallmc:waterfall-parent:1.19-R0.1-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
What should I?
Is there a way to speed up how often servers are pinged for the %bungee_[server]% placeholder?
It seems my skyblock pings fast, but survival pings very slow
ask placeholderapi
Hey, when setting my Waterfall's MOTD via ProxyPingEvent#setDescriptionComponent I get this exception.
Does anyone know how to solve?
message.txt by @vale bluff: https://pastes.dev/cJbweavkAC
how did you create that component message?
Interesting, found this PR that has shown a workaround: https://github.com/KyoriPowered/adventure-platform/pull/39
// Working
serverPing.setDescriptionComponent(
new TextComponent(ComponentSerializer.parse( GsonComponentSerializer.gson().serialize(MiniMessage.miniMessage().deserialize( lastPing.getMotd() )) ))
);
// Invalid
serverPing.setDescriptionComponent(
new TextComponent(BungeeComponentSerializer.get()
.serialize( MiniMessage.miniMessage().deserialize( lastPing.getMotd() )) ));
oh with adventure, interesting
Hi, someone with git experience, what does "Failed while enforcing releasability." means? I am trying to update Waterfall.
Sorry, I meant maven.
Working on it
I have no idea what is the hierarchy of dependencies I would really appreciate some help from someone experienced on it
seems latest log4j has an old version of slf4j
and bungee tries to use latest slf4j
similar issue with terminalconsoleappender
is excluding okay?
Done, updating pull request soon
Is Waterfall planned to update upstream soon?
https://github.com/SpigotMC/BungeeCord/commit/68200133b6aa06d9fd257e47c11cfe734ec001bf
sure
Wow bot
bat
PR needs approval: https://github.com/PaperMC/Waterfall/pull/805
TeamCity really hates the master branch today
I'll rebase my PR once the build passes
it's apparently a maven bug
I skimmed over upstream BungeeCord changes, anyone know what the added portalCooldown int is? 
The number of ticks until the player can use the portal again
according to wiki.vg; for the most part, it's irrelevant to the proxy, it's just info the server sends over to the client and so needs to be passed through
Hey I noticed the built-in commands have a specific permission to be able to use them, however, does that mean I need to use a third-party plugin like LuckPerms to actually set those permissions up?
basically, yes
It's the PermissionFunction implementation correct?
there is the perm system in config.yml, but you'd generally be dumb to use that one
idk what you're looking at
This is the waterfall channel
Well, yea, if you want a sane system to manage perms, you want LuckPerms
TY
Should waterfall 1.20 be running on java 17 also?
can
Good enough for me lol
When ip forwarding is enabled, UserConnection#getGamemode() always returns 0. This is probably because rewriting entries also reads and saves that data, but with ip forwarding the uuid already is online, so no rewriting/reading is done at all. Is this considered a won't-fix?
Basically, idk if there exists any desire to change that stuff
idk why hes storing that
idk if there exists any desire to fix it, waterfall is a low priority given my potato pc and 200 other things on my todo list, but, if there was a PR idk if I'd be against pulling it
is there a way to tell when a player times out from the proxy? on the backend servers you can get the kick/quit reason and one of them is for being timed out, but I'm not seeing a way to tell that on waterfall
afaik no, that stuff isn't really tracked
dang alright
is there an easy way to like read the logs to detect when it says they timed out there?
You could add a @Data on netty stuff
Short question - does waterfall have an option for loading defined maven libraries, like in spigot/paper plugins?
Yes, spigot added it to bungee
Can this be improved in some way? https://paste.helpch.at/abemasehac.java
It's meant to get a list of server names from the config, iterate through it to find a server that is online and has players and then use a random player from it for the connection...
I think some caching would help here reducing API calls, but I fear it might have some downsides in the end (i.e. server is removed before cache expires so entry holds now outdated info)
For my own use case where I needed info, I just made the backend servers broadcast updates or whatever
hi guys, since spigot discord is dead all the time, I'm searching for a method that prevents serverconnectevent for firing if connection fails.
example
1.16 client wants to connect to 1.19 server with /server command, for some weird reasons even if the connection fails the event (serverconnectevent) gets called and i need to prevent it since after that the proxy itself will handle it as a kick
ChatEvent. How can i get there the sender uuid?
Any alive repository of bungeecord-protocol on maven?
I need 1.19 at least where "Property class" where introduced
Never mind, reflection
It's possible to see why an event gets cancelled?
depends, for debugging, there might be a plugin for it, idk; otherwise, modify the event class
for stuff in an actual plugin, no
Sorry for late response, actually not, compile waterfaall jar by yourself and extract it
Not a proper solution, i used relflection
it's like 5th time that i ask the same question.
why the hell is not possible to know IF the backend is fully started up
becuase the server doesnt tell the proxy that
you can try to ping it but that won't tell you if it's fully started
only way is with your own plugin to my knowledge
it will always return true even on first seconds
i can't use channels since i need at least 1 player on spigot side
then use something like redis
lol
also too heavy for my server
then another kind of message broker
like?
but why should i use those libraries that are not meant for what i need
i just need to connect a player ONLY if the backend is on
latebind got removed idk for what kind of a reason
then you're out of luck
i even tried boostrap
use your own plugin or stop complaining
and I told you multiple solutions
but there is NO way to know if backend is online
use your own message broker
onEnable() {
sendRedimessage("server1 online")
}
onRedisEvent(Event) {
if (event.getMessage().equals("server1 online") server1 = true:
- Complains about not getting solutions to question
- Gets solutions
- Complains about solutions
Thing is, you have to define “online”
As soon as the server says “listening on port xyz” is IS online.
If you want to wait till all the plugins are loaded or something, you gotta make something custom that will look for all that shit, and then you need to message the proxy and let it know
late bind was added many dozens of years ago to mitigate a bug
that bug was patched, and so spigot dropped the latebind patch given that with the bug being fixed, it made little sense to maintain that patch given all the bugs that that patch introduced itself
Now, you have 2 options
- restore late bind yourself
- Use one of the many dozen workarounds and solutions which people used for almost a decade, given that latebind sucked, successfully
@trail plume
It would be nice if a getter could be added to the "ChannelWrapper" field in the handlerboss.
I have had some problems and I would like to get the setCompressionThresold without really using reflection.
I can't work on pretty much anything atm
Just by adding a Getter would work
that means going to my desktop where I have stuff setup
loading IJ
waiting 10 minutes while my machine shits the bed
and then doing the change before I can compile it and make sure that it doesn't magically blow up in stupid ways
before I get to rebuild patches, etc, etc
I really meant what was your point of view and if it is worth it in your opinion, to make a pull request
I mean, we rarely deal with internal utility methods unless theres a strong justification for it
I would like to make it compatible with Waterfall, and forks without using reflection
I think it is a really useful utility, which avoids the slow use of reflection on this case.
Basically, I don't know
I mean by this is fixed, but seems ass
Really you have that bad hardware lmao
yup
Like, between my health and such, I've hardly used the thing all too much in the past like, year or so
starting a test server my system load is pegged at like 200, opening IJ, etc, 80
Yeah, IntellIJ takes a lot of ram and CPU
the machine turns 8 years old this year, so, it's put up a google battle, i guess
You didn't think about upgrading?
don't have the funds to
Since it could help you in the future I suppose
I graduated with post viral fatigue into the pandemic, and so didn't have much options work wise given health + everywhere shutting down
I see what a problem, imagine running paperweight on your machine.
finally slowly been getting better, and so I wanna get a proper job this year; but, now I'm waiting for a hospital appointment over my sight issues which is probably part of why I get headaches so frequently
So, pretty much as it stands right now, I can't see properly, and I don't have a computer able to work on much of anything atm
I see, maybe with your experience you could do some Minecraft project slowly that will leave you income I guess in the meantime
I have sight issues atm
like, keratoconus in my left eye, and my right eye isn't doing good, in part probs because I need new glasses, but, idk if theres much point throwing cash at that when imma need another new pair in a month or two anyways
I don't know what to say really, good luck I guess with that
I will also make a couple of pull requests with some logic, if they are accepted that's good.
""sorry""
hm?
if you were sorry you wouldn't have pinged in the first place
You are right, but the context is different. I pinged it because of something I was talking to him before.
simple solution just develop a keepalive system
use a message broker like they suggested and maintain a proxy-side list of online backends
send heartbeat messages every 30s on the backend and subscribe to those on the proxy and append to the list
remove from the list when the keepalive passes
this is how any run of the mill concurrent system works
Hey, I want to ask which event in BungeeCord API is called when player successfully switched server to another ? I see, there is ServerConnectedEvent & ServerSwitchEvent but I don't see difference between them
server connected is when the proxy connects the player to a server, server switch is when the player switches servers...?
it is generally recommended that you do read it
you'd need to bundle adventure yourself, but, yes
as said, you'd need to bundle all that stuff yourself
adventure platform, and the adventure serialisers you want
When is the next update for waterfall scheduled?
Bungeecord has been updated a bunch since last months release of waterfall.
whenever someone does an upstream update, anyone could open a PR for that
I don't have a computer able to run even a small test setup, before the fact that my eyesight is janky, so, probs not for a while
how can I convert Component into BaseComponent?
Im doing proxy whitelist and it only supports basecomponents
Pretty sure adventure has a serialiser for that
wrong channel
who needs help seting up Waterfall ?
Hey! I am trying to set a Scoreboard in the ConnectedServerEvent but I get the error in the attached image.```java
public void sendScoreBoard(ProxiedPlayer proxiedPlayer) {
new ScoreboardObjective("scoreboard", instance.getScoreboard().getString("title"), ScoreboardObjective.HealthDisplay.INTEGER, (byte) 1);
ScoreboardObjective objective = new ScoreboardObjective("scoreboard", instance.getScoreboard().getString("title"), ScoreboardObjective.HealthDisplay.INTEGER, (byte) 0);
proxiedPlayer.unsafe().sendPacket(objective);
List<String> lines = instance.getScoreboard().getStringList("lines");
ScoreboardScore score;
int lineIndex = lines.size();
for (String line : lines) {
score = new ScoreboardScore(new TextBuilder(line).getColorized(), (byte) 0, "scoreboard", lineIndex);
proxiedPlayer.unsafe().sendPacket(score);
lineIndex -= 1;
}
ScoreboardDisplay display = new ScoreboardDisplay((byte) 1, "scoreboard");
proxiedPlayer.unsafe().sendPacket(display);
}```
Something in there should be a json string, Idr which, see the protocol docs
I looked at the code from other people and they did nothing different except the text
I got it now
I needed to transform the TextComponents to JSON
how to make some code run 5 second later?
scheduler
how
how to check if someone joins the proxy but not run the code if it's just going trough the servers and same for disconnect, full server disconnect not just the backends
What is the output of CommandSender::getName when I log it and execute the command as console
"CONSOLE"? "console"? Or is it something very different
funny video
buump
See what events represent the player joining or leaving the proxy?
I think he's trying to say about kick player to "lobby", i've answered on #waterfall-help
Yea, I’m half confused on what they’re asking and so kinda just went back to dying
nope
I tried but didn't find
see the javadocs, too dizzy to look
there should be events for joining/quitting the proxy
I found PlayerDisconnectEvent, but nothing more
and there should be login events
or use the server connect event and see if they're already on a server
well, yea, those events are early on in the connection lifecycle
the best one for having a player is probably going to be the server connected event and seeing if they have a current server or not
I got it working
but now my player leave
@EventHandler
public void onPlayerLeave(PlayerDisconnectEvent event) {
ProxiedPlayer player = event.getPlayer();
Main.getInstance().getProxy().getScheduler().schedule(Main.getInstance(), () -> {
if (!player.isConnected()) {
try {
if (Main.getInstance().isInGroupDB(player.getUniqueId().toString())) {
Main.getInstance().setLogged(player.getUniqueId().toString(), false);
Main.getInstance().removeGroup(player, Main.getInstance().getUserGroup(player.getUniqueId().toString()));
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}, 5, TimeUnit.MINUTES);
}
now even if you come back the server it will "logout"
player.isConnected() doesnt work
@honest coral
A few things:
- You don't have to (but you can, it's not wrong) get the proxy instance from main, there is
ProxyServer.getInstance() - It's recommended to use a more descriptive name than
Main - Giving the listener class the Main instance via constructor or making a
Main plugin = Main.getInstance()variable would be nicer - What are "groupDB", "setLogged" and "removeGroup"?
- You could check if
ProxyServer#getPlayer(uuid) == null - Is there a reason you're
toString()-ing the UUID? - does
removeGroupneed the player instance or would the UUID be enough?
Oh thanks I'm super new to waterfall! I'll try these changes and hopefully they will fix the stuff and make it better
Hi, how do i make it so only when they're fully loaded in then run the command:
@EventHandler
public void onPlayerJoin(PostLoginEvent event) {
ProxiedPlayer player = event.getPlayer();
TaskScheduler scheduler = ProxyServer.getInstance().getScheduler();
scheduler.schedule(this, () -> {
player.sendMessage(ChatMessageType.CHAT, TextComponent.fromLegacyText("Teleporting to lobby..."));
player.connect(getProxy().getServerInfo("lobby"));
}, 1,TimeUnit.SECONDS);
}
Or is there a better way to teleport someone to the lobby when they join?
pretty sure you can override it ever sending them to a server that isnt the lobby in the first place when they join
Oh, how?
I know about the force default server thing but I can’t put that on because I want the player count to show all backend servers
That's ping pass through
Otherwise, use a reconnection handler or whatever the API called it
Just to get this straight. The channel in PluginMessageEvent is called "tag"? Right?
apparently so
HI, for an inventory sync system. Is a good aproach?
On server join -> get the inventory in the db in base64 and apply.. On the server leave store it in a reds cache and get it in new server at on playerjoin ?
dont use base64, save NBT as bindata
No, that's not a good idea
because you join the new server before you leave the old one
idk where the line sits exactly
its not an easy line
*to determine
back when I wrote my datasync plugin, i just ended up putting a delay
when you join a server it waits for a certain amount of time, and it was usually enough
something like 5 seconds
(heavy modpack)
Is adventure embedded in waterfall?
No
So, how to do?
read what we've said
Well, this is actually a good question: how do I synchronize player inventories across multiple servers in a reliable and fault-proof fashion? Adding a simple delay for loading the inventory may be a solution that works most of the time. But surely I can imagine extreme situations which break such an approach. Increasing the delay might help, but that reduces quality of gameplay.
er
bahahahahahahaaaa
Basically, you'd need to be able to tell the server "i'm about to do a transfer, put the player into a limbo state"
and then basically save their inv, etc; tell the proxy you're done
and then do the actual transfer
until then, literally all you've got is some form of messaging maybe, and praying
It definitely requires proxy coordination. I suppose limbo servers could be useful for more than cracked networks.
well, limbo servers would be one hack around
the issue is the expectation that if the connection to the new server fails, you're already in a server
Do it when the player leave or when he join ?
The new server
First create a database with the inventory contents and a boolean value. Lets call it inSync
On disconnect save the players stuff in the db and after this (extrem important) set inSync to false to tell other servers that the data was saved so the other server can safely load it back.
On join make some kind of task thats wait with loading until isSync is false. If its false, set inSync to true and after this load your data.
This will prevent other servers from loading your data until the other server where you came from has fully saved your data.
You can also do the same with some kind of distributed locking. Like hazelcast (https://hazelcast.com/blog/long-live-distributed-locks/) or else
and how do you propse to handle a player joining the proxy for the first time? its not possible to implement with this system unless you write some logic on the proxy
It has nothing to do with the proxy. The sync-plugins are installed on the paper servers and not on the proxy. The proxy has nothing to do with inventorys.
And handling new players is trivival
Read from bottom to the top because i have no arrows pointing down on my mobile.
Load the data
^
Set inSync to true
^
If not insert with default values
^
Check if player exists in DB
^
Player Joins
🥺
ive got some code that listens to the ServerSwitchEvent event and sends a plugin message to the server that the player joined and left. it works when there is another player in the server that is left but not when there is no one else in that server. when they leave a server with no other players in it then the plugin message is sent twice to the server they are joining somehow
player.getServer().sendData("BungeeCord", b.toByteArray()); // send to joined server
event.getFrom().sendData("BungeeCord", b.toByteArray()); // send to left server
ended up just checking how many players were in the server being left to see if there was anyone in it
plugin messages are sent over a players connection between the proxy and the backend server. no players = no connection to send the message over
Can you do a blocking operation in the server connect event or would that block the whole waterfall thread?
can't say without looking at code and such, but, generally, most bungee events block the network pipeline
Ye sigh already thought so
I thought they all executed on the thread of the connection? 
that'd be horrible if it did
it happens on whatever thread somebody calls connect on
Hey, I have a question about plugin messaging, when you want to send plugin message on paper, the second param is channel, on bungeecord I registered channel "staffprotect:channel", does this mean in spigot in second param I have to specify "staffprotect:channel" or "BungeeCord"?
you'd use your own channel
so staffprotect channel
okay
thanks
wait, if I have on bungee and on spigot listeners for plugin message, shouldn't I do, staffprotect:bungee and staffprotect:spigot? Because server from this was sent, could receive this also
A question, why field self in Configuration (package .net.md_5.bungee.config) is not exposed?
as there is no getKeys(true) - for getting deeper
I mean, not our API
and they're youre channels, you can use the same name on either side or distinguish them
what
what?
I did not understand second line
but nvm, I used snakeyaml, I have issues with writing comments there although
was for your plugin message thing
oh
Hey, could someone help me with this issue https://www.spigotmc.org/threads/saving-configs.618236/ and I use waterfall API
Well there is an example in the readme
You also have all the source you could take a look at
Is it possible without using a message channel to send a command from waterfall to a specific paper server? new with waterfall / bungee.
you need some way to tell the server to run a command
be that plugin messages or redis or a raw socket
or anything else really
so apparently sending a plugin message in the ServerSwitchEvent breaks now on 1.20.2 :S
great
seems to cause random errors due to the client still being in the configuration phase 
wait, can you not get the protocol/version of a player? 
ah, via Player#getPendingConnection#getVersion, right
opened a Bungee issue if anyone is interested in this: https://github.com/SpigotMC/BungeeCord/issues/3519
Who the hell coded the new api? Everything is broken
why this is happening when 1.20.2 player's getting kicked?
Hello
is there an undeprecated way of changing waterfall servers at runtime?
think that there is an add/remove server methods?
No
:/
fixes this
heads spinning, currently cannot
Aren't there any volunteers that could help with maintaining Waterfall as well?
It doesn't seem fair that someone with health issues is having to do so much
Nobody on the team wants to deal with it
Hence why we declared it was going to be considered end of life at some point soon like a year or two ago
Ah, well it seems like there is still demand for it. I hope someone would still step up to the task
at the end of the day, the cost benefits of waterfall makes 0 sense for me these days, and theres little inclination for us to onboard somebody for the sole sake of playing maintanance of a piece of software which just isn't worth the headache these days when the effort can be placed elsewhere for much better pay off
I'm generally done with waterfall and the ecosystem surrounding it
any sizable effort into the project generally ends up going to waste or just incurs an excess amount of effort to deal with the rot of the software, i.e. the months of back and forth trying to remove aspects like entity metadata rewriting to improve mod support given how md didn't wanna get rid of it, only for him to effectively neuter the system after he finally clicked on that maintaining that mess was not worth the headache; lack of effort from plugin devs to work with me over improving stuff to try to clean up the rot, etc, etc; it's just not worth the time, stress, effort, etc
I would have thought maintaining Waterfall would still have required less effort than reinventing the wheel with Velocity
Well, no
I mean, if you wanna bastardise maintaining to the level of "leaving it to effectively rot in the corner", sure, maintaining waterfall is trivial
actually fixing the years worth of issues in the thing is an entire different story, especially with the lack of backing of the project
are there some problems about creating sockets with waterfall?
because i've tried doing it with spigot and it runs fine the socket gets created i can read and write no problems, instead with waterfall my connection gets straight up refused
Is there any way I can use bungeecord-proxy or waterfall-proxy as artifactId in my pom.xml because I need to import:
net.md_5.bungee.connection.UpstreamBridge & net.md_5.bungee.netty.PacketHandler
hello, https://github.com/brunyman/MysqlInventoryBridge/tree/master
how does this plugin actually work to avoid desynchronization problems (especially since the quit event is called after the join event)?
(ping me pls)
not really related to this channel but properly by checking if the data is fresh
yeah, they use a sync_complete column
How it work concretly?
I mean, we're not going to rip it apart for you
but they likely just wait until that boolean is set to true before allowing the connection to progress or something
[22:13:54 WARN] [Geyser-BungeeCord]: Downstream packet error! Invalid packet id: 104
i need help with that error
The geyser is configured correctly but it gives me that error and I use waterfall 1.20 since the geyser plugin folder is not generated in bungeecord
Will boolean from callback return false if timeout exceeded or only when exception caught?
It should
I'm trying to make a Waterfall plugin with an authentication system. I have a working one using Paper, not Waterfall, but I was wondering how I could do something similar to: java @EventHandler public void onMove(PlayerMoveEvent event) { if (Authentication.codes.containsKey(event.getPlayer().getUniqueId())) { event.setCancelled(true); } }
I guess I could make a paper plugin + waterfall plugin communicate with each other, but I would really like to have everything on the waterfall plugin
The proxy doesn't know about anything going on with player movement, etc
You'd need to use a packet listener, and deal with a whole host of potential caveats, etc
Could I get a very, very rough example?
No
damn lol
I know I shouldn't do this, but I've got no idea where to begin. Is this something close (ChatGPT wrote it)? ```java
public class MoveListener {
private final Map<UUID, String> codes = new ConcurrentHashMap<>();
private final Plugin plugin;
public MoveListener(Plugin plugin) {
this.plugin = plugin;
registerPacketListener();
}
public void registerPacketListener() {
ProtocolManager manager = ProtocolLibrary.getProtocolManager();
manager.addPacketListener(new PacketAdapter(plugin, ListenerPriority.NORMAL, PacketType.Play.Client.POSITION) {
@Override
public void onPacketReceiving(PacketEvent event) {
ProxiedPlayer player = plugin.getProxy().getPlayer(event.getPlayer().getUniqueId());
if (player != null && codes.containsKey(player.getUniqueId())) {
event.setCancelled(true);
}
}
});
}
}```
If not, then I'll just use MySQL and have the proxy communicate with all the servers
No
Rip, okay. Communicating it is
- ProtocolLib does not exist for waterfall/bungee, so, that one will obviously not work
- movement occurs on the client, and so you can't simply just cancel the movement packet
- what you're asking to do is an entire rabbit hole of concerns, i.e. you'd need to teleport the player back when they move, and so you're going to have to be able to get enough context to be able to do that
yeahhh, that's not good
is MySQL the best way to communicate to paper plugins?
just have a bunch of queries to see if they're authenticated
pub sub, plugin messages, etc, etc
Hm, could you explain pub sub and plugin messages? Sorry
this is my first time doing proxy plugins haha
See the bukkit wiki for plugin messages
for pub sub, google
oh, the paper docs also have an article going over plugin messaging
Ooo, thank you! I'll take a look.
I figured it out, thank you so much! That's a really cool feature
Is there a way for the proxy to send a message to a plugin?
I can send a message from a plugin to proxy
to a plugin on the server? Server#sendData
Could you explain how I get a Server?
Hello, i am taking questionnement about inventory sync. How i can make perfect inv sync (because join event is called before leave event) so i can do? Use message borker and when the player join a server wait message broker?
the only "perfect" solution would be a lot of a stateful headache
put player in limbo, save their inv, do server switch
ah when the player make a command to server switch/beofre server witch save inventory and after teleport it?
yes
so i have to use a custom server manager for all my server changement request? or i can use a bungee/waterfall event/tool to wait until it's ready for tp?
idk anybody who has implemented the system I've suggested
the way the system works doesn't really permit taking over the control flow too well, so it would only work if you bothered to manage all server transfers yourself and all that
most just end up tryna mangle it by delaying work on the new server, mainly wall time based, and praying that the server has saved it in time
i'have forget how that's work but just the proxy can transfert player betwwen server? (so spigot plugin can't?)
ah with plugin message maybe?
if is that i have to be sure that i manage all request for bungee changement and allow the player to send the plugin message after that i'hve save the inventory ?
ah yes i think to connect plugin send plugin message from the player's client and he send connect to proxy but if a plugin make send pluginmessage i can't knwo (please confirm) so i have to be sure that all plugin message conexion will be managed by my plugin (like this methode:
save inventory: when is good
send plugin message
but there are a risk if player'inventory got changee after inventory save?
Could anyone answer this perhaps?
It's probably very basic, but I've tried a few things and can't figure it out hahaha
you need a player to send plugin message
I think I just need a Server, not sure how to get that though
Perhaps I can do player.getServer()...
or is there a better way to predefine servers?
if you want to get the server somebody is on in order to send a message to them then yea, that is how you'd get it
I asked myself the same question as you some time ago but I don't remember the answer (the difference between server.sendata and player.senddata) but what I'm sure of is that you're obliged to have a co player
That's why you'd try to put them in some form of limbo on the source server, in order to minimise the risk something modifies it
I mean, sending data to the player would send it to the player, and not the server they're connected to
what is limb?
i.e. remove them from the world
I'm trying to do something like player.getServer().sendData()
Basically I need to send a request to the bungee, check if they're authenticated, if so, it sends True or something
ah start chargemnt dispaly?
this could be way too slow though :P
Would it be too slow? I need to cancel an event if they're not authenticated, like a move event or something like that
or you represent that state using a boolean in whcih you message over the network
Yeah, I think that's kinda what I'm thinking
plugin messages are not transactional, etc
I was just gonna listen for "UUID: True" if they're authenticated from the bungee
then a bit of regex
doc are not 'clarity" about that so i'hve askd md_5 about it. server.sendata don' have difference but it choose a random player and if there are no online player the request will be queed (and player.send data will be lost)
i can make a player leave his world?
without modifactions to the server, no
and for your limb I have to stop him from being able to interact with his inventory so what is the best way?
I mean, there is no best way to do this
I don't know anybody who has dealt with this in the more "perfect" of manners
do you know how most plugins work? or the most populate methode?
as I said, they just wait for some period of time on the new server and pray that the data saved in time
ah okay because on player leave i can get inventory but a simple problem with communciation and duplication bug.
I think i have to do it;
but you know if its possible to make a player inventory'iinvulnerable?
No, it's not
hence why I keep saying limbo
but, there is a reason those plugins do the "just wait and pray that the data saved in time"
Some add some locking mechanism to try to reduce the risks, but, given the lack of a proper communication system, stuff gets screwy
Like, theres so many unsolved issues here, that really, glhf
Hmm, what I'm thinking may not be the most effective way of doing it. I'll quickly go through what I'm thinking of doing.
I'm going to hook a Discord bot into the proxy plugin and handle the authentication command, codes, and all that in the proxy plugin. Everytime a user joins/moves, it will check to see if they're authenticated, if they are, it doesn't do anything. If they aren't authenticated, it cancels the event.
To check if they're authenticated, I was going to do a message from the spigot plugin with something like "Check: UUID" and to respond to that, I would do something like "True: UUID" (if authenticated).
I'm aware this would be much easier on just a lobby spigot plugin instead of network-wide, but I would like for the option to allow people to join any server they want, not through the lobby using subdomains. If it's not a feasible option, then I'll probably just revert back to what I had prior to trying to do this.
Keep in mind, authentication is only used by staff, so it's not going to be running for every single player
else using player prelogin event (check database and add date of last modif so if date is greater than x kick the player)
what is the timeout-time for a client before give up login?
you have like 30 seconds from connection to in the world, more or less
with a whole host of dozen caveats, etc
What ? Dozen caevats? What is ?
the client has to login
recieve chunks
respond to the keepalive packet in time or it gets dc'd, etc
So using playerasyncprelogin event i have 20/30 sec to get the new inveotrh on the db ? (I check if the data is refreshed every 5 seconds and ar 25 i kick the player)

Any thoughts on what I should do?
How i have to take it ?
Do you have any idea why getHost() is deprecated? It is from the InetSocketAddress
Hey I am getting this error when I try to join my 1.20.1 server from the latest version of waterfall, any one know the issue? https://paste.learnspigot.com/uhinodosur.lua
(Ping if you reply)
Your plugin "bungeepackfix" seems to be outdated or broke, it's trying to use a method that does not exist
So there is this weird problem, when i cancel a ChatEvent proxy-sided, when the player the cancelled message was from sends another message they get kicked because of an invalid chat signature... any ideas on how to fix this?
Basically, you can't
Switch to Velocity then install SignedVelocity.
If you can't use Velocity, you'll have to adapt SignedVelocity to BungeeCord.
There is already similar stuff
I think its not proper say switch to velocity here. Probably he haves already build a sytem around it
Not aware of any "similar stuff"
There is a spanish discord where it exists
You must use redis i guess
It's a system that is used to store stuff on table hashes
If you don't know, probably you'd like to use some plugin that does this
is it possible to choose the player used to send a plugin message to the backend servers?
Doesn't the API expose the players server connection?
is the locale loaded (via ProxiedPlayer#getLocale) already present in the LoginEvent?
I don't think so
afaik the player settings packet is only sent after the player joined the game
No, LoginEvent is fired long before the client sends that info
in 1.20.2, it's sent before you join the world, before that, it's sent sometime after
it looks like it is loaded in the PostLoginEvent
most likely only works in 1.20.2 if you care about older versions
aren't all events async on bungee/waterfall? or are they synced in a queue?
but SettingsChangedEvent would be the one
Not all are AsyncEvent in a way that enables the intention system. But I believe they are asynchronous in that sense.
ah, right, I always forget about that system
The path to firing events from EventBus is unsychronized, so they could totally fire in parallel, I think.
unfortunately the SettingsChangedEvent on bungee is extremely basic compared to other event APIs
is the first SettingsChangedEvent (on waterfall) called after the AsyncPlayerPreLoginEvent on the paper side?
Yes, once again, far after login
pre 1.20.2, the client sends it just after you get the join game packet
1.20.2 sends it in the configuration phase, idk how md mapped that to existing events, my care for WF/Bungee is at all all time low, so, I never tracked that down
but, it's 100% not going to be tied to the login events
ah i see
Something that I found out: Why Paper's setPlayerProfile doesn't work if you are connected to the server via Waterfall? I'm trying to change a player's skin with it and, while the code works if I connect directly to the server or if I'm using Velocity, it doesn't work if I'm using Waterfall
This also doesn't work in BungeeCord, so this actually isn't a Waterfall issue but an upstream issue, but I was curious about why it doesn't work
(inb4 just use velocity instead of using waterfall lol, maybe this will convience me to migrate to Velocity once and for all)
I mean
try disabling tab list rewriting in the waterfall config if you've not got it disabled already
didn't work 
the proxy also doesn't have any plugins
No idea then
let me try
it's generally down to some oddball desync between the identity somewhere
shits been going on for years
glhf
(first server is Waterfall, second server is Velocity)
tbh, considering that Waterfall is EOL (sort of)
I could migrate to Velocity (if I migrated all of my plugins)
I mean, there comes a level of "somebody would need to look into what is going on"
chances are it's losing something somewhere or something is being rewritten
would need to see what bungee is doing
and, I generally have 0 inclination for that somebody being me

now it makes sense why those skin changer/restorer plugins need to be installed on Bungee/Waterfall level: it is because something somewhere in Bungee causes it to bork so they need to change the skin on the proxy level
because I was wondering about why tf these plugins do all sort of weird crazy stuff when you can just do player.setPlayerProfile
Well, yea, there is a bunch of logic in bungee which has caused issues for years
disabling the tablist & entity metadata rewriting should disable most of that, but, eeeer
if you mean ProxiedPlayer.unsafe().sendPacket(DefinedPacket), it is not working apparently
I think so; I need a method to send a plugin message to one of the backend servers through a player's connection
Yes, so, get the Server from the player and use that
but doesn't that send the message through a random player? I need to choose which player to use to send the message
No
so even if two players are connected to the same server they will have two different Server instances?
yes
that makes sense then
cat so smart
So I wrote a plugin to link up the "portals" of ancient cities in my survival server with previous seasons/versions of my survial so ppl can explore the previous seasons. However sometimes when players travel trough portals (or join the survival from the hub) they get kicked with the following message:
Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet 0/22 (PacketPlayInLook) was larger than I expected, found 16 bytes extra whilst reading packet 22
This only happens when using portals (and npc's for some reason), but not when using /server. Does anyone know what I did wrong?
This is the waterfall part of the plug-in: https://pastebin.com/DNQZarVX
nvm I updated waterfall and it seems to fix the issue, should have tested that beofre posting
my cat is dumb btw
I disagree.. mostly
Why
Any idea what the error below would be caused by?
[18:43:30 INFO]: [/**.**.**.**:62207] <-> InitialHandler has pinged
[18:43:35 INFO]: [/**.**.**.**:62209] <-> InitialHandler has pinged
[18:43:39 INFO]: [.TimoDerKoenig|/**.**.**.**:0] <-> ServerConnector [juesc] has connected
[18:43:39 WARN]: [.TimoDerKoenig|/**.**.**.**:0] <-> ServerConnector [juesc] - could not decode packet! io.netty.handler.codec.DecoderException: java.lang.UnsupportedOperationException: Packet must implement read method
Not entirely sure where to start digging; seeing it mostly happen on waterfall (by what we can tell so far) - any clues on where to start debugging? thanks 🙂
Try on a vanilla enviorment and without plugins
is there a waterfall version that supports 1.8.8?
latest
apparently the plugin messages are not always sent using this method; I started noticing it today but just because I wasn't able to test it out completely
the fact is that I need to send a plugin message just when a player disconnects and so I cannot use their connection to send it because they are no longer online.
so I tried the method you suggested using the Server instance of another player but it still does not always send it (or, better, it sends it but the Bukkit server never receives it)
I mean, that logic has been buggy for years afaik
there is a reason why we generally suggest using anything but plugin messages if you wany reliable messaging
I see, but I would avoid implementing a new messaging method for just a plugin message whose purpose is to send a message to a player (but I cannot do it directly from the proxy)
...isn't there any other method (not covered by API, maybe?) to choose which player to use to send the message? in this way the message should always arrive (I hope, at least)
Yes, you literally get that player and use their server connection
the exact same as in the first place
There is no reliable mechanism for sending messages which isn't "go and actually use a reliable mechanism for sending messages"
message.txt by @random salmon: https://pastes.dev/ylLtizhl4Y
Yes, this a known bug on BungeeCord that if you register more than one scoreboard team fucks up
No promises, but I can investigate to see why, what I did see is that it's a pain in the ass
hum..
Its a bungeecord bug, you cant really swap to servers with duplicated boards as far i know.
Try to make your plugins use different scoreboard names on same server
for now I will use the old version of waterfall
That doesn't fix nothing
You can use packet-based plugins, for example https://github.com/ShieldCommunity/SternalBoard
my problem does not occur when I try to swap servers, but when I try to join the server..
i will leave now.. thanks and bye
That's two seperate issues
Hi! I want to create persistent bossbar using adventure, but when the player changes the server - bossbar disappears. I tried re-adding player to bossbar viewers in server connect events, nothing changed
Code is really simple - only bossbar initialisation and adding viewers to it
Use switch event and set it again i guess
Yeah, the thing is switch event has method getFrom(), which i don't need in this case, but does not have something like getTo()
Maybe i can get the server player has connected using player#getServer
Because I want to exclude one server from displaying bossbar
Server connect event is also fired when changing server, but maybe that's not the good option for that
Hi! I’m a student and pretty much new to git, could anyone give me a demo of how to make a patch-based fork of Waterfall?
Clone the travertine repo and then delete all the patches bar the first one
outside of that, see the contrib guide and note that this tooling is pretty much pure abuse
uhh where's the contrib guide
might still be on the paper repo, moreso an older branch before we moved to gradle
oh found it here https://github.com/PaperMC/Paper/blob/ver/1.9.4/CONTRIBUTING.md
thx
Failed to collect dependencies at io.github.waterfallmc:waterfall🫙1.19-R0.1-SNAPSHOT -> io.netty:netty-transport-native-unix-common🫙${netty.version}: Failed to read artifact descriptor for io.netty:netty-transport-native-unix-common🫙${netty.version}: The following artifacts could not be resolved: io.netty:netty-transport-native-unix-common:pom:${netty.version} (absent): Could not transfer artifact io.netty:netty-transport-native-unix-common:pom:${netty.version} from/to papermc (https://papermc.io/repo/repository/maven-public/): status code: 400, reason phrase: Bad Request (400) -> [Help 1]
why bad request
bad build
i tried it also with 1.20 r0.2
maven yeah
figure out why your thing isn't replacig the netty var
i solved it by using waterfall-native & waterfall-config somehow xd dunno why waterfall normal doesnt work like before. in the repo is also the jar missing
I moved to gradle waterfall
hello does anyone have version 1.18.2 of waterfall?
latest supports 1.8+
Is there a version of ServerKickEvent which fires for kicks originating from the proxy? (i.e Connection#disconnect)
wouldn't that just be the general disconnect event? unless you mean you closed on the servers connection, in which case, er, I'd imagine, same event?
The disconnect event doesn't include the reason afaik. For context I wrote a logging utility plugin and I want to add logging for proxy kicks including their reason.
because all the disconnectevent knows is that the connection is dead
I have a problem with the ProxyConfig.java interface located in bungee.api:
I want to add a custom parameter to the config.
If I see this correctly, there are two configs: one from Waterfall itself (waterfall.yml) and the one from bungee.
My issue is that I need to read the property in the BungeeCord.java file.
There is a getConfig() method which returns an object from the ProxyConfig interface.
Which one?
There is the Configuration.java from bungee and the WaterfallConfiguration.java from (obviously) Waterfall.
Neither of them implement all the methods from the ProxyConfig interface.
Where should I put my custom config option?
The compiler currently nags me about this error:
[ERROR] /home/thorben/Dokumente/Development/Waterfall/Waterfall-Proxy/proxy/src/main/java/io/github/waterfallmc/waterfall/conf/WaterfallConfiguration.java:[10,8] io.github.waterfallmc.waterfall.conf.WaterfallConfiguration is not abstract and does not override abstract method isWaitingForPlayersEnabled() in net.md_5.bungee.api.ProxyConfig
I am unsure on how to proplery add a new config option.
I personally dont mind if its in the waterfall.yml or config.yml, however, the bungeecord class itself needs to be able to read this value.
are you trying to add a config option to bungeecord.yml or waterfall.yml?
if you are making a plugin, just use your own file
I want to change the behaviour of the disconnect when the server closes.
It should wait until every player has left the server, so no one gets kicked while e.g. playing a game.
Via HAProxy I can dran the bungee proxies so no new connections get added, and all existing ones should not be terminated. The proxy should wait until thers no connections anymore.
I dont think I can cancel or override the end command of bungee with my own logic and stop the server arbitrarily via a plugin?
Therefore I want to edit the "independentThreadStop" method of bungee so it waits for shutdown until noone has connections over the proxy.
And to switch the behaviour, I want to add a new config option named "wait_for_player_disconnects" in either waterfall.yml or config.yml, though I think it fits best in waterfall.yml.
I also dont understand why the getTimeout, getUUID dont have any implementations, at least according to IntelliJ.
It complains that the WaterfallConfiguration.java doesnt implement the getTimeout() method, but Waterfall still compiles just fine?
Where does the implementation come from? DI?
it's lombok
Oh no
Could you help me though with adding the custom config parameter?
In which class should I implement it?
No
it's pretty much at the point of basic java
define it in the interface, and define it in the config class that implements it
the waterfall class is there for reading from the waterfall config, the super is there for reading from config.yml
How can I download the source of waterfall 1.16.5 to my pc?
I mean, normal people would just grab the latest version
but i need the one from 1.16.5
Otherwise you would need to clone the repo and find a commit for that version to check out
Why?
If you wanna pretend you don't support newer versions, use a plugin
I don't think there is one, I was looking for one earlier
I mean, there is
You would need to go up the history yourself, however, we've never bothered to pin old versions
Go do a blame on the pom changes patch for the version line I guess
Ok, I'll have a look. Thank you
Do you know one?
There was a few out there, I don't have any links though
👍 Thanks for u help
so if i already have texture and signature of player skin, how to set it for player
Are plugin messages safe to use. Like to send data between a server and a proxy, you need a player as middleman. Can't a player just generate its own pluginmessages and send that to the proxy?
I obviously don't know enough about this, but you mean it's not an issue?
it's safe to use if you consider where the message is coming from
if you just want to communicate server <-> proxy but the message sender is a ProxiedPlayer then you'll want to discard it
Okay, so just do some instance checks...
But I don't understand how this can be achieved, doesn't the information have to go through a player to communicate between server and proxy?
it uses the socket connection between the proxy and the server that the proxy is proxying for a client, but for that to exist a client has to be connected to the proxy; if it only stays between the server/proxy connection, it isn't sent to the client
Aha, that clears up my understanding. Thanks!
Yeah, I always thought the client was middleman, as the client is required.
the proxy is the middleman, forwarding packets between server/client, but as it can intercept them you can do extra stuff with them as well before it gets forwarded
Oh... Yeah, true.
(I now remember this is exactly why I wasn't didn't think about this earlier on, as the proxy is the middleman it can modify malicious packets sent from client to server and so on)
Why do I no longer see an MOTD in the client from 1.20.3 when I set it in the ProxyPingEvent?
hello, is it possible with waterfall/the bungeecord api to intercept all chat messages going to the client? it doesnt seem to be possible, is there some kind of workaround that doesn't involve using doing it on the server?
How to kick proxiedplayer with adventure component kick message? I can't see any method in Audience
basically, you can't
I think adventure has a bungee serialiser you can use, however?
I see, thanks!
Does anyone have an idea how to fix this?
well, you hit the API rate limit
so the answer generally is "don't"
as for how you don't depends on the nature of your setup, etc
This is the only thing that pops up for me when connecting players to the bungeecord server. There is no way this limit could be unattainable?
mojang sets the API limits
if you're hitting them the only general solution is to start load balancing proxy instances, or basically proxy the requests to mojang through something that will load balance
And can I correct that for example the query is sent from socks?
no idea
22:34:46 [SEVERE] Error authenticating xxx with minecraft.net
java.lang.IllegalStateException: Expected HTTP response 200 OK, got 429 Too Many Requests
Only problem is that currently there are no people on the server and no connections....
Does anyone have any ideas?
I feel dumb.
yea no idea how to fix this
PluginMain is in the jar
did a clean, didn't fix it
wait I know what I did wrong
Actually, nevermind.
Any ideas?
once again, work out why you're hitting mojangs API limits and then address that
if using a shared host, only real advice would be don't
Does PlayerJoinEvent get called when changing servers?
You mean on the backend servers? yes, the backends don't know or care that the player just jumped from another server
how to cancel runlater
public void addPlayerOffline(ProxiedPlayer player){
OfflinePlayers.add(player);
sendPartySysMassage(" " + player.getName() + " offline 5 Minutes to kick for Party");
ScheduledTask scheduled = Plugin.getProxy().getScheduler()
.schedule(Plugin, new PlayerOffline(this, player),1, TimeUnit.MINUTES);
}
public void removePlayerOffline(ProxiedPlayer player) {
OfflinePlayers.remove(player);
// runlater cancel
}
i need For every player 
MAP<uuid,ScheduledTask> Like this?
yes
And how to cancel.
Excuse me, I'm a beginner in JAVA.
Map#remove returns the old value
ty 😁
at me.st.crew.LPParty.Party.removePlayerOffline(Party.java:157) ~[?:?]
at me.st.crew.Events.OnPlayerJoin.onPlayerjoin(OnPlayerJoin.java:29) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] ``` 😐
^^
the return value of "java.util.Map.remove(Object)" is null
java.lang.NullPointerException: Cannot invoke "net.md_5.bungee.protocol.MinecraftEncoder.getProtocol()" because the return value of "io.netty.channel.ChannelPipeline.get(java.lang.Class)" is null
at net.md_5.bungee.netty.ChannelWrapper.getEncodeProtocol(ChannelWrapper.java:51) ~[MainServer.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:dce3b8b:558]
at net.md_5.bungee.UserConnection.sendPacketQueued(UserConnection.java:195) ~[MainServer.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:dce3b8b:558]
at net.md_5.bungee.UserConnection.sendMessage(UserConnection.java:562) ~[MainServer.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:dce3b8b:558]
at net.md_5.bungee.UserConnection.sendMessage(UserConnection.java:517) ~[MainServer.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:dce3b8b:558]
at net.md_5.bungee.UserConnection.sendMessage(UserConnection.java:505) ~[MainServer.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:dce3b8b:558]
at net.md_5.bungee.UserConnection.sendMessage(UserConnection.java:484) ~[MainServer.jar:git:Waterfall-Bootstrap:1.20-R0.2-SNAPSHOT:dce3b8b:558]
at me.st.crew.LPParty.Party.sendPartyMassage(Party.java:46) ~[?:?]
at me.st.crew.Commands.PartyCmd.PartyChat(PartyCmd.java:304) ~[?:?]
at me.st.crew.Commands.PartyCmd.execute(PartyCmd.java:80) ~[?:?]```
public void sendPartyMassage(String msg, ProxiedPlayer player){
for (ProxiedPlayer p : members) {
if (!mute.contains(p)) {
if (p != null)
p.sendMessage(Plugin.sendMessage(player,msg));
}
}
}
how?
outside of "reproduce without plugins", eeeer
I mean, looks like you're sending a message to a dead connection
that's not how that works
if you store a connection object and the player DCs, it doesn't magically turn into a null value
How do I fix it?
well, are you storing old connection objects or not?
if yes, generally, don't do that; or, at the very least, check if they're still online
them still being in the list means effectively nothing
I have no idea how you're logic works
ok ty
public void removePlayerOffline(ProxiedPlayer player) {
OfflinePlayers.removeIf(p -> p.getUniqueId().equals(player.getUniqueId()));
members.removeIf(p -> p.getUniqueId().equals(player.getUniqueId()));
members.add(player);
if (owner.getUniqueId() == player.getUniqueId()){
setOwner(player);
}
if (timePlayerOffline.containsKey(player.getUniqueId())) {
timePlayerOffline.remove(player.getUniqueId()).cancel();
}
}
I think I fixed it.
ye fixed @trail plume
literally has "[no-ping]" in his name 
is there an ignoreCancelled for listeners in waterfall?
How to make a fork of waterfall
fork travertine and then work out how all the scripts work, etc
What is travertine
an old fork of waterfall
Ok
first you should probably consider if you can do whatever your trying to do with a plugin
bruh
sometimes i have this error can someone help me plz
most time on the first join
then i can join without problems
message.txt by @timber lichen: https://pastes.dev/SJHpeafgaT
Known bungee cord issue
Literally all you can really do is endure that you don’t have duplicate team names across servers
what are team names?
Scoreboards
i dont understand
i have a scoreborad but what team names?
permission ranks?
Read the error
i change now my bungee ranks to some other and idk but now the error is gone
is that what you mean
?
idk what i have to do
and why is this exists
Team npc-§8§4§a§0§0§0§4§3
i dont have a team npc?
You have a plugin in your server creating scoreboard teams
i have to give this a other name on every server
Fallback:
title: "&8<-&ao&8-> &bPromi&6Games &8<-&ao&8->"
lines:
- "&6Zeit:&f %localtime_time_HH:mm:ss%"
- "&r "
- "&6Rang:&f %vault_group%"
- "&r "
- "&6Clan:&f %simpleclans_clan_name%"
- "&r"
- "&6Online:&f %bungee_total%"
- "&r "
- "&6Sterne:&f %vault_eco_balance%"
?
so Fallback1 2 3
That is causing issues with server transfers because they’re using duplicate team names across server instances
I cannot tell you what you have on your server that is breaking it outside of it being scoreboard related
All I can tell you is what the error means and point you to the name of the team that it is upset about
i rly dont now what team is mean
ok i try somthing thx mate
or similarly sometimes it's this
first one came with this error
Just realized I'm not using waterfall
using bungee
I will try with waterfall
Okay if i use waterfall i get this...
i cant even see the back to server list button
starts with
[Render thread/WARN]: Client disconnected with reason: Internal Exception: io.netty.handler.codec.DecoderException: net.minecraft.ResourceLocationException: Non [a-z0-9_.-] character in namespace of location:
then its a long ass component tostring
seems to be from a tab-related packet
?
why is the location a component?
[Render thread/WARN]: Client disconnected with reason: Internal Exception: io.netty.handler.codec.DecoderException: net.minecraft.ResourceLocationException: Non [a-z0-9_.-] character in namespace of location: {\"extra\":[{\"color\":\"gray\",\"text\":\"\\n\"},{\"bold\":true,\"color\":\"white\",\"text\":\"MIDNIGHTSKY\\n\"},{\"color\":\"gray\",\"text\":\"\\n\"},{\"strikethrough\":true,\"color\":\"#0099FF\",\"text\":\" ```
Something is messing with packets and borking the data
Generally outdated plugins but 
for my server was the problem fancy npcs plugin
it was after i create the first npc but the name was not "Team npc-§7§a§o§c§f§c§f§4" that npc do not exist,
the name was my ingame name
i use now citizens and i no longer have the issue
Yeah Im getting this for some reason
With these plugins
Proxy-1.0-SNAPSHOT does nothing with packets
And also if a player times out then for some reason they don't get disconnected from proxy which is weird
so they get a "already connected to this proxy"
can anyone help with waterfall i want to direct connect to a server withoutgoing through hub
Don't include the server on bungee
Its that easy
lol
It happens to me too, did you find a solution?
Change the jar
Hii ! how to make a waterfall fork? i really want to make one.
What do you mean by "how to make a waterfall fork"
So.... How do I properly setup plugin messaging in BungeeCord with a custom channel identifier?
Like listen for incoming ones and sending own back?
There are no docs for BungeeCord that seem to cover the proxy side... Only the Server side.
