#waterfall-dev

1 messages Β· Page 9 of 1

round cloud
#

Ik, I could do that if you want, but I would be happier if md5 reverted that change, I need to wait what he says, but I'm not expecting him to do that, so I wrote here

lean gobletBOT
#

if you can develop custom plugins then you can just revert it yourself? thonk

bleak current
#

nahhhhh

bleak current
#

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?

bleak current
#

yes

chilly coral
#

Only if there is players connected to the server you talk with

fringe aspen
#

Speaking of the final plugin manager, you wanna poke my pr soon mr cat man? πŸ˜‰

trail plume
#

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

keen cave
#

Just lay on the floor then

bleak current
#

yeah cat, on the floor right now!

#

get off the fuckin sofa

chilly coral
#

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 ?

deep gyro
bleak current
#

you're right

#

the message should be transformed according to the client's version, not proxy's

chilly coral
#

should this be fixed by bungeecord or waterfall ?

bleak current
#

ideally bungeecord

chilly coral
#

do you think it will be merged one day ?

bleak current
chilly coral
#

lmao

#

i try this locally and PR at BungeeCord

bleak current
#

pinged md5 on spigot discord

#

fuck it

#

probably won't get anywhere with it

chilly coral
#

i think i will also PR to waterfall

bleak current
#

no reason to do that if you opened a PR on bungee

chilly coral
#

oke

#

hope it will be merged soon

civic valve
#

Make sure you test your pr

#

Md_5 doesn't test any pr that gets merged

chilly coral
#

i tested

shell lagoon
#

This is why you use CI

civic valve
#

Quite honestly no need to test it just put the word tested somewhere

shell lagoon
#

lol

bleak current
chilly coral
#

Something special happend

frigid anvil
#

pokey pls

civic valve
#

@frigid anvil maintain a local fork if you need it asap

#

copy paste patch file

trail plume
#

My heads killing me, but I'll keep it at the top of my list

wide maple
#

It overlaps with Travertine on a few different levels sadly

trail plume
#

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 πŸ€·β€β™‚οΈ

civic valve
trail plume
#

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

wide maple
#

@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? thonk

trail plume
#

the second repo always sits ontop of the other, not really fond of breaking that even temp if that's what you're asking

wide maple
#

yea alright, fair, thats what I was thinking originally when I opened the PR

stone fiber
#

am pro travertine being the weird protocol whatever one

#

justifies its existence

wide maple
spring bloom
#

what

wide maple
#

Seems reasonable to me, I'll revert my shift tomorrow unless Aikar has something to add to this;;

civic valve
#

almost like I said this would happen :))

night grotto
#

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

random comet
#

some pvp players like 1.7

#

that is only reason i use it

wide maple
#

Well either way I’ll have the paper team decide which of the two PRs to merge when the time comes

molten flare
#

Guys ! Do you have a good bungee plugin for queue ? please :(

trail plume
#

Don't spam the channels, we're not google either

outer cosmos
#

.g BungeeCord plugin for queue

lean gobletBOT
#

(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..."

outer cosmos
#

Wasn't that difficult Romo?

bleak current
#

yes

#

imagine using google

sly crown
#

ruben_artz.ProxyEvents.ProxyPing@35b3c1f6
java.lang.ArrayIndexOutOfBoundsException: 1

#

is this your plugin?

velvet fable
trail plume
#

the class itself is deprecated, probably just pulling that

#

lombok, maybe πŸ€·β€β™‚οΈ

velvet fable
#

so dynamic addition patch doesn't work now?

trail plume
#

it works fine

#

That class is deprecated because md_5, basically

clear fox
#

It's wrong becouse bungee it's wrong no? Isn't travertine problem?

#

It constantly spam console

#

With pinging

trail plume
#

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 πŸ€·β€β™‚οΈ

clear fox
#

It's plugin error?

trail plume
#

yes

stone fiber
#

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

velvet fable
#

How can I use waterfall addServer in my plugin?

bleak current
#

by simply calling the method?

bleak current
#

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

bleak current
#

not related to waterfall at all

bleak current
#

🀷 it's a waterfall plugin thought someone could help here

gray urchin
#

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.

bleak current
#

@gray urchin yes it's string string

#

i tried UUID string before but i changed because of a different error

gray urchin
#

maybe we can talk in private message. I dont know if its ok if we spam here with non-waterfall topics

bleak current
#

ok perfect

cyan garnet
#

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?

harsh harbor
#

@cyan garnet use locks.

cyan garnet
#

db locks? how'd that help?

harsh harbor
#

oh, between servers

cyan garnet
#

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

harsh harbor
#

well yeah what you can do is do an update with read lock on database entry

lean gobletBOT
#

doesn't bungee do one thread for each player or do I misremember that?

cyan garnet
#

that'd be neat if that's the case

harsh harbor
#

database's data is updated off event loop thread

#

and it does not lock

cyan garnet
#

in what way Dark?
I update db on logout but if login happens before data is saved, it'd fail

lean gobletBOT
#

oh wait, events are still all called on one thread I guess

cyan garnet
#

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?

lean gobletBOT
#

just lock the player until the inventory is loaded, at least that's what I do in that case

harsh harbor
#

@cyan garnet search for mysql locks

cyan garnet
#

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 :/

harsh harbor
#

probably

lean gobletBOT
#

I mean you could connect them to a void server or, as you already discovered, lock them in the loading screen

harsh harbor
#

there is no way to avoid locking

cyan garnet
#

Yeah, but locking them in a loading screen would force me to have to wait in main thread to cause the loading screen

lean gobletBOT
#

well just do it not on the main thread?

harsh harbor
#

wait why

lean gobletBOT
#

if you are willing to go to Hypixel-level of tech then running your own waterfall fork shouldn't be too hard ;)

harsh harbor
#

^

lean gobletBOT
#

(I'm also pretty sure you could do the same by intercepting and delaying packets somehow)

cyan garnet
#

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

harsh harbor
#

it spawns new thread, yes.

cyan garnet
#

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!

harsh harbor
#

it will actually block 1/number of core processors * 2 of players

#

because it will lock whole event loop

#

with other players in it

cyan garnet
#

right

harsh harbor
#

you approach might be something like rsync

#

instead of using a database

#

check it out.

cyan garnet
#

I'm currently using redis to sync inventories but I'm trying to improve it

harsh harbor
#

Not as safe as using database, but still

cyan garnet
#

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

harsh harbor
#

don't use join events

cyan garnet
#

why not?

harsh harbor
#

nvm, misunderstanding

#

the solution actually depends on current architecture of your project tbh

cyan garnet
#

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

harsh harbor
#

for example, if I was doing that

#

1 sec

cyan garnet
#

ok

harsh harbor
#
                    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

cyan garnet
#

oh boy, that's a lot

#

What package is the ISocketClient in?

crisp grail
#

Anyone know when Travertine will update to 20w19a?

bleak current
#

officially - never

night grotto
#

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

ruby dust
#

do you have ideas how to fix this? Cheaters start create ItemStacks with long array tag. for 1.12 its valid tag.

dark perch
ruby dust
#

what is outdated?

#

yes, server is on version 1.12.2, but its latest bungee

harsh harbor
#

md_5 is genius and uses library that does not support long arrays

#

stupid

ruby dust
#

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

harsh harbor
#

Temp solution is to disable entity rewrite

trail plume
#

Yea, we'd need to replace the library, it's not been maintained in 6 years

harsh harbor
#

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...

fringe aspen
#

hey cat wanna poke my pr again at some point

#

😍

stone fiber
#

> immediately merges it

#

cat showing everyone else up over here

trail plume
#

lol, don't tell anybody

#

I'd but, i'd already looked at it, just I erm...

fringe aspen
#

well I know what I’m doing when I wake up

trail plume
#

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/

bleak current
#

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"

harsh harbor
#

flow-nbt is only used to skip bytes from buffer.

#

and you can all do this stuff manually

bleak current
#

kinda, kinda not

#

safer to use nbt library which knows stuff, no?

ruby dust
#

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

night grotto
#

unless theres an identifeid performance problem with that lib that is aiming to be solved, theres no reason to change it.

trail plume
#

Issue is that bungee twiddles with data where it is possible to throw invalid data there

#

lombok just makes me sad

grizzled thistle
#

btw thx for light cmd uwu

night grotto
#

@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

trail plume
#

It does

#

The teams player list is sent to the client

night grotto
#

even teams w/o players online?

#

maybe should try to fix that at paper level

trail plume
#

issue is that the client has to know about players in there

#

I guess you could give the client some relief there in general

night grotto
#

if its a 0 player team not sure what client would do with that

#

0 online player i mean

bleak current
#

pr machine go brrr

#

alright here are my finest additions to waterfall

#

feel free to review/merge

trail plume
#

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"

night grotto
#

git puh branch remotename:remotebranch

trail plume
#

I mean, I basically do something like that, unless it needs it formatting like that specifically o.O

shell lagoon
#

Afaik "Allow contributors to edit this PR" needs to be enabled (I never use the command line this is what GitHub says).

night grotto
#

thats default on

trail plume
#

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

bleak current
#

i didn't even know that github let you do this

#

wew

night grotto
#

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

trail plume
#

might have to look at that

#

I am weird, however

#

The paper repo itself is "upstream" to me

night grotto
#

wat

#

you should have a sep repo for paper work and personal work lol

bleak current
#

pfsh

#

push directly to master

#

and watch world burn

#

imagine playing it safe

keen cave
#

git push --force origin master

bleak current
#

yes and fuck everybody else too

#

absolute madlad chad

trail plume
#

i should probs move it around, was only really there so I could ez throw up branches without shoving them into papers

night grotto
#

well you can add your repo as an upstream to papers lol

#

seems a bit backwards way yuo did it

#

as a remote*

bleak current
#

re immutable

#

i think it's fine to disallow dum foot shooting

#

not very big diff either

bleak current
#

jesus fucking christ

#

bungee is more shitshow than i remember

#

uses getDeclaredMethods

#

never calls setAccessible(true)

#

?????????

chilly coral
harsh harbor
#

@bleak current

#

you know what?

harsh harbor
chilly coral
#

lol

#

pr incoming

weary grove
#

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

bleak current
#

hey

#

is there any way to send a custom bossbar from a waterfall plugin?

outer cosmos
#

Bossbar are packets. If I remember right there is an API in Bungee) Waterfall for that.

chilly coral
#

is the setAccessible thing something that is gonna change soon or it's not important ?

trail plume
#

setAccessible is a "matter", essentially it lets you disable the security manager checks running each time it's invoked

chilly coral
#

Yes I know, was just wondering if this is something we want to be changed or not

glass horizon
#

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?

trail plume
#

no, also, wrong channel

glass horizon
#

oops sorry

tidal fog
#

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)

bleak current
#

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);
trail plume
#

is the title not json now?

bleak current
#

uh i dont know its my first time working with packets

trail plume
#

Yea, it's json

#

You need to send a chat component and serialize it

tidal fog
#

Is the Serverlistpacket even a normal packet (since there is no player yet)?

bleak current
#

you know what?
@harsh harbor what?

bleak current
#

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

tribal jacinth
#

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

bleak current
#

Great, thanks!

#

Now how would I do that?

tribal jacinth
#

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

bleak current
#

Was it this

tribal jacinth
#

it may have been

#

it has been years and I really don't remember

bleak current
#

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

austere zephyr
#

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);

bleak current
#

wdym does not work

bleak current
#

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 pepegahammer man just look into how things work

#

no offence

bleak current
#

think how commands work

wide maple
#

No 20w20a push for my 1.16 tracker

#

I literally cant test for now because the server they ship is DOA.

tidal fog
#

Thanks for making the 1.16 version πŸ˜‰

wide maple
#

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

wary inlet
#

thank you for the work peepoHappy

wide maple
#

does anyone have a clue what the string levelType on respawn packet and join packet normally contains?

harsh harbor
#

wiki.vg has answers on all your questions.

wary inlet
#

respawn just says "same as in join game"

wide maple
#

yea neither answers my question

#

multibyte placeholder

#

Interesting okay

wary inlet
#

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

wide maple
#

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

lean gobletBOT
#

the TabCompleteEvent has a suggestions list

bleak current
#

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

plain goblet
#

Hello, why there is such a long login delay with Waterfall Bungee?
It takes me 7seconds to login to the hub

plain goblet
#

Your logins are instant?

#

Whenever I use Waterfall jar, I have 6-10 login delay.

#

@lofty prawn

#

What jar version you're using?

plain goblet
#

@lofty prawn

#

Are you using Spigot Waterfall or Bungee Waterfall?

molten jackal
#

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

plain goblet
#

yeh well, how is it fixable?

molten jackal
#

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

lean gobletBOT
#

S​we​dz​: not, skin files never touch the server, you always need to download it from mojang

molten jackal
#

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

lean gobletBOT
#

it only contains the link to the image, not the image itself

molten jackal
#

right

#

thats what i meant πŸ˜›

lean gobletBOT
#

well nobody here is a clairvoyant thonk

molten jackal
#

sadly

#

πŸ˜‰

bleak current
#

if you want to control what server a player goes to when connecting to the proxy

#

do you just setTarget in ServerConnectEvent

trail plume
#

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)

stark bone
#

When developing plugins for Travertine, which maven repo should I use?

bleak current
#

paper's

#

you should use waterfall api

#

travertine does not change the api

stark bone
#

Thank you

violet saffron
#

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?

trail plume
#

isn't there a reason in there?

violet saffron
#

I think so, let me check the options.

#

Okay so there's command and plugin

#

So I will just block it via command

wide maple
#

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

bleak current
#

wat

#

.g wiki vg protocok

lean gobletBOT
#

(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..."

wide maple
#

it contains info about the level type

#

right after dimension type

#

dimension registry

bleak current
#

hmm alr

cyan garnet
#

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?

wide maple
#

so in essence Ill have to implement a small lib for ```
EndTag
ByteTag
ShortTag
IntTag
LongTag
FloatTag
DoubleTag
ByteArrayTag
StringTag
ListTag
CompoundTag
IntArrayTag
LongArrayTag

wary inlet
#

nukkit also has one if u need varint for some reason

wide maple
#

I don't like the idea of shipping a non-standard library with waterfall ( and travertine) is there a maven repo for this even?

wary inlet
#

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

cyan garnet
#

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 πŸ˜›

spring bloom
#

kek that was an accident

wary inlet
#

I believe the sender should be ProxiedPlayer and receiver should be Server in that case, Soap

cyan garnet
#

Ah right, thanks πŸ™‚

#

Was thinking the sender would be the server :/

wary inlet
#

debug and see lol

cyan garnet
#

ahw, sadly deluxemenus is sending it via the server and not the player 😦

violet saffron
#

Are you trying to connect someone from one server to another in DeluxeMenus?

cyan garnet
#

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 🧠

weary grove
#

Oh dear, Mojang is now sending NBT in join game packets now?!?

real cave
#

Tbh i expected it to happen at some point

spring bloom
#

what kind of nbt

#

err what's it representing

wary inlet
#

lol burger broke

#

so no clue

wide maple
#

@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

bleak current
#

interesting

wary inlet
#

it'd be very nice of you if you also edited the wiki.vg page :p

wide maple
#

ill nudge pokechu to do it

#

like I always do

real cave
#

So it's a mapping.

wide maple
#

probably related to the respawn packets keep meta data tag in the future

#

now I need to make this usable

wary inlet
#

good job !

wide maple
#

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'```
bleak current
#

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

sly crown
#

i have no answer but dang that's a well laid out question

lean gobletBOT
#

Yes, mysql would be better than pooping data around, especially as the plugin messaging stuff is known to be shite in general

sly crown
#

explicit about the x, but also lays out the current y and attempted solution + problems

bleak current
#

I asked it this morning elsewhere and got very confused responses, so figured I'd try my best to make it well explained

lean gobletBOT
#

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

bleak current
#

πŸ‘ 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?

violet saffron
#

Are you using any type of library?

bleak current
#

Not right now, but open to it

violet saffron
#

If not, check out IDB, it's a wrapper around HikariCP and has integration to Bukkit.

bleak current
#

Ty! Appreciated

lean gobletBOT
#

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

wide maple
#

woop 20w21a

#

it works

#

... though I am not fond of my nbt impl

#

sigh that cost some nerves

lean gobletBOT
#

judges

wide maple
#

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

lean gobletBOT
#

I was just joking ;P

civic valve
#

what are you using nbt for

lean gobletBOT
#

mojang

civic valve
#

thank u cat

#

v helpful ❀️

lean gobletBOT
#

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

wide maple
#

sender ID

lean gobletBOT
#

it shows in the hover afaik

wide maple
#

^^

lean gobletBOT
#

Used by the Notchian client for the disableChat launch option

#

o.O

civic valve
#

dimensions are sent in nbt?

#

tf

wide maple
#

well

#

blame mojang

civic valve
#

well yeah

wide maple
#

also side thing; github display is broken

civic valve
#

will md_5 finally consider consider nbt as part of the api this update jfc

wide maple
#

I can display my pr as if its a merged commit

#

also huge logo

bleak current
#

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

lean gobletBOT
#

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

wide maple
#

the only issue is that db cant notify

#

you could implement a communication using RestActions

lean gobletBOT
#

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

wide maple
#

Β―_(ツ)_/Β―

lean gobletBOT
#

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

bleak current
#

πŸ‘ ty guys

bleak current
#

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?

wary inlet
#
  • quality of life
  • safety
  • ease
  • async support built in
  • no cons
  • there are literally none
  • just use it it's great
bleak current
#

Ty

nocturne widget
#

Cons:
AbStrACtiOn

bleak current
#

postgres has listen/notify

#

;)

violet saffron
#

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.

bleak current
#

Try ServerConnectedEvent?

violet saffron
#

I think that's only fired after they actually connect.

#

I am controlling via a queue them moving around.

bleak current
#

Ahh okay

violet saffron
#

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.

bleak current
#

ignore me

violet saffron
#

/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.

stark bone
#

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

stark bone
#

Ah ok. Using "registerIntent" resolves my issues. I didn't realise that existed...

tropic steeple
#

Is there a way to make a plugin compatible with bungee/waterfall without having to create a bungee-version of my plugin?

violet saffron
#

Plugin messaging

#

But it is trash

#

Because it requires a player to be online the server

lean gobletBOT
#

really depends on what you want to do, lol

tropic steeple
#

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.

violet saffron
#

I don't think you can async teleport across servers

lean gobletBOT
#

yeah, just send the server connect packet and forward the location to the other server

#

(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

violet saffron
civic valve
#

LMAO

lean gobletBOT
#

wtf kind of browser do you have

#

lmao, jenkins is broken on mobile

#

gg

civic valve
#

what's new tbh

stone fiber
#

is he referring to the bad wrapping or the pony cartoon

violet saffron
#

The pony

shell lagoon
#

It's Pinkie Pie

#

leaves slowly

violet saffron
#

What

lean gobletBOT
#

.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..."

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 energetic and sociable baker at Sugarcube Corner...

shell lagoon
#

^

stone fiber
#

damn bronies

lean gobletBOT
#

( Ν‘Β° ΝœΚ– Ν‘Β°)

shell lagoon
#

It was research for FiM++!

#

Research that warranted watching six seasons and five movies.

lean gobletBOT
#

only?

shell lagoon
#

Yes, only

violet saffron
#

Okay I just found Stef

#

Stef = Josh

lean gobletBOT
#

mobile view is fixed now

#

or no

#

it isn't

#

meh

#

jenkins αƒš(ΰ² η›Šΰ² )αƒš

violet saffron
#

No it ain't

lean gobletBOT
#

not my fault so Β―_(ツ)_/Β―

#

that's what I get for using weeklies and not lts I guess

violet saffron
#

Bro just rid the pony

#

Notice how I didn't say ride

#

Rid

lean gobletBOT
#

nah

#

it's way too fun seeing people freak out about it

shell lagoon
#

Phoenix just wants some ponies

lean gobletBOT
#

I prefer llamas nowadays though

shell lagoon
#

A fine choice as well

potent lichen
#

Will ProxyServer.getPlayer variants return null if the player is offline or not found?

#

The bungeecord-api docs don't mention nullability :/

lean gobletBOT
#

yes

potent lichen
#

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

lean gobletBOT
#

iirc the reload event has a reason

#

or no, hm

potent lichen
#

it has a commandsender

#

perhaps the sender will be null if the event is due to startup?

lean gobletBOT
#

ideally you just use the reload event and properly handle the reload command too I guess

potent lichen
#

so I have to listen for the reload command, essentially?

lean gobletBOT
#

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

potent lichen
#

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

lean gobletBOT
#

there is

potent lichen
#

there's only runAsync, and schedule methods

#

The schedule methods run asynchronously also

lean gobletBOT
#

interesting, I could've sworn it had that thonk

potent lichen
#

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

lean gobletBOT
#

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 Β―_(ツ)_/Β―

potent lichen
#

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?

lean gobletBOT
#

probably depends on why it's deprecated

potent lichen
#

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

weary grove
#

Yes, you can use non-standard values

#

but the Bungee event system is total garbage anyway

potent lichen
#

why?

trail plume
#

for one, the fact that it has no support for subclassing in general pretty much blows for expandability

bleak current
#

and doesn't do proper reflection checks

wide maple
#

@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

bleak current
#

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

wary inlet
#

mikro owns people, you see

bleak current
#

want to be owned too?

wary inlet
#

uwu

glass horizon
#

do proxies even need to change for 1.16 or most versions for that matter?

bleak current
#

proxi do you need to change for 1.16

#

tell us

glass horizon
#

well proxi definitely has to

wary inlet
#

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

bleak current
#

~~private space intruder blurryeyes ~~

#

||hey proxi want me to intrude your private space||

wary inlet
#

you say it as if you don't sit on my lap every day

bleak current
wide maple
potent lichen
#

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.

bleak current
#

no

potent lichen
#

ok

#

i'll just iterate then

warped loom
#

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

trail plume
#

You'd just load the config again

#

bungee doesn't give you a config.yml

warped loom
#

oh man switching to BungeeCord config is confusing at the beginning

#

expecially since I have to load embedded resources with an InputStream

bleak current
#

How do I tell if a connection failed? Do I wrap connect() in a try catch or something else?

lament lagoon
#

Is it possible to have a Waterdog with multiple listeners, and separating Java and Bedrock players on different servers?

sly crown
#

go ask waterdog?

wide maple
#

@lament lagoon yea that’s the point

#

That’s also how the default config is laid out

lean gobletBOT
#

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?

trail plume
#

yes

#

well, iirc, yea

lean gobletBOT
#

I guess I'll know soon enough Β―_(ツ)_/Β―

trail plume
#

Yea, Downstreambridge, uses the server connection as the sender, player as the reciever

zenith raptor
trail plume
#

need info

#

e.g. logs

zenith raptor
#

sorry i just saw this

#

there seems to be no errors or even messages related to my plugin

zenith raptor
#

for waterfall do i need a different repository and dependency to make my plugin work?

warped loom
#

i might be dumb, but shouldn't it be 'bungee.yml'

#

instead of plugin.yml

zenith raptor
#

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

trail plume
#

plugin.yml and bungee.yml are both fine

harsh thicket
#

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.

stone fiber
#

getProxy().getPluginManager().registerListener...

harsh thicket
#

okay thanks πŸ˜„

stone fiber
harsh thicket
#

Hello Iam again. Pls can someone say me how i can look and do inventory stuff when i have the Waterfall plugin?

trail plume
#

inventory stuff is best done on the server, given that there is API for it

#

Beyond that, there are libs for this, but, πŸ€·β€β™‚οΈ

harsh thicket
#

but i want to do that i when i click a item i go to the server

trail plume
#

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

harsh thicket
#

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.

trail plume
#

You'd just get the user from the proxy, and the server you want to use, and use the connect methods

zenith raptor
#

What should I use in maven for the waterfall API?

bleak current
#

paper's repo

zenith raptor
#

ah ok

#

ty

harsh thicket
#

how i can do that when a player disconnect not in the lobby and he reconnect that he connect on the lobby again

lean gobletBOT
#

set force_Default_server to true

sullen trail
#

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

sly crown
sullen trail
#

Well their dev team isn't active.....and I know the plugin has been installed by others.......

#

their discord server just isn't active......

sly crown
#

that doesn't change the fact that this has nothing to do with developing waterfall/waterfall plugins

sullen trail
#

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

sly crown
#

the proxy is completely separate from the server

#

and even if it wasn't, this is clearly a help question not a dev question

sullen trail
#

Right but AsyncPlayerChatEvents a global method that lots of plugins use no

sly crown
#

...

#

holy fuck

#

you're beyond retarded

#

stop using the wrong channel

#

is that clear

sullen trail
#

If you can explain how my thought process is retarded

#

XD

bleak current
#

holy fuck

trail plume
#

Just...

#

FUCKING

#

LOMBOK

#

The plugin b0rk

keen cave
#

.lombok

lean gobletBOT
#

[03:01:27] <gabizou> fuck you and the lombok horse you rode in on

keen cave
tidal fog
#

how do you properly work with patch files?

trail plume
#

using the scripts, and a bit of git knowledge

#

the paper contributing guide goes over a fair # of the tricks and stuff we use

tidal fog
#

anything in the IDE to have some code indexing?

trail plume
#

you just open it as a standard IDE project after you've ran the script to apply the patches

slender grotto
#

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
lean gobletBOT
#

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

slender grotto
#

I guess I’ll just use that method then unless someone comes up with a better one. Ty

lean gobletBOT
#

the better one is using something like redis, mongo or even a pub sub setup to store/sync that kind of data

slender grotto
#

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

lean gobletBOT
#

probably with something like what I described

#

exact software doesn't really matter tbh, it all works

slender grotto
#

True

bleak current
#

redis is probably the easiest way to get it done tbfh

lean gobletBOT
#

I mean any key value storage works Β―_(ツ)_/Β―

bleak current
#

i've used etcd for that previously

#

mainly because i needed etcd in other places

lean gobletBOT
#

yeah, you usually just use whatever you already build other stuff on top

slender grotto
#

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

lean gobletBOT
#

isn't redis bungee a plugin? thonk

slender grotto
#

yes i just figured that out

slender grotto
#

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?

slender grotto
#

that doesn't do what I want, that does

#

so that's still just a map stored on each bungee instance

violet saffron
#

Okay but it's returning a player from a uuid, like you asked.

slender grotto
#

oh yea that’s my bad I should’ve clarified. I was adding onto my previous question

autumn mulch
#

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

slender grotto
#

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

autumn mulch
#

use Kafka then?

#

cross proxy cache

#

each proxy stores their players into a pool

#

and adds up to all players

slender grotto
#

are proxiedplayers specific to one instance?

autumn mulch
#

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

slender grotto
#

what about userconnection

#

or isn’t that the same thing

autumn mulch
#

they are all specific to one instance

#

just create your own like "SharedPlayer" instance and throw that thingy into cache

slender grotto
#

I could do that but I just can’t think of how to turn the serialized proxiedplayer into a proxiedplayer on another instance

autumn mulch
#

isn't ProxiedPlayer an interface

slender grotto
#

Yes

autumn mulch
#

how can u serialize an interface directly

#

;<<

slender grotto
#

i honestly don’t know :(

#

I cannot think of a way to do this

autumn mulch
#

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

slender grotto
#

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

autumn mulch
#

not possible

#

if it's possible then Hypixel would actually do that

slender grotto
#

how does hypixel do what they do then?

autumn mulch
#

each proxy has different connections

#

no? when Hypixel restarts one proxy it kicks all players

slender grotto
#

they have 45 different bungee instances

autumn mulch
#

in that proxy and then restart

slender grotto
#

oh...

autumn mulch
#

not sure if something like "BungeeBungeeCord" is possible

#

but that would just increase the network load :<

slender grotto
#

I have the resources for whatever but not for the actual thing

#

Well this turned out to be really disappointing

weary grove
#

@slender grotto You shouldn't use MongoDB anyway, it's an awful choice

wary inlet
#

Are Teams automatically sent to players when updated?

#

i.e. add/remove players to/from the team

trail plume
#

no

wary inlet
#

I guess manually constructing & sending the packets would be best for that then?

trail plume
#

yup

wary inlet
#

ah that sucks but oh well

slender grotto
#

@weary grove how come?

weary grove
#

many, many reasons

lean gobletBOT
#

it works when used correctly Β―_(ツ)_/Β―

civic valve
#

wdym! it's webscale and perfect!

wide maple
slender grotto
#

what do you recommend then

#

i definitely don’t want to use mysql

weary grove
#

PostgreSQL

slender grotto
#

ok I'll switch

warped loom
#

Yeah I started learning with POSTGRESQL as well

#

and had an overall good experience

lean gobletBOT
#

right tool for the task and all, if you need NoSQL then using SQL is just wtf

#

same the other way around

slender grotto
#

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

wraith idol
#

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

trail plume
#

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

wraith idol
#

ok so given I am checking a db then I should run async

wary inlet
#

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

lean gobletBOT
#

no, blocking the event thread for bans is not fine

#

use the intend system that AsyncEvents offer

trail plume
#

^

#

Those worker threads are use by the network pipelines, blocking the thread will cause noticable hits on other players

kind crater
#

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)

trail plume
#

something tried to send a packet over a closed connection

glass horizon
#

@kind crater

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)

glass horizon
#

you can run a bungee server online?

kind crater
#

online as in they're up and running
not online-mode

trail plume
#

can't tell you, all I can see is that something threw an exception around a closed channel

glass horizon
#

oh, right

kind crater
#

I found another part of the error, let me pastebin it

trail plume
#

protocolsupport threw an exception

kind crater
#

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 πŸ™‚

tribal jacinth
#

assuming you have plugins, the deciding factor is the api-version in their plugin.yml

stark bone
#

Is it possible to get the players skin texture from within waterfall?

#

like finding their game profile or something

lean gobletBOT
#

possible? yes. supported by the api? no

wary inlet
#

you need the proxy module of waterfall; that exposes the InitialHandler of ProxiedPlayer, which again exposes its login profile

stark bone
#

That's fine then, thanks anyway

bleak current
#

LoginEvent exposed that i think

#

or PostLoginEvent

wide maple
#

God heavens almighty

#

They changed the dimension registry again

#

1.16 is gonna be fun

night grotto
#

doesntreally concern me

#

them finally properly supporting multi worlds

spring bloom
#

they support multi world now? Pog

#

thank god

#

all of CB's hacks are around that are gonna be gone

civic valve
#

they use nbt too

#

maybe nbt is finally considered api

spring bloom
#

do you have any idea of how little that narrows it down

civic valve
#

huh

spring bloom
#

think I quoted it right

#

fuck

civic valve
#

quoted wut

spring bloom
#

SLIGHTEST idea

civic valve
#

am lost

civic valve
#

peepoHappy no idea what that is

spring bloom
wide maple
#

@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

night grotto
#

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

wide maple
#

I agree

#

I was expecting mojangson- thank god they didn’t

night grotto
#

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

wide maple
#

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

spring bloom
#

KEKWHYPER 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

vestal trellis
bleak current
#

pr

raw cosmos
#

gm

#

is there a way to force my plugin to load after a certain one

#

i have depend: [LuckPerms] in my yml file

trail plume
#

depend /should/ do that

raw cosmos
#

it doesn't uhh

vestal trellis
#

depends, not depend

raw cosmos
#

are u kidding me

vestal trellis
#

sadly not kazheek

raw cosmos
#

lol

#

well no change

#

LMAO

#

i think the LuckPerms API doesn't load in the onEnable

bleak current
#

it does?

raw cosmos
#

well then i shouldn't be having an issue like this

bleak current
#

i don't have any issues with luckperms myself

raw cosmos
#

ok

wild jackal
#

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)

trail plume
#

the command impl needs to be safe

wild jackal
#

aight, thanks

night grotto
#

everything about bungee/waterfall is concurrent. there is no main thread

wide maple
#

is there ANYONE here who knows how spectator mode works on the Notchian client?

lean gobletBOT
#

which part of it?

bleak current
#

clusterfuck

wide maple
#

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

sly crown
#

is this a proxy question

wide maple
#

yes.

trail plume
#

that would suggest that the player didn't get the entire set of state updates

wide maple
#

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

trail plume
#

correct IDs and stuff?

wide maple
#

yes.

#

Sadly.

trail plume
#

tried on a real server?

wide maple
#

Yes.

trail plume
#

info from both might be beneficial

wide maple
#

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

bleak current
#

for those people who don't want to download

wide maple
#

yea sorry-

#

from what Ive been able to tell the client checks isSpectator from tablist

#

but

#

the tablist shows my name as Italic

lean gobletBOT
#

I assume you compared that with normal spectator packets yet?

wide maple
#

so it should be correct-

trail plume
#

forgot we where on pre2

wide maple
#

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

trail plume
#

Damn, they went crazy from enigma

wide maple
#

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

tribal jacinth
#

don't worry, stupid is scarcely terminal

idle basalt
#

I'm kinda braindead atm, can someone explain how waterfall switches a player's server packet wise

civic valve
#

bascially pretends each server is a different world

idle basalt
#

Alright, thank you

keen cave
warped loom
#

that looks more like a spigot recruitement forum thing

winter sky
#

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