#waterfall-dev
1 messages Β· Page 9 of 1
if you can develop custom plugins then you can just revert it yourself? 
nahhhhh
Was looking at plugin channel stuff and saw that its possible to send from paper to waterfall but is it possible to send from waterfall to paper. Im trying to have the waterfall and paper servers communicate a few things in each direction. Is this possible using plugin channels?
yes
Only if there is players connected to the server you talk with
Speaking of the final plugin manager, you wanna poke my pr soon mr cat man? π
I wanna, am just suffering from a case of a think my brain cells are leaking onto the floor, at least it feels like that
Just lay on the floor then
hem
i'm not an expert to BungeeCord/Waterfall developement
but
this is in UserConnection
line 481
shouldn't this use the player version protocol instead of the proxy's one ?

you're right
the message should be transformed according to the client's version, not proxy's
should this be fixed by bungeecord or waterfall ?
ideally bungeecord
do you think it will be merged one day ?

i think i will also PR to waterfall
no reason to do that if you opened a PR on bungee
i tested
This is why you use CI
Quite honestly no need to test it just put the word tested somewhere
lol

Something special happend
pokey pls
My heads killing me, but I'll keep it at the top of my list
https://github.com/PaperMC/Waterfall/pull/494 now I am trying to figure out how the heck I am gonna make this not break Travertine entirely

It overlaps with Travertine on a few different levels sadly

https://github.com/Xernium/Travertine is set to track that branch and its obviously breaking the 1.7.x patch
Imho, there is no real super reason that it needs to be on waterfall
I don't /mind/ it being on waterfall under the basis that you've actually spent time on it, my placement in travertine was heavily a "it works but I have very little interest in actually tryna support this mess"
considering all that stuff is literally ripped out on the first day of spigots release, it's just heavily π€·ββοΈ
My stance is is that all this shit will be ripped out anyways, throwing stupidly large amounts of time on it is just a pointless headache, only really I ever do this is for the vanilla servers or people using Via, etc; it's not something that really lasts in the codebase, so, I really see no reason to make it into a headache
@trail plume want me to instead do both repos with a clean patch? I don't care in the end- Yea I do this for supporting the bad, the ugly and the awful- Via* on Fabric/Vanilla servers running snapshots and whatnot. And no it doesn't take enough time to bother me at all
so I'll just continue to do it
@night grotto you were the one who originally suggested I move the PR- Can I get your opinion on this? 
the second repo always sits ontop of the other, not really fond of breaking that even temp if that's what you're asking
yea alright, fair, thats what I was thinking originally when I opened the PR

what
Seems reasonable to me, I'll revert my shift tomorrow unless Aikar has something to add to this;;
almost like I said this would happen :))
Id really like to see us change course ont hat and put futrue stuff in WF and leave Trav to be the 1.8 of bungee :/
I have no interest in using trav
idk why we even maintain that anymore
let 1.7 die harder than 1.8
Well either way Iβll have the paper team decide which of the two PRs to merge when the time comes
Guys ! Do you have a good bungee plugin for queue ? please :(
Don't spam the channels, we're not google either
.g BungeeCord plugin for queue
(DiscordBot) https://github.com/IPVP-MC/queue -- IPVP-MC/queue: Control player connection frequency to ... -...: "A simple BungeeCord plugin that controls join rate of players to individual servers. Adding a player to a queue. All servers defined in the..."
Wasn't that difficult Romo?
ruben_artz.ProxyEvents.ProxyPing@35b3c1f6
java.lang.ArrayIndexOutOfBoundsException: 1
is this your plugin?
deprecated or just typo?
the class itself is deprecated, probably just pulling that
lombok, maybe π€·ββοΈ
so dynamic addition patch doesn't work now?
It's wrong becouse bungee it's wrong no? Isn't travertine problem?
It constantly spam console
With pinging
the exception is occuring in plugin code
god knows what they're doing, but, given that the source for the plugin doesn't appear to exist, I can't even see what they're doing, so π€·ββοΈ
It's plugin error?
yes
waterfall's online mode works just like the servers
online mode true if you want to make everyone have a real account with mojang
offline mode false if you don't get care and π΄ββ οΈ yarr harr
How can I use waterfall addServer in my plugin?
by simply calling the method?
hey, im trying to implement discord and minecraft account linking into my plugin but im having some strange issues, idk if someone can help me
i load a serialized hashmap with onenable and save it with ondisable, it all works but when i restart the server I still see the correct data loaded into the map with the debugger but it throws nullpointerexception
any help would be appreciated.. thanks
not related to waterfall at all
π€· it's a waterfall plugin thought someone could help here
Is this a hashmap of String To String?
I shall read all things: Your NPE can be thrown by the player object.
Your Debugger shows that the hashmap is there and properly initiated, so this NPE shall not come from hashmap.
I think that yout player object, that you give into containsKey-function throws this NPE.
Make sure that this object is not null until there.
@gray urchin yes it's string string
i tried UUID string before but i changed because of a different error
maybe we can talk in private message. I dont know if its ok if we spam here with non-waterfall topics
ok perfect
I have two servers which I'm trying to sync inventory between. I save the data on PlayerQuitEvent and load it on AsyncPlayerPreLoginEvent(into memory) and change the inventory on PlayerLoginEvent.
Since saving might take a bit longer than switching server, if the target server loads data before the data is saved, it'll either be empty or old data.
Therefore I'm trying to make the proxy check if the player switches between two synced servers and delay it till the Sending server is done saving.
Can I somehow delay a ServerConnectEvent and keep the player in the "Loading world.." screen till it's done?
@cyan garnet use locks.
db locks? how'd that help?
oh, between servers
yeah :/
I noticed if I put a Thread.Sleep on the ServerSwitchEvent on waterfall, it puts the player in a loading menu for the duration, but that's not good as it runs on the main thread
and if I do it async, it doesn't delay the login
well yeah what you can do is do an update with read lock on database entry
doesn't bungee do one thread for each player or do I misremember that?
that'd be neat if that's the case
in what way Dark?
I update db on logout but if login happens before data is saved, it'd fail
oh wait, events are still all called on one thread I guess
or do you mean I add a lock, transfer and once it's done, remove the lock. and if the target server reads and it's locked, delay it?
just lock the player until the inventory is loaded, at least that's what I do in that case
@cyan garnet search for mysql locks
I know what they are, just wondering what the best option would be, would rather lock them in a loading screen rather than blocking their events
and I think that's what hypixel does with their skyblock servers somehow
eh, maybe not :/
probably
I mean you could connect them to a void server or, as you already discovered, lock them in the loading screen
there is no way to avoid locking
Yeah, but locking them in a loading screen would force me to have to wait in main thread to cause the loading screen
well just do it not on the main thread?
wait why
if you are willing to go to Hypixel-level of tech then running your own waterfall fork shouldn't be too hard ;)
^
(I'm also pretty sure you could do the same by intercepting and delaying packets somehow)
lol, I wish I had the time
@EventHandler
public void ServerSwitchEvent(ServerSwitchEvent event) {
hubPlugin.getProxy().getScheduler().runAsync(hubPlugin, () -> {
System.out.println("\nServerSwitchEvent \n");
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
});
}
If I run this, then it doesn't block the switch
it spawns new thread, yes.
but if I do it sync, then it locks the player in a loading screen for 5s and I get a pretty warning took 5,000ms to process!
it will actually block 1/number of core processors * 2 of players
because it will lock whole event loop
with other players in it
right
you approach might be something like rsync
instead of using a database
check it out.
I'm currently using redis to sync inventories but I'm trying to improve it
Not as safe as using database, but still
as I'm taking over the switching of servers, so when player switches from A to B, it locks him in place, sends data to B and then sends him over.
Would rather use the join and leave events, but perhaps its easier to use locks as you suggested
don't use join events
why not?
nvm, misunderstanding
the solution actually depends on current architecture of your project tbh
willing to change it π
perhaps I could make the quit event save and when it's done, send a message via redis to bungee that it's done. bungee sees a switch event between A and B and cancels it till it gets the message, where it then will send the player over
ok
ISocketClient client;
@RequiredArgsConstructor
class InventoryUpdatePackage extends CorePackage {
final UUID player;
final Object data;
String error;
}
client.<InventoryUpdatePackage>writeAndAwaitResponse(new InventoryUpdatePackage(uuid, data))
.thenAcceptAsync(response -> {
val error = response.error;
if (error != null) {
// bad
return;
}
});
// some mciroservice
class InventoryData {
final Lock lock = new ReentrantLock();
Object data;
}
Map<UUID, InventoryData> dataLocks;
client.addListener(InventoryUpdatePackage.class, (__, packet) -> {
val data = dataLocks.computeIfAbsent(packet.player, __ -> new InventoryData());
val lock = data.lock;
lock.lock();
try {
val inventory = packet.data;
data.data = inventory;
// update stuff somewhere
} finally {
lock.unlock();
}
});
same lock for reads from any other server
Anyone know when Travertine will update to 20w19a?
officially - never
we just talked about this for someone else lol
keep track on what server a player is connected to,
on logout, unset the session record,
on login to a new server, if session is active onanother, mark the session record as "needs transfer" (set some 0 to a 1),
on each server, poll every tick (async) if needs transfer is 1 for anyone, and if so, disconnect the user, allowing their session to close cleanly and save data
on the new server, busy wait loop checking if session is now closed, and once it is, proceed to login, do this inside AsyncPlayerPrelogin
in ideal case this should transfer you within 100-200ms
and gives you unique session guarantees
create table session (uuid, name, online, needs_transfer, vanished) primary key(uuid)
online in our case represents the server id of where they are online
vanished state is synced to session so external display of users doesnt leak vanish
do you have ideas how to fix this? Cheaters start create ItemStacks with long array tag. for 1.12 its valid tag.

if replace flow-nbt with another lib it should help, but how viabackwards will handle this for <1.12 clients on 1.12 server for set slot packets? @main plume
Yea, we'd need to replace the library, it's not been maintained in 6 years
I've opened an issue in BungeeCord repo, since it's upstream bug.
Because currently flow-nbt is useless and only used to skip bytes...
well I know what Iβm doing when I wake up
just, idek what I tried to type there, I'd already looked over it, just didn't wanna merge while I was half dead; not that am not half dead right now \o/
yeah been thinking of hopping on kyori's nbt tbh
with my proxy
proposing that nbt lib change idea to md probably won't end up well
something in the lines of "too much effort"
flow-nbt is only used to skip bytes from buffer.
and you can all do this stuff manually
i think need to do some researches and check does there is any entity packets where slot is not a latest field in packet. because if slot is a middle field i think we cant simply skip bytes
unless theres an identifeid performance problem with that lib that is aiming to be solved, theres no reason to change it.
Issue is that bungee twiddles with data where it is possible to throw invalid data there
lombok just makes me sad
btw thx for light cmd uwu
@bleak current @trail plume witching here since more dev talk. the one way i can see intern style helping there is to instead do getPlayer(player).getName() so it returns the players online session string if set
scorebard teams shouldnt be getting sent for offline does it? if so, should prob ignore them and delete from packet
issue is that the client has to know about players in there
I guess you could give the client some relief there in general
if its a 0 player team not sure what client would do with that
0 online player i mean
pr machine go brrr
alright here are my finest additions to waterfall
feel free to review/merge
mfw bungee has a perms command
okay then
I think that's my brain for today, am on 18 hours now, but, I'll look into merging some stuff when I wake up
Actually, one thing
How the heck do I get it so I can push to peoples PR things?
Coz, every time I've ever tried it's been like "nope"
git puh branch remotename:remotebranch
I mean, I basically do something like that, unless it needs it formatting like that specifically o.O
Afaik "Allow contributors to edit this PR" needs to be enabled (I never use the command line this is what GitHub says).
thats default on
that's part of my avoidance of merging, I've not gotten that to play too well in the past and really don't got much brain juice to be running around tryna pull stuff in, especially as I like it when GH actually tracks this stuff... o.O
this is latest version of my checkout pr
i jjust do checkout-pr <ID>
r for rebase
do w/e,
exit
p to push
m to merge
might have to look at that
I am weird, however
The paper repo itself is "upstream" to me
git push --force origin master
i should probs move it around, was only really there so I could ez throw up branches without shoving them into papers
well you can add your repo as an upstream to papers lol
seems a bit backwards way yuo did it
as a remote*
re immutable
i think it's fine to disallow dum foot shooting
not very big diff either
jesus fucking christ
bungee is more shitshow than i remember

uses getDeclaredMethods
never calls setAccessible(true)
?????????

it's my fault oof
actually no it's not
@harsh harbor I'll admit: sometime later I actually revisited that and determined my JMH tests were faulty
the results I got were literally unrealistic
doesn't matter in the end, though
Bossbar are packets. If I remember right there is an API in Bungee) Waterfall for that.
is the setAccessible thing something that is gonna change soon or it's not important ?
setAccessible is a "matter", essentially it lets you disable the security manager checks running each time it's invoked
Yes I know, was just wondering if this is something we want to be changed or not
Is there a way to check if a player has a chunk loaded? or some sort of PlayerChunkLoadEvent when the chunk comes into view distance?
no, also, wrong channel
oops sorry
Hi, I am using a 1.16 version of Travertine and want to know which packet is sent to the client when they refresh the server list and retrieve data like max player, server version and stuff like that. (Because I want to find out, if the RGB colors from 20w17a and higher work in the server motd)
hello, regarding my previous question about sending bossbar packets from bungeecord, i'm getting this error
BossBar bar = new BossBar();
bar.setUuid(UUID.randomUUID());
bar.setAction(0);
bar.setTitle(ChatColor.GREEN + "Test");
bar.setHealth(1);
bar.setColor(4);
bar.setDivision(0);
bar.setFlags((byte) 0x04);
((ProxiedPlayer) commandSender).unsafe().sendPacket(bar);
is the title not json now?
uh i dont know its my first time working with packets
Is the Serverlistpacket even a normal packet (since there is no player yet)?
Is there a way to turn off online mode for one connection but not another via plugin?
I could have it permanently off and just manually authenticate but that is hacky / security issue
Context: trying to allow bedrock players via dragonproxy but refuse cracked java players
it is possible if i remember correctly
what isn't possible is detecting whether a player is cracked or not and requiring premium authentication based on that
since testing whether they're cracked or not requires you asking them to try premium authentication
but if your condition is based on IP, yes, it should be possible
i don't remember
there is a blog or something somewhere where some guy who wrote a plugin like that explains it and the packets in great detail
but i don't remember anything about it
That looks great but there is no version for bungee/waterfall
Which is kind of my issue
Ok after writing some code I realized that you can set the online mode of a PendingConnection
File worthCfgFile = new File(Bukkit.getPluginManager().getPlugin("Essentials").getDataFolder(), "worth.yml");
Something like that
Then you can actually load it by doing
FileConfiguration config = YamlConfiguration.loadConfiguration(worthCfgFile);
wdym does not work
well
what
you're loading a configuration file using yaml thingy
then passing it to grep command like this
this is simpler than you can even imagine...
wtf
anyway
at most you need an instance of File
to build an absolute path to given file
or
String path = new File(..., "config.yml").toAbsolutePath();
like
you're deserializing configuration file
using yaml parser
configuration.toString() == "net.md_5.bungee.config.Configuration@3b7b05a8"
i swear to god this is the dumbest thing i've seen today
man just look into how things work
no offence
think how commands work
No 20w20a push for my 1.16 tracker
I literally cant test for now because the server they ship is DOA.

Thanks for making the 1.16 version π
20w20a done for now
Itβs not perfect though, Iβll have to figure out how to determine isFlat
And Iβll have to do Travertine too
thank you for the work 
does anyone have a clue what the string levelType on respawn packet and join packet normally contains?
well it clearly usually contains one of those strings :p
if you're unsure, just say default - that's been there for a long time
my issue was elsewhere
but the client logic is complete crap for that
but I have yet to determine what isFlat translates to for levelType
cause currently I force it to be false if its not provided
the TabCompleteEvent has a suggestions list
Ok, does PendingConnection.setOnlineMode() actually do anything
yes
Ok then why does it not work
What would cause it to break
Do I need to set offline mode to false or something in the config
Or what
Hello, why there is such a long login delay with Waterfall Bungee?
It takes me 7seconds to login to the hub
Your logins are instant?
Whenever I use Waterfall jar, I have 6-10 login delay.
@lofty prawn
What jar version you're using?
is there a way (without querying mojang api) to get a player's skin texture on bungee/waterfall?
Shanny I have the same issue
when i ping the server on the server list it takes like 5 seconds
same with logging in
once im in theres no lag
yeh well, how is it fixable?
at the moment yes
whats weird is my waterfall (with the same config) that i use on my live server works fine, instant logins. but on my locally hosted testing bungeecord it takes like 5 seconds
and if it doesnt take 5 seconds it times out
sure. ill repost my question that i posted that is dev related
is there a way (without querying mojang api) to get a player's skin texture on bungee/waterfall?
tag me if yall respond. walking away and might forget to check back here
Sβweβdzβ: not, skin files never touch the server, you always need to download it from mojang
they most definitely do i can say that with confidence
this is sent by the server to the client
it contains skin data
also, theres GameProfile, which you can get properties of, which contains the texture hash
this is all on the bukkit though, of course
im looking to do this for bungee
it only contains the link to the image, not the image itself
well nobody here is a clairvoyant 
if you want to control what server a player goes to when connecting to the proxy
do you just setTarget in ServerConnectEvent
No, use the reconnect handler API
(I guess you could use the event though, you'd have to check the reason, but, the API is generally designed for using that handler stuff)
When developing plugins for Travertine, which maven repo should I use?
Thank you
With the ServerConnectEvent, is there a way to determine if it was executed via a plugin sending a player to another server via server.connect or a player running the /server command?
isn't there a reason in there?
I think so, let me check the options.
Okay so there's command and plugin
So I will just block it via command
The new snapshot requires me to use some kind of NBT parsing
What library should I add to do that?
If any
Because the game sends a container compound

Why did they need to put NBT into the login packet this badly
(DiscordBot) https://wiki.vg/Protocol -- Protocol - wiki.vg: "Apr 20, 2020 ... There are no clientbound packets in the Handshaking state, since the protocol immediately switches to a different state after the..."
@bleak current this broken part contains an CompoundTag
it contains info about the level type
right after dimension type
dimension registry
hmm alr
is a bukkit plugin runs p.sendPluginMessage(this, "BungeeCord", b.toByteArray());
To send a player to another server, does waterfall get an event for that? and does it get anything if the target server is invalid?
so in essence Ill have to implement a small lib for ```
EndTag
ByteTag
ShortTag
IntTag
LongTag
FloatTag
DoubleTag
ByteArrayTag
StringTag
ListTag
CompoundTag
IntArrayTag
LongArrayTag
@wide maple https://github.com/KyoriPowered/nbt
nukkit also has one if u need varint for some reason
I don't like the idea of shipping a non-standard library with waterfall ( and travertine) is there a maven repo for this even?
meet relocations, nobody needs to know youre using non-standard things
and i dunno, kashike probably does
looking at the build file, its on sonatype oss
Can I somehow figure out what player sent a pluginMessage to bungeecord from the PluginMessageEvent
Also, sorry if that was a dumb question earlier Leaf π
kek that was an accident
I believe the sender should be ProxiedPlayer and receiver should be Server in that case, Soap
debug and see lol
ahw, sadly deluxemenus is sending it via the server and not the player π¦
Are you trying to connect someone from one server to another in DeluxeMenus?
trying to make deluxemenu send a player to "lobby" and then have the proxy send them to a random lobby
private void sendPlayer(Player player, String serverToSendTo) {
ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();
DataOutputStream outputStream = new DataOutputStream(arrayOutputStream);
try {
outputStream.writeUTF("Switch");
outputStream.writeUTF(serverToSendTo);
} catch (IOException e) {
e.printStackTrace();
}
player.sendPluginMessage(this, "BungeeCord", arrayOutputStream.toByteArray());
}
Seems I'm getting the same issue with my own code :/
the sender in the PluginMessageEvent is a net.md_5.bungee.ServerConnection:
and not a ProxiedPlayer
derp... solved, I had to use the receiver not the sender π§
Oh dear, Mojang is now sending NBT in join game packets now?!?
Tbh i expected it to happen at some point
@weary grove @spring bloom @real cave ```
{
dimension:[
{
key:"minecraft:overworld",
element:"minecraft:overworld"
},
{
key:"minecraft:the_nether",
element:"minecraft:the_nether"
},
{
key:"minecraft:the_end",
element:"minecraft:the_end"
}
]
}
alongside the string of the dimension youre in
that replaces the dimension ID
interesting
So it's a mapping.
probably related to the respawn packets keep meta data tag in the future
that took a fair share of nerves
now I need to make this usable
if anyone was wondering what it looks like
ListTag (Type: CompoundTag) "dimension":
CompoundTag:
StringTag "key" value: 'minecraft:overworld'
StringTag "element" value: 'minecraft:overworld'
CompoundTag:
StringTag "key" value: 'minecraft:the_nether'
StringTag "element" value: 'minecraft:the_nether'
CompoundTag:
StringTag "key" value: 'minecraft:the_end'
StringTag "element" value: 'minecraft:the_end'```
Hi, this kind of falls between paper & waterfall.
For the purpose of making sure I'm not confusing I'll give an example/pre-text, let's say there's a PaperServer1, PaperServer2 and WaterfallProxy1
On our network, there are paper side commands that we want cooldowns on. These should only be able to be ran once every 10 minutes, for example, and if you run /cooldown on PaperServer1 - you won't be able to run it for 10 mins on PaperServer1, nor PaperServer2.
The way I do this currently is by sending a Bukkit-Bungee Messaging Channel message telling all online servers that "UUID" has a cooldown of durationMillis for each node to then calculate the time they can use it with System.currentTimeMillis() + durationMillis, and compare to this if the player tries to run the command again on that node.
I feel like having these Bukkit-Bungee messages flying around is kind of inefficient and messy. All the servers are on one machine and there's an SQL dB on the machine too. Wondering if switching to sockets or using SQL would be better, if anyone has thoughts?
tl;dr: Best way to handle cross-server paper-side cooldowns within a Waterfall network?
Ty
i have no answer but dang that's a well laid out question
Yes, mysql would be better than pooping data around, especially as the plugin messaging stuff is known to be shite in general
explicit about the x, but also lays out the current y and attempted solution + problems
I asked it this morning elsewhere and got very confused responses, so figured I'd try my best to make it well explained
especially given that a well designed cooldown system is handy, it makes sense for say, when you wanna have a 12 hour cooldown or something
Also, servers can only get messages when somebody on that server is online, so you'd have hell around people tryna jump to empty servers and such if you wanted that to work well
π tyvm, the SQL typically has <1ms response time on sync. But am I right in thinking to run the SQL on Async? & if so, does anyone know better ways to do this or can point me in a better way to do this than surrounding everything with BukkitRunnable(){...yada}.runAsync?
Are you using any type of library?
Not right now, but open to it
If not, check out IDB, it's a wrapper around HikariCP and has integration to Bukkit.
Ty! Appreciated
for stuff like that, it's worth considering just caching that stuff locally
Depends on if your data can be written to externally or not
woop 20w21a
it works
... though I am not fond of my nbt impl
sigh that cost some nerves
judges
meh
the patch will get lost anyway
so its not like I have to win anything with it
electronicboy how would you have done it
I was just joking ;P
what are you using nbt for
mojang
There is already an NBT library in bungee, any reason that's not being used?
wait, they have a UUID in chat messages? o.O
sender ID
it shows in the hover afaik
^^
well yeah
also side thing; github display is broken
will md_5 finally consider consider nbt as part of the api this update jfc
for stuff like that, it's worth considering just caching that stuff locally
Depends on if your data can be written to externally or not
@trail plume Do you know of any way I can do this ? Just really need a way of cross-server cooldowns, happy to use that DB wrapper or something simpler
don't ping
I usually just use a runAsync(() -> myCode...); method which creates a new task when I'm on the main thread Β―_(γ)_/Β―
if you wanna cache it, you'd just need to read it from the db when they login
the only issue is that db cant notify
you could implement a communication using RestActions
but loading on login is the best imo
I basically just write only on the cooldown being changed and rely on reading locally, but, I never do anything where another thing could write to the cooldown
Β―_(γ)_/Β―
Unless you have a case where another server can activate a cooldown when they're offline, it's really not an issue that you don't tell other servers that that stuff has changed
but MySQL isn't designed for communincation between servers anyways, use pubsub, either from Redis (if you already use that) or a dedicated software like RabbitMQ
If you can't actually do that, e.g. you are intending to have servers bump cooldowns and stuff when players are offline, then yea, you'd just wanna query the DB each time
for cooldowns, you're probably stuck on the main thread anyways
π ty guys
https://github.com/aikar/db
Hey guys, just wondering what the advantages of this are specifically? Is it along the lines of ease of use, able to be ran Async, has a cache built in?
- quality of life
- safety
- ease
- async support built in
- no cons
- there are literally none
- just use it it's great
Ty
Cons:
AbStrACtiOn
Is there any reason that in the ServerConnectEvent the server the player is on would be null? The one they are connecting to isn't null, but the one they are currently on is.
Try ServerConnectedEvent?
I think that's only fired after they actually connect.
I am controlling via a queue them moving around.
Ahh okay
So when they attempt it (before I actually cancel the event), it's saying the current server they are on is null.
My guess is the server actually crashed and they have a plugin to move them all over to another server.
ignore me
/server <name> executes this event, so I decided to listen to that.
I've only had 1 report of this so I will assume it might be another plugin messing with it.
Can anyone recommend a way to stop the player disconnect message showing in the console?
player.disconnect and event.setCancelReason both show the message so I am a bit stuck
Ah ok. Using "registerIntent" resolves my issues. I didn't realise that existed...
Is there a way to make a plugin compatible with bungee/waterfall without having to create a bungee-version of my plugin?
Plugin messaging
But it is trash
Because it requires a player to be online the server
really depends on what you want to do, lol
I just want to be able to teleport a player to another server with my plugin. Like a PaperLib.teleportAsync but having the option to give a server as well.
So it's not actually a proxy plugin.
I don't think you can async teleport across servers
yeah, just send the server connect packet and forward the location to the other server
if you need some inspiration: https://github.com/Phoenix616/InterServerPorts
(for the cross server teleport code, not the whole concept of mapping worlds to servers xD)
only plugin I have where I did that without a proxy-plugin component
Phoenix what the fuck is this
LMAO
what's new tbh
is he referring to the bad wrapping or the pony cartoon
The pony
What
.g mlp pinkie pie
(phoenix616) https://mlp.fandom.com/wiki/Pinkie_Pie -- Pinkie Pie | My Little Pony Friendship is Magic Wiki |...: "Pinkie Pie, full name Pinkamena Diane Pie, is a female Earth pony and one of the main characters of My Little Pony Friendship is Magic. She is an..."
^
damn bronies
( Ν‘Β° ΝΚ Ν‘Β°)
It was research for FiM++!
Research that warranted watching six seasons and five movies.
only?
Yes, only
No it ain't
not my fault so Β―_(γ)_/Β―
that's what I get for using weeklies and not lts I guess
Phoenix just wants some ponies
I prefer llamas nowadays though
A fine choice as well
Will ProxyServer.getPlayer variants return null if the player is offline or not found?
The bungeecord-api docs don't mention nullability :/
yes
thanks
is there a way to listen for startup completion? I can't find any server-load event or similar in the javadocs (although there is ProxyReloadEvent, but that's also called on reload)
I know that on bukkit you can use the scheduler to run a 0-tick task which will run when startup is complete
it has a commandsender
perhaps the sender will be null if the event is due to startup?
ideally you just use the reload event and properly handle the reload command too I guess
so I have to listen for the reload command, essentially?
but if you really need to go after the startup scheduling a task with 0 delay will probably work on the proxy too I would assume
I thought that worked with the BukkitScheduler because it's a sync task, but on bungee, there is no such thing as a sync scheduler task
there is
there's only runAsync, and schedule methods
The schedule methods run asynchronously also
interesting, I could've sworn it had that 
hmmm
the ProxyReloadEvent is only called for the reload command
well, I really only need to run something generally after startup and not necessarily at the precise moment. So, my solution is to listen to PreLoginEvent using an AtomicBoolean to indicate whether the event call is the first of its kind
or just use a delayed task
that's how I do it for registering commands after everything else in order to be sure to override them Β―_(γ)_/Β―
oh
i was about to check the implementation to see whether the delayed task will run after all plugins or enable, or immediately
huh, it looks like it uses the plugin's executor service and executes immediately
but i'll have to see whether the exec service itself executes immediately or later
that makes me wonder β why would BungeeCord's implementation use its own deprecated Plugin#getExecutorService?
probably depends on why it's deprecated
it looks like the executor service executes the task immediately
com.google.common.util.concurrent.ThreadFactoryBuilder and net.md_5.bungee.api.scheduler.GroupedThreadFactory have no indication of doing anything else
In terms of EventHandler priorities on bungee, is it fine to use a non-standard byte value? I would assume so, but the javadoc makes it seem otherwise
I'm confused because it only mentions the referential priority constants β https://pastebin.com/LCbz5NEC
Yes, you can use non-standard values
but the Bungee event system is total garbage anyway
why?
for one, the fact that it has no support for subclassing in general pretty much blows for expandability
and doesn't do proper reflection checks
@weary grove are you already tracking 1.16 for Velocity? I need some more time to get to know Velocity and itβd be good practice for me I think

join velocity discord
honestly i'd merge in snapshot support locally if you ported stuff to velocity
my builders would like to touch new blocks and stuff <3
mikro owns people, you see
want to be owned too?
uwu
do proxies even need to change for 1.16 or most versions for that matter?
well proxi definitely has to
a little bit yes
i have to know what the IDs of the packets i like to read players' data off to continue invading privacy
you say it as if you don't sit on my lap every day


Given a plugin class, is there a clean solution to get the corresponding plugin information without iterating over all plugins? On Bukkit, you can use JavaPlugin.getPlugin.
no
So I mainly develop for Bukkit, but I wanted to look at some BungeeCord. The first thing I've noticed is that the config APIs are different,
my main concern was trying to find an equivalent for JavaPlugin#reloadConfig() that works inside BungeeCord
Will using the ConfigurationProvider and saving do that?
and update the values
oh man switching to BungeeCord config is confusing at the beginning
expecially since I have to load embedded resources with an InputStream
How do I tell if a connection failed? Do I wrap connect() in a try catch or something else?
Is it possible to have a Waterdog with multiple listeners, and separating Java and Bedrock players on different servers?
go ask waterdog?
@lament lagoon yea thatβs the point
Thatβs also how the default config is laid out
am I right in the assumption that PluginMessageEvent#getSender will be the Server object of a ProxiedPlayer when I send a message from Minecraft server -> Proxy on that player?
I guess I'll know soon enough Β―_(γ)_/Β―
Yea, Downstreambridge, uses the server connection as the sender, player as the reciever
main class (InfinityBungeeCore.java) - https://hastebin.com/pasehomici.java
plugin.yml - https://hastebin.com/rosafoheba.http
my plugin won't start up. im probably making some dumb mistake, but i can't see what it is
https://hastebin.com/emacovewat.sql
thats the startup log
sorry i just saw this
there seems to be no errors or even messages related to my plugin
Everything in one place
project tree - https://hastebin.com/onidafekis.css
startup log - https://hastebin.com/emacovewat.sql
plugin.yml - https://hastebin.com/rosafoheba.http
main class (InfinityBungeeCore.java) - https://hastebin.com/pasehomici.java
pom.xml - https://hastebin.com/juhawegega.xml
for waterfall do i need a different repository and dependency to make my plugin work?
ill try it but i don't think so
@warped loom you're a legend
that worked lol
its strange though cause i have always used plugin for this type of stuff
plugin.yml and bungee.yml are both fine
Hello, i make the first time a waterfall plugin and i have made a listener but i dont know how i do make a PluginManger for making the Listner on.
getProxy().getPluginManager().registerListener...
okay thanks π
https://www.spigotmc.org/wiki/event-api under the create your own listener section if you need more
Hello Iam again. Pls can someone say me how i can look and do inventory stuff when i have the Waterfall plugin?
inventory stuff is best done on the server, given that there is API for it
Beyond that, there are libs for this, but, π€·ββοΈ
but i want to do that i when i click a item i go to the server
you can do that with a plugin on the server, it's easy to get a list of servers; But, basically, on the server or using a lib that already manages all that is the "best" option
i dont understant what do you meen. i made already an inventory stuff and so. only i wnat to do that when i click an item i landing on the next server.
You'd just get the user from the proxy, and the server you want to use, and use the connect methods
What should I use in maven for the waterfall API?
paper's repo
how i can do that when a player disconnect not in the lobby and he reconnect that he connect on the lobby again
set force_Default_server to true
has anyone here worked with chatcontrol
having messaging issues
IllegalPluginAccessException Plugin attempted to register class org.bukkit.event.player.AsyncPlayerChatEvent while not enabled
is there a way to enable AsyncPlayerChatEvent
doesn't sound like a #waterfall-dev question
Well their dev team isn't active.....and I know the plugin has been installed by others.......
their discord server just isn't active......
that doesn't change the fact that this has nothing to do with developing waterfall/waterfall plugins
Well the only reason it might is because of the exception it's throwing might be caused by something in waterfall idk I'm sorry just figured it might be something someone might have gone through before
the proxy is completely separate from the server
and even if it wasn't, this is clearly a help question not a dev question
Right but AsyncPlayerChatEvents a global method that lots of plugins use no
.lombok
[03:01:27] <gabizou> fuck you and the lombok horse you rode in on

how do you properly work with patch files?
using the scripts, and a bit of git knowledge
the paper contributing guide goes over a fair # of the tricks and stuff we use
anything in the IDE to have some code indexing?
you just open it as a standard IDE project after you've ran the script to apply the patches
is there any way to get an actual collection of players online in a server? i'm using multiple bungeecord instances with the same spigot servers and doing ProxyServer.getInstance().getPlayers() only returns players online that proxy (which makes sense) but even after forking bungeecord and changing the method directly to this:
@Override
@SuppressWarnings("unchecked")
public Collection<ProxiedPlayer> getPlayers()
{
connectionLock.readLock().lock();
try
{
Collection<ProxiedPlayer> players = new ArrayList<>();
for ( ServerInfo info : getServers().values() )
for ( ProxiedPlayer p : info.getPlayers() )
players.add( p );
return players;
} finally
{
connectionLock.readLock().unlock();
}
}```
it still only returns players who connected through that proxy
you could ping the server, not sure if that response contains all players or just the ones not hidden in the normal hover though
usually you'll want to have a plugin which is able to sync that kind of information either between proxies or between proxy and minecraft servers
I guess Iβll just use that method then unless someone comes up with a better one. Ty
the better one is using something like redis, mongo or even a pub sub setup to store/sync that kind of data
Iβm probably gonna use mongo I donβt have Redis setup
I wish it was just as simple as what I tried already but ig it makes sense for security
Sometimes I wish I could know how big servers do it, apparently hypixel has 45 different bungee instances
probably with something like what I described
exact software doesn't really matter tbh, it all works
True
redis is probably the easiest way to get it done tbfh
I mean any key value storage works Β―_(γ)_/Β―
yeah, you usually just use whatever you already build other stuff on top
I just realized redis bungee is a thing
Ig since itβs open sourced Iβll just fork that and combine it with my bungee fork
isn't redis bungee a plugin? 
yes i just figured that out
I still need help with this, mongo cannot store ProxiedPlayer object which I didn't think was gonna work anyways but RedisBungee is not what I wanted either
Is there a way to reconstruct a ProxiedPlayer object just by using UUIDs or something?
that doesn't do what I want, that does
so that's still just a map stored on each bungee instance
Okay but it's returning a player from a uuid, like you asked.
oh yea thatβs my bad I shouldβve clarified. I was adding onto my previous question
RedisBungee is not magic
it just helps you to synchronize the PlayerCount and Server List I think
you can try to serialize your own User object into the Redis or some database
s
Iβm not using redis bungee itβs not what I want, I was forking bungeecord to make ProxyServer#getPlayers() return all players in all proxies
use Kafka then?
cross proxy cache
each proxy stores their players into a pool
and adds up to all players
are proxiedplayers specific to one instance?
there's probably no way that you can directly obtain a ProxiedPlayer instance
yeah they are specific
not sure if Hypixel accomplished it but I think probably not
they are all specific to one instance
just create your own like "SharedPlayer" instance and throw that thingy into cache
I could do that but I just canβt think of how to turn the serialized proxiedplayer into a proxiedplayer on another instance
isn't ProxiedPlayer an interface
Yes
Java object serialization (writing) is done with the ObjectOutputStream and deserialization (reading) is done with the ObjectInputStream. That Serializable is a marker interface means that it contains no methods. Therefore, a class implementing Serializable does not have to implement any specific methods.
no way
also
another issue I have is would it be possible to make a ProxiedPlayer#connect(ProxyServer)
so connect the player to another instance instead of to a spigot one
how does hypixel do what they do then?
each proxy has different connections
no? when Hypixel restarts one proxy it kicks all players
they have 45 different bungee instances
in that proxy and then restart
oh...
not sure if something like "BungeeBungeeCord" is possible
but that would just increase the network load :<
I have the resources for whatever but not for the actual thing
Well this turned out to be really disappointing
@slender grotto You shouldn't use MongoDB anyway, it's an awful choice
Are Teams automatically sent to players when updated?
i.e. add/remove players to/from the team
no
I guess manually constructing & sending the packets would be best for that then?
yup
ah that sucks but oh well
@weary grove how come?
many, many reasons
it works when used correctly Β―_(γ)_/Β―
wdym! it's webscale and perfect!
Q&A discussion discussing the merits of No SQL and relational databases.
PostgreSQL
ok I'll switch
right tool for the task and all, if you need NoSQL then using SQL is just wtf
same the other way around
I switched to postgresql it wasn't easy but I have a feeling it was the right choice and I kind of like the SQL experience again
in terms of event handling - Waterfall is all threaded ? so each connection is handled asynchronously already - given that fact is there any reason why I need to do the following in a plugin that handles a players connection event.
ProxyServer.getInstance().getScheduler().runAsync(new Runnable(){
//handle player connection check bans etc and cancel event if banned
});
Ie should I really be launching another thread to handle this plugins involvement with the connection
particularly if the new thread can cancel the event
everything basically runs in the event loop threads, so, you ideally don't wanna block
There are events which are designed to be deferred and handled from another thread, etc
ok so given I am checking a db then I should run async
depends what you're hoping to find and do with the result
if it's to check bans or the likes, blocking is fine, but to load a nickname should probably be done elsewhere
no, blocking the event thread for bans is not fine
use the intend system that AsyncEvents offer
^
Those worker threads are use by the network pipelines, blocking the thread will cause noticable hits on other players
Hey, not sure what's going on but I'm using Waterfall 1.15-SNAPSHOT and I keep getting the following error:
https://pastebin.com/raw/7ejxTJ3m
I'm pretty sure I'm using the code correctly, but if I'm not I hope someone can explain what I'm doing wrong:
Current Code:
String serverName = dataList.get(1);
ServerInfo serverInfo = proxy.getServerInfo(serverName);
if(serverInfo == null) return;
serverInfo.ping((ping, error) -> {
if(error != null) {
Logger logger = this.plugin.getLogger();
logger.log(Level.WARNING, "An error occurred while pinging a server:", error);
sendData(serverInfo, "ServerMOTD", serverName, "ERROR");
return;
}
BaseComponent description = ping.getDescriptionComponent();
String text = BaseComponent.toLegacyText(description);
sendData(serverInfo, "ServerMOTD", serverName, text);
});
return;
(ping me when replying please)
something tried to send a packet over a closed connection
@kind crater
ok, but what's sending the packet then?
I'm just executing the ping method and then using the result to send a message on a separate channel
(and all the servers are linked to the bungee and online)
you can run a bungee server online?
online as in they're up and running
not online-mode
can't tell you, all I can see is that something threw an exception around a closed channel
oh, right
protocolsupport threw an exception
ah ok, I'll remove that and see if it fixes my issue
if not I'll be back
okay the ping is working now, seems ProtocolSupport broke the handler or something
thanks for the help π
assuming you have plugins, the deciding factor is the api-version in their plugin.yml
Is it possible to get the players skin texture from within waterfall?
like finding their game profile or something
possible? yes. supported by the api? no
you need the proxy module of waterfall; that exposes the InitialHandler of ProxiedPlayer, which again exposes its login profile
That's fine then, thanks anyway
God heavens almighty
They changed the dimension registry again

1.16 is gonna be fun
they support multi world now? 
thank god
all of CB's hacks are around that are gonna be gone
do you have any idea of how little that narrows it down
huh
quoted wut
SLIGHTEST idea
am lost
no idea what that is

@Aikar I said that with a bit of sarcasm because the game still, on its own, refers to the dimension registry as Lifecycle.EXPERIMENTAL- seems about right
https://github.com/Xernium/Velocity/tree/future/1.16/proxy/src/main/java/com/velocitypowered/proxy/connection/registry is how I implemented that all on a proxy (not finished yet)-
Wiki.vg even doesnβt have it yet Β―_(γ)_/Β―
wait they moved to nbt over the protocol instead of json strings?
if so, holy hell maybe they are being serious about performance!
nbt is so much saner than json
nbt is safer for preventing data attacks too, as json doesnt have the metadata to know what your trying to unpack before you read it. so damage is already done once you deserialize a blob to then realize it has malicious payloads
Well worst case is a decoderexception
Which are plentiful with this
I havenβt found a way to crash the client entirely yet
With this mechanic I mean- In revision one it was possible to freeze the client though
json over network
which retard over there decided that was a good idea
when they already fucking have
NBT -> byte[] -> NBT
and every fucking thing
serializes to NBT
can I pr that to Waterfall or should I wait a few more weeks if goody md maybe replies? https://github.com/SpigotMC/BungeeCord/pull/2841 π
pr
gm
is there a way to force my plugin to load after a certain one
cuz i can't run my plugin's onEnable bc i get this: https://pic.wtf/u/PMUbLwDiq8.png
i have depend: [LuckPerms] in my yml file
depend /should/ do that
it doesn't 
depends, not depend
sadly not 
it does?
well then i shouldn't be having an issue like this
i don't have any issues with luckperms myself
ok
how does bungeecord/waterfall deal with multiple players executing a plugin command at the same time? does it linearise the command execution with memory syncs in between, or does the command implementation need to deal with thread safety itself? (dunno how appropriate this is for this channel)
the command impl needs to be safe
aight, thanks
everything about bungee/waterfall is concurrent. there is no main thread
is there ANYONE here who knows how spectator mode works on the Notchian client?
which part of it?
clusterfuck
I am having a very weird issue-
Let me explain first
When I get the game to switch to spectator mode the following happens:
PlayerAbility Update Packet
PlayerList Update Packet
GameStateChange Packet
PlayerAbility Update Packet
and then I should be in spectator mode
well
I verified the contents of all of those packets, and what gets sent gets received correctly
so far so good
but:
see hat happens here; I have no damn clue and cant fathom what the hell is wrong
spectator mode is bugged: No spectator hotbar, survival inventory, flight and invisibility, but collision is still on
is this a proxy question
yes.
that would suggest that the player didn't get the entire set of state updates
but it did- I wrote a fabric mod to synch it and it does deliver the full extent of those three packet types
I did that so I could verify it
correct IDs and stuff?
tried on a real server?
Yes.
info from both might be beneficial
thats how I captured all data from the read and sent packets
I omitted the dimension registry for sanitys sake
(oh yea these are from join, changing gamemode is the same as on join)
same issue
https://paste.gg/p/anonymous/79a16c35a6f94a79b989e8a0cd4085ac - paste of those two files
for those people who don't want to download
yea sorry-
from what Ive been able to tell the client checks isSpectator from tablist
but
the tablist shows my name as Italic
I assume you compared that with normal spectator packets yet?
so it should be correct-
forgot we where on pre2
does it matter? It should be the same on 1.15.2
afaik nothing changed here other than the extra fields on login and respawn
phoenix yes- With and without proxy those packets have the same contents
Damn, they went crazy from enigma
am I missing something?
is there a special order to this?
I might be terminally stupid and I might have missed a vital piece to this but damn I dont know what to do anymore
don't worry, stupid is scarcely terminal
I'm kinda braindead atm, can someone explain how waterfall switches a player's server packet wise
bascially pretends each server is a different world
Alright, thank you

hello, where do i find the Maven repository and dependency for waterfall?



~~