#waterfall-dev
1 messages ยท Page 4 of 1
wouldn't in.release() be better in finally block?
...
never mind
/me needs to make some coffee
think thats right. been deep in netty land for a few months now lol
ah lol
yea thats downside to doing this on a mac. no native impls, and they all expect direct buffers... but dont actually check ๐คฆ so easy to forget about em if youre not using native on your dev env
:p
basically one could add native support for mac as well
there's kqueue support in Velocity atleast
and native zlib
yea, the underlying raknet lib does have kqueue support. native libs.... idk why those werent done for mac yet
maybe another patch ill add
anyways, that seem to fix it?
lol alright, 2 simple modifications and now i have natives for mac
and it works ๐
:p
@bleak current just separated them into 4 patches (rename, osx native/kqueue, pe additions, pe modifications): https://github.com/yesdog/Waterfall/tree/master/BungeeCord-Patches
could definitely send the kqueue one upstream if theres any interest
might need to fiddle with it more. right now it just replaces the linux binary, so... probably not ideal lol
also broke modifications into its own patch, so you can see exactly whats being change there (and to help in conflicts, maybe?)
updated that patch. now does linux and osx
surprisingly easy overall
@lyric oak i'll make a pr soon to remove import statements :p
@ornate jasper just use https://github.com/yesdog/Waterfall and build like normal
@bleak current sweet, thanks! ๐
now thing is that....
ill keep the same patch structure
just add another remote in your .git/config for your checkout
i hate how github does forks. doesnt let you 'sever' them either
oof, just found out kqueue doesnt like having multiple channels on the same eventLoop
kind of necessary for bungee to tie upstream<->downstream
@lyric oak what do you prefer? I was looking into bitbucket and that seemed interesting
@bleak current thanks!
that applies on top of the repo directly
@vagrant marsh hmm usually just use to gist ๐คท
๐ hmm, should probably just merge it into my existing patch?
oh bitbucket lol was thinking of one of those other gist-like things
i like github the most, cause im used to it lol
I thought you were comparing github to other git repo services when you said you didn't like how it did branches
ohh yea forks, just weird github specific things i dont like
@bleak current having some ancestry issues. think you can push a branch with the exact patch set you have? need it so i can create the alternate ancestry
had this argument earlier in the paper channel lol. the 'work' git checkout needs to have both full ancestrys to do a proper merge else it all goes it shit lol
but just a branch of waterfall with the patch set is all i need, then i can build that as it is, get the ancestry, then copy the new patch and update my main branch
(made some script for this with paper)
๐
let me know if you've rebuilt/figured that out
i know why it throws dumb ancestor error on my side
(probably)
the kqueue patch :p
@bleak current merged and updated ๐ first contribution ๐ thanks!
hehe
and... probably removing the kqueu stuff anyways ๐ฆ bungee seems to rely on keeping upstream/downstream on the same event loop (same thread). kqueue does not like that
ping ping ping
I actually kind of want to move mcMMO to bitbucket but theres way too many forks on github I'd probably piss too many people off
ew bitbucket
idk it seems neat
its sexy in like... that "bar hookup" sorta way. github is the one you marry ๐
you should just move to a raw git repo on some shitty hosting site
who needs UI when you have ssh
:^)
lol
@lyric oak maybe can help but not right now
yea np, need to get back to work anyways
(i feel like electronic was about to tell me to ignore kqueue. dont worry, i did lol)
do have that patch for OSX native crypto/zlib tho (both linux + osx)
Don't know the technical aspects of kqueue or if there is any gotchas around that, really, but general performance improvements which are reasonably safe are welcome'd as PRs if you wanted ๐
i tried kqueue- issue is, bungee uses a shared eventLoop for upstream/downstream. the event loops get locked during listening, starves the other end ๐ฆ but native OSX crypto/zlib looks solid! will definitely submit that patch if it feels like a good addition for waterfall
It was low on my "todo list", being one of those ones which I only really use bungee on macOS for development stuff,changes I'd have to make to get it to work looks like exactly what you've got there right now
awesome! ill submit it. and yea, not sure about practical end use, but it definitely helps when developing on mac (actually uses the native classes, exposes any gotchas)
yeah zlib support would be great improvement very likely indeed
great!
Actually, one difference I was going to make, was to use the platform info in the include statement, I doubt that anybody has multiple platform folders there, but something I'd like to consider now
(Well, the header include flag)
in NativeCipherImpl.cpp ?
#!/bin/sh
prefix=
platform=linux
if [[ "$OSTYPE" == "darwin"* ]]; then
prefix="osx-"
platform="darwin"
fi
CXX="g++ -shared -fPIC -O3 -Wall -Werror -I$JAVA_HOME/include/ -I$JAVA_HOME/include/$platform/"
$CXX src/main/c/NativeCipherImpl.cpp -o src/main/resources/${prefix}native-cipher.so -lcrypto
$CXX src/main/c/NativeCompressImpl.cpp -o src/main/resources/${prefix}native-compress.so -lz
is what I scribbled together
oh interesting
hmm i just slapped all the includes and "-l" library link lines together. GCC seems to fail-succeed silently there
Yea, GCC will be fine, it's just one of those fun "what happens if we add more platforms" down the line
your method looks cleaner tho
ahh yea fair
ill add it in
can figure out the rest (if anything) during code review
hmm actually, might just be cleaner to do an 'if' block for each platform
at least so if somebody is trying to build from scratch, they're not looking around for libs that dont exist on their platform
what i have now id... " -lcrypto -lmbedcrypto". that might be confusing if you're pecking around for libs
I would honestly add a note of the required stuff in there anyways, people forget that stuff on linux too and install openssl
hmmm true
yea probably best to be verbose if its going to supported by waterfall
i know i already make enough work for you guys with my gripes lol dont want to make more gripes from the general public
ill get it all cleaned up and submitted near the end of my day (in a few hours)
@bleak current so did you actually try it out yet?
the bedrock support
yes
i sent few screens to ps discord
see #mcpe
needs further investigation on desktop
gonna get mcpelauncher up in few moments
nice
got a few fixes coming in a bit. gotta get through this next 2 hours of meetings tho ๐ฆ
(mostly a raknet throttling/backpressure fix, and a fix for vanilla command sending)
raknet should be entirely backpressure capable on both ends tho ๐ did some torture tests
also going to get rid of the forced server transfer feature (make it optional). i have support for the normal double-dim-switch transfer, just need to flush out a few things to make it work for vanilla
if you're in the PS discord, you've undoubtedly seen the horrors that have come with bedrock dimension switch ๐ค
i joined today lol
ah lol well, double-dim-switch is particularly horrible with PE... need to inject some packets after the switch, and need a wait queue on a confirmation from the client
its baked into PSPE and PSBungeePE, need to get the logic transferred over still, and find a way to make it work with vanilla
also, judging by your patch-fu, you're a capable developer? lol definitely looking for some more talent for PSPE
what does PS stand for in this context?
this waterfall fork will help there i think, one of the primary goals for this was to implement an introspection layer to help with packet analysis
PS = ProtocolSupport
we have a PE branch ("we", ive only been on the team for like... 6 months) that's actually impressively usable now
my raknet fork is forked from Shevs, and we have a bungee plugin that ive got updated, but then moved most of that code over to this waterfall fork cause im sick of working with bungee plugin-oriented hacks lol
aka- all of this is @real cave work that ive co-opted and turned into this lol
@lyric oak low interest/not enough time to help with PS(PE) sadly
fair enough. this waterfall fork is actually a breath of fresh air compared to working on PSPE lol. much... easier in the end
and it'll work for vanilla and 3rd party bedrock servers
@lyric oak option(network.ycc.raknet.RakNet.SERVER_ID, UUID.randomUUID().getMostSignificantBits())
why is that so?
can't that be sourced from uuid in config file instead?
what does that server_id even do 
that change is coming soon (default config values to unique server and client IDs, unless set during negotiation, or initialization via the bootstrap)
@bleak current so, the reason that exists (client and server ID) is so it can ignore conflicts during the UDP (non-reliable) connection sequence
once the reliable connection is established, its like TCP, where it'll quickly drop the connection if some sequence isnt correct
but before then, it needs a unique identifier so it can filter the garbage out. this actually happens pretty often
you can, it defaults to an empty metrics handler
epic
you dont want all of this tho???? ๐
(old graph, resend mechanics much better now ๐ )
(finally integrated some RTT stats, can basically guarantee a less than 10% now)
yea definitely understable. ill move that to a new module soon i think
hmm actually should probably be an event based API (to initialize a metrics logger), idk. open to suggestions
statistics?
yea, the metrics logger
eh, i'd make an interface and add new method what you can use to get/set the metrics logger
mostly just ephemeral work from trying to tune raknet. i am glad to say we can have people use 4G from overseas now without lag at least lol
by default stub implementation would be used, what does literally nothing
yea, it does default to the STUB if you remove the config setting
(just an interface impl with empty methods)
damnit
:P
y u gotta look at code >.<
PECompressor class
yea forgot about that. should be able to grab that from the channel config
yea damnit, ill need to put that in a plugin probably
which means i need to make an API ๐ก
easy
i know lol. just always hard moving from proof-of-concept to usability/interface
see: y u gotta look at code >.<
lol i know, and its much appreciated for sure. and i do plan to maintain and make this useable
and im glad you're interested and helping ๐
i'm just playing around for now
definitely a valuable stage of testing for sure
brew install libprotobuf ?
apt-get install libprotobuf? lol
actual reason for this error is that arch linux has updated protobuf library
and i have mcpelauncher build which was linked to older one
oof
might need to do a manual build, not too hard honestly. did that on osx before they had the pre-compiled bundle
eh, i have even bunch of scripts to continously rebuild packages and pull in the changes
wooo
finally
it's cute that 1.13 java edition runs 50-60fps
while mcpe runs full 60fps without drops
i know, its disgusting lol
there is something to say for the strict opengl rendering pipelines with C++
oh my, ps is in verbose mode or something
PS ?
ah, yea, theres a flag
defaults to 'on' for PS mainline (because inventory tracking still sucks)
damnit, cant find it now, but just search in files for "inv trasaction". theres a boolean you can disable
also wut
when i open furnace, another one spawns behind me
disappears when i close the gui
interesting hackery
in PSPE?
yea.... fake inventories lol
needs to be tweaked a bit, but basically PE only allows you to open inventories if theres a specified TileEntity (or entity) for that inventory
so fake inventory screen means... fake inventory in the world =\
also, mods and whatnot, let me know if you want me to move this convo out of here lol
its not really waterfall, its not really ProtocolSupport.... its just a lonely bastard of a project
(but it is directly waterfall adjacent ๐ค )
then i will dance my heart away until electronic bans me ๐
@trail plume do i need to tag changes with "Waterfall" in the native patch? (for the build compile script)
think it'll mostly be a rewrite, and so little code there to start with (plus its not really needed for the build chain)
waterfall - rewrite below to extend platform support
Just add that to the top, I guess; I'd rather have something than nothing, but for rewriting the whole file, ๐คท
sounds good ๐
also, how in the hell do i change my emoji gender?
๐คท i mean, im fine with a woman shrugging. but how do i change that lol
is there even a man shrug emoji
๐คท
probably not for discord
normally
๐คทโโ๏ธ
no that doesn't work
yeah discord just needs to update their lib
๐คทโโ๏ธ
go yell at them
kash and his graph paper
yes
whoa havent seen graph paper in years
noob cake
:(*
anybody know off the top of their head what debian packages are needed to compile the native part of bungee? wanted to just add notes about deps for each platform if possible
libmbedtls-dev and...
zlib-dev ?
That sounds correct
ahh chris, whats the... other popular package manager
yum, apt, and...
(ports... f that)
cant just cover package managers
I' just list the debian packages
have to cover distros specifically
It will generally cover other distros, beyond that, if you're using some niche distro, that's on them
yum is on fedora and centos and rhel but youre going to get different packages with even a few different names
well, and keep in mind, bungee does bundle the binaries in the repo, build steps only needed for the masochistic
you should just list what distros you do want to support and cover them specifically
debian and brew, done lol
I mean yeah thats fine, not like people cant submit a PR with arch packages and fedora and HannahMontanaLinux and etc
HannahMontanaLinux ๐คฃ i can only hope thats a real thing
why even fork ubuntu. ubuntu is basically just debian with "all the thing". why would you need to add more
well it was a meme
ohhhhhhhh for the memes
it just shipped with a wallpaper and some theme changes
its not like it was supposed to be maintained
doing it for the memes is acceptable
alright, osx native patch coming up
@trail plume did you delete the script blob you pasted earlier?
nope
did i hallucinate that? eh... fucking long week so far. can go over in CR
am blind and stupid lol
tbh, I did have to search for it, I did end up just not scrolling far enough \o/
same issue i have to go through at work- if its in a slack channel, i wont find it lol
and i nuked my changes in a patch set somehow, great
and something about this seems suspicious ๐ค
is there just more support in the darwin kernel ?
oh weird, b85
oh, is it doing static linking?
does that matter?
ยฏ_(ใ)_/ยฏ
(and that doesn't work)
hm
Oh, apple apparently doesn't support static linking, so people would have to actually install those
well, at least it'll safely fail with UnsatisfiedLinkError
I've figured it out \o/
mfw there's blobs in the source
botnet confirmed
ahh right, need to build against the *.a file. i tried that but didnt put in the full path ๐คฆ
binary blobs looks to be the right size now
jeeez
how the fucc do i make stack traces smaller?
almost fills up my whole screen
must be configurable from some property or something... feels like strictly related to JUL
Would be nice if we could hide netty lines yeah
There is a flag for setting how deep it should go iirc
yeah, but my google-fu seems to be broken today
1024 lmao
actually i kinda like a solution that normal mc server has
e.g ... 12 more
but feels like log4j is doing that
That's from other catches
%xEx{short} 
tfw my ASM patch did not handle exceptions properly
hey @trail plume you have time to review my pr?
Not yet, need to look into testing it with a few plugins I guess
fair
esp those ones that register custom packets
phoenix616's resource pack plugin was one iirc
[21:54:55 ERROR] [BungeeResourcepacks]: Protocol version 404 is not supported! Please look for an update!
no u
yeah dev build works
as i added backwards compat method which falls back to reflection
By the way, regarding multi-platform natives
Feel free to steal https://github.com/VelocityPowered/Velocity/tree/master/native - it's MIT licensed and is designed explicitly to support multiple platforms and architectures if desired.
https://snyk.io/vuln/SNYK-JAVA-COMGOOGLEGUAVA-32236 found in waterfall ๐ฆ might want to update guava
getting the snyk maven plugin going for my fork (cause of course it does nothing valuable with the regular github integration)
not sure if theres any valid vector, but... probably best to just fix it if possible
lool i think there is actually a valid vector in bungeecord for this. yikes maybe not directly
I don't believe that guava is used anywhere in waterfall/bungee that it's an actual issue
yep
agreed
probability of running into this issue is near to zero, considering what proxy plugins really do
@lyric oak One complication to updating Guava is that it'd break plugins
Does bungee not call superclasses of events?
I can't just listen on Event to catch all events huh?
@weary grove i put in a PR at the bungeecord repo. see what that fabled md_5 says ๐คท i know the attack vector isnt really exposed in bungee itself, but any plugins that might be using that installed version of guava could open up the vulnerability (which sounds like a full-on RCE)
Honestly, developers should just be shading guava in there themselves if needed
yea, fair
ViaVersion 1.6.0 exposes a deserialization
i dont think there was any breaking changes in those version of guava, think it just removed some already deprecated APIs. but... idk, ill let somebody above my paygrade figure this out ๐
@main plume ouch
removing deprecated APIs is breakage
its just accepted breakage
should just yank the whole dependency
I'd be surprised if md accepts your PR
yea definitely. its just there to raise the flag
0 expectation of it getting merged lol. but it puts it on the radar. that potential vulnerability is now actually exposed
@random token (putting it on your radar too)
that thumbnail
But it is not released yet
This wouldn't be a problem unless someone made it their own problem or used untrusted plugins in the first place
that sync vulnerability in guava
wtf is opennbt
was just wondering that ๐ค
It is a NBT library used by ViaVersion
why
what would possibly want to use this
custom tags? are they insane?
people literally only use nbt because we're forced to by the implementation
why would you want to take that further
if you have something that isn't natively nbt in minecraft, don't put it in nbt
opennbt.tag.builtin.custom
why is custom a subpackage of builtin
who designed this trashheap
hmm actually, i would be interested in switching over to a common NBT library
sick of seeing half-baked NBT implementations all over ๐
including my own
advertises https://github.com/KyoriPowered/nbt and runs
case in point >.<
although, yours is probably much better @lofty ridge
Kyori powered libraries are great I just wish they had README files ๐ฆ
hehehe
text has a readme!
That's the kind of readme i'd love on every project, sadly takes time of course ๐
agreed
I spend more time on actual code documentation, which is what people will end up seeing more often
even my shitty NBT library is better, and I made it only because of MCPE retardedness https://github.com/voxelwind/voxelwind/tree/master/nbt
wtf is up with opennbt lmao
oh well
eh, i wish that there was a better version of mcprotocollib somewhere...
but then again i could make my own by extracting data from wiki.vg 
i did have a script a few years back that just parsed the protocol wiki. was using Scala implicits and types so just had to produce a type signature for each one. hour or two to make the generator types, then maybe an hour of cleanup, then done lol
bedrock continues to just be based on mostly... mystery and bad disassemblies
lol and NBT libraries.... why are those not standard. ive seen like a hundred of them so far
their considered an impl detail
yea, kind of like the 1000s of versions of varint parsing
well, i guess when you throw on the signed versions and long versions, still ends up being a pile of 15 methods everything just has to copy and carry around
even signed varint :>
maybe 10, fine lol
still had to add all these to bungee: https://github.com/yesdog/Waterdog/blob/master/BungeeCord-Patches/0056-Waterdog-PE-modifications.patch#L167
write one method for long and cast
still need the special sign type, but yea... guess thats only 4 methods
but read and write for both
guess its still probably better to do methods per type in java, but yea guess you only need the 4 underlying methods
you misheard me you can do just wo
one for write
one for read
you just have to be careful with casting
here's an earlier version of what I did in C:
static inline uint8_t *rl_write_vsint64(const int64_t value, uint8_t *buffer_off, const uint8_t *buffer_end) {
return rl_write_vuint_max((uint_fast64_t) ((value >> 63) ^ (value << 1)), buffer_off, buffer_end);
}
static inline int64_t rl_read_vsint64_advance(const uint8_t **buffer_off, const uint8_t *buffer_end) {
const uint64_t u_result = rl_read_vuint64_advance(buffer_off, buffer_end);
const uint64_t sign = -(u_result & 1);
return (u_result >> 1) ^ sign;
}
I wrote my own mcprotocol or my bot anyways
ยฏ_(ใ)_/ยฏ
Though may swap out using OpenNBT for yours.
.g opennbt
(DiscordBot) https://github.com/Steveice10/OpenNBT -- GitHub - Steveice10/OpenNBT: A library for reading and...: "A library for reading and writing NBT files. Contribute to Steveice10/OpenNBT development by creating an account on GitHub."
the above discussion ain't really relate to bungee, etc; Only thing that's in c is the native compression/encryption "on supported platforms"
Is there also an extended API for Waterfall or can I still use BungeeCord without losing features?
Okay just included it, don't know if it has an advantage. Does someone have an idea how I can make a global tablist?
I've read about TabListHandler but it looks like it's not existing anymore.
how do you guys generate the patches without committing the files to the repo
We commit to the paper-* repos, and the patches are build from there
I forgot we were in the waterfall channel, btw, once we checkout the repos for waterfall and paper, we apply patches over the projects in a git repo cloned from upstream, to rebuild, we just rebuild all the patches from the last upstream tag
oh, didn't see the edit, that musta been why it skipped my mind to reply earlier
oh
Nothings changed there, really
You still need to have the server handshake with the client so that it will actually be sent iirc
Yes, just gotta handshake
There are plugins which do that already iirc
fuck no
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java18:1.0
[ERROR] /Users/mark/IdeaProjects/MikroCord/MikroCord-Proxy/event/src/main/java/eu/mikroskeem/mikrocord/event/MethodHandleEventExecutor.java:34: Undefined reference: void java.lang.invoke.MethodHandle.invoke(Object, Object)
[ERROR] /Users/mark/IdeaProjects/MikroCord/MikroCord-Proxy/event/src/main/java/eu/mikroskeem/mikrocord/event/MethodHandleEventExecutor.java:42: Undefined reference: void java.lang.invoke.MethodHandle.invoke(Object)
bruh
what's wrong with animal sniffer
<ignores>java.lang.invoke.MethodHandle</ignores> oh well
Did I disable animal sniffer or leave it on?
Ah, I went for the "enable until it breaks" route
i saw an issue about it as well on animal sniffer plugin
they don't handle @PolymorphicSignature (or w.e it was) properly
ah, nice
.g animal sniffer methodhandle invoke
(DiscordBot) https://github.com/mojohaus/animal-sniffer/issues/18 -- mojohaus/animal-sniffer: "Feb 15, 2016 ... When compiled, calls to MethodHandle.invoke and MethodHandle.invokeExact ... This causes false positives, i.e., animal-sniffer..."
yes this
Yea, I did a quick google and just rip
only diffference in the protocol between pre5 and release
Yea, I know, It's just not a super imminent "going to spend my time on it right now" kinda thing
+ ./waterfall p
/tmp/jenkins8432707758741345219.sh: 3: /tmp/jenkins8432707758741345219.sh: ./waterfall: Permission denied```
anyone know how to fix this
lol
/tmp needs to not be mounted with noexec for that to work
apparently i commited the file with wrong permissions
git add --chmod=+x waterfall fixes it if somebody has the same issue
Getting this error with bungeecord api, no idea why [00:54:27 WARN]: Error dispatching event PostLoginEvent(player=SeaAnimal) to lis tener org.mineguild.BungeePlayerList@107f4980 java.lang.IllegalStateException: Subject class class java.util.UUID is not assig nable from interface net.md_5.bungee.api.connection.ProxiedPlayer
Will post code in a second, but I'm just calling <ProxiedPlayer>.getUniqueId()
So uh...any ideas?
it wants a ProxiedPlayer, not a UUID
Wait, no, it's apparently expecting a UUID, what line does that exception come from?
Oh, good call, it's coming from Contexts contexts ...
Which takes an Object as its argument not UUID
Lol. Yeah you're right -- took a look at github and the BungeeContextManager implementation wants ProxiedPlayer. Thanks ๐
Also my b for copy pasting the code from a spigot plugin
There was Orion for mixin loading in paper
^
But, it's not going to work for standard spigot
You need something that can actually hook in and transform classes before plugins are loaded
Someone have an idea how I can modify the tablist? Adding/removing entries?
Because seems like there is no TabListHandler anymore
Thats for tab complete? Isn't it?
I mean the player list.
Yup
network packets I believe
Hm
don't know if an API exists for it
Haven't found one
I'm not familiar with waterfall so maybe there is
So I hoped someone here knows
Didnt you asked before and got told to just to use btlp
Yep I took a look in it. But I don't like it.
I've already a tablist module in my plugin but it's only paper atm.
I want to extend this to waterfall.
you'll probably need to dig it yourself then
Sure, but any help is appreciated ๐
Said that because i dont think anyone here really has experienced with tablists in waterfall
Okay ^^
probably not too different to doing it outside waterfall, a bunch of network packets to get what you want to show
Okay I've got an PlayerListItem now, but I don't know how to send it XD
I'm sure theres something wrong with that code:
PlayerListItem playerListItem = new PlayerListItem();
playerListItem.setAction(PlayerListItem.Action.ADD_PLAYER);
PlayerListItem.Item item = new PlayerListItem.Item();
item.setUuid(UUID.randomUUID());
item.setUsername("Username");
item.setDisplayName("Username");
item.setPing(20);
PlayerListItem.Item[] playerListItemArray = {item};
playerListItem.setItems(playerListItemArray);
for(ProxiedPlayer proxiedPlayer : ProxyServer.getInstance().getPlayers())
{
proxiedPlayer.unsafe().sendPacket(playerListItem);
}
This kicks me with this stacktrace: https://hastebin.com/ojadicaqod.bash
87 would be your propeties
You basically need to fetch their game profile as you'll need to send the client their game profile
Uhm what??
The player list item contains the users game profile
So when I use the example with my users data it should work?
if done properly, yea
PlayerListItem playerListItem = new PlayerListItem();
playerListItem.setAction(PlayerListItem.Action.ADD_PLAYER);
PlayerListItem.Item item = new PlayerListItem.Item();
item.setUuid(ProxyServer.getInstance().getPlayer("Rasre").getUniqueId());
item.setUsername("Rasre");
item.setDisplayName("Rasre");
item.setPing(20);
PlayerListItem.Item[] playerListItemArray = {item};
playerListItem.setItems(playerListItemArray);
for(ProxiedPlayer proxiedPlayer : ProxyServer.getInstance().getPlayers())
{
proxiedPlayer.unsafe().sendPacket(playerListItem);
}
Is this properly? Because I also get kicked ^^
Do I need to query this properties from the API everytime or is there a method getting it from waterfall?
Waterfall doesn't care about that, only place you'd get it from is if you was to intercept the player list packet from the server
So when the player joins I need to catch that packet and store it so I don't need to ask mojang again?
It's pretty much either that or query the API or use some 3rd party API for it
Okay, sounds good. Do you know if this information is in any login event?
Hmm okay
I'm just setting up a new jedis module in my plugin. Btw: I've never used jedis before. So what could be good values for the connection pools min/max connection when I have about 100 gets per second?
I don't use Jedis on plugins but I use it on another software (MMORPG server engine)
This is my JedisPoolConfig:
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setTestOnBorrow(true);
poolConfig.setMaxIdle(maxConnections);
poolConfig.setMaxTotal(maxConnections);
poolConfig.setBlockWhenExhausted(true);
poolConfig.setMinIdle(maxConnections / 4);
poolConfig.setMaxWaitMillis(2000);
and maxConnections is set to 10
Wait
these are connections shared by the pool
A connection can handle a lot
without being actually blocked
128 seems a lot to me
make sure you don't make anything lag
I mean
You can set the max to 128 as long as you configure the setMinIdle properly
the setMinIdle is the number of connections that will always be openned
I set mine to max divided by 4
^^ It should scale up or down, but 128 is overly excessive
I mean, he can runs on 128 but set the minIdle to 128 / 6 at least
No idea if redis enforces a connection limit by default, but that's how you hit the connection limit if there is one
no
default redis clients limit is 10000
But you still don't need that much for one program
I mean
128 is okay for the jedis pool as long as the minidle is configured properly
that's it !
@bleak current
that was supposed to go in help tho
๐
What should the minidle be for that?
I don't know the data you transfer
is it constant all day ?
Do you have 100/s redis get all day ?
Nope
With no players there are no gets
Is 100/s your maximum ?
I plan having 10 gets per player
10 gets per second per player ?
๐ค
Yes
Can I know why if I'm not too curious ?
Uhm
Thats just a number
I want it to handle
hmmm
It's not the real amount atm xD
Keep the setBlockWhenExhausted on true
Have this
If you see any jedis exception, then your pool is too weak
Keep the config I gave you
It should work
That's still 32 minIdle
That's completly fine
Okay :)
But wait
You should make sure your redis server don't timeout
the clients
I'm using the default redis config atm
because if you have 0 players during the night and they come back after tomorrow, you may have dead connections
and I'm not sure at all
if the pool renews them
ยฏ_(ใ)_/ยฏ
I'll see when its in use :D
oooh no
I'm saying shit
setTestOnBorrow is on true
it make sure the connection returned from the pool is valid
Okay
You should keep this holy gist in hand
it explains some of the pool configuration
and good practice
there's a section about Jedis Java Client
๐
Aww nice
Thank you
np !
Someone already have seen this?
I've just used sender.getDisplayName() + " ยง8ยป ยงf"
Thats the same thing I did when using maven to compile. Is gradle changing something there?
it has something to do with encoding. it's not related to waterfall though.
Also it's advised to not use ยง in code but rather use the value provided by enum or method for color code translation
Yeah sure it has nothing to do with waterfall explicitly, but I'm using it in waterfall rn :D
I tried ChatColor which worked fine for the colors. However the ยป still got this "A" before.
So I would prefer fixing the encoding if it's possible.
compileJava.options.encoding = 'UTF-8' fixed it for me. But yeah, you're right. I'll change this to an enum ๐
yeah I guess it happens because of encoding of source files
Yup
I'm creating a chat system now:
// Create the finalMessage
ComponentBuilder messageBuilder = new ComponentBuilder(new TextComponent());
// Check if this is a global message
if(message.startsWith("@"))
{
messageBuilder.append("[").color(ChatColor.DARK_GRAY).append("@").color(ChatColor.GRAY).append("]").color(ChatColor.DARK_GRAY).append(" ");
message = message.substring(1).trim();
recipients = ProxyServer.getInstance().getPlayers();
}
// Define the player component and append to text
TextComponent playerNameComponent = new TextComponent(TextComponent.fromLegacyText(sender.getDisplayName()));
BaseComponent[] playerNameHoverComponent = new ComponentBuilder("Klicke hier, um " + sender.getName() + " eine Nachricht zu schreiben!").create();
HoverEvent playerNameHoverEvent = new HoverEvent(HoverEvent.Action.SHOW_TEXT, playerNameHoverComponent);
ClickEvent playerNameClickEvent = new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + sender.getName() + " ");
playerNameComponent.setHoverEvent(playerNameHoverEvent);
playerNameComponent.setClickEvent(playerNameClickEvent);
messageBuilder.append(playerNameComponent);
// Append the separator
messageBuilder.append(" ยป ").color(ChatColor.DARK_GRAY);
// Append the message
messageBuilder.append(new TextComponent(TextComponent.fromLegacyText(message))).color(ChatColor.WHITE);
// Create the message
BaseComponent[] textComponent = messageBuilder.create();
// Send the message
recipients.forEach(recipient -> recipient.sendMessage(textComponent));
The message looks good. However the click and hover event I've added to the players name is on the whole message.
Is this because of the ComponentBuilder? Is it possible to send a message where the events only apply to the name?
iirc, append will copy over any existing formatting/events
Hm is there a way to reset this events?
null
Tried this, but IntelliJ doesn't like this ๐
You can set the hover event of later compontents to null
you need to cast
Yea, you'll need to cast to hit the correct method
Or, use the Kyori text lib
It's like, not stupid
:D
waits for the day it gets built in to both paper and waterfall
that way I donโt have to do conversion magic anymore
hm?
Bundling stuff like that into other APIs just sucks, because now other plugins are stuck to the version you bundled in, and it also means that we have issues should the library ever break ABI compat
The good news on the other hand: https://github.com/KyoriPowered/text-extras
text 3.0.0 releasing soon with quality-of-life improvements, 1.14 component support, and moar
soonโข
Someone has an idea how I can create this array in java?
I tried this but it's probably wrong:
String[] property = {"textures", "eyJ0aW1lc3RhbXAiOjE1.....", "iw1zeZuR5+ey...."};
item.setProperties(new String[][]{property});
You can take a look what's required in the source
try using guava multimap tbh
or Map<String, List<Property>>
where Property class has those fields
line 41 in there too
I ordered the players with paper using teams. For example a team name beginning with A is on top.
Now I'm using fake uuids added to the tablist on waterfall.
Someone know if I can also add this fake players to a team?
Yes, you can
So I just use the username I used to create that Item?
I wanna say that scoreboards actually use UUIDs, but I don't remember
:/
Oh, no, it's not
Identifiers for the entities added. For players, this is their username; for other entities, it is their UUID.
Uhm where do you find things like that??? ๐
Ok, I'll try this, thank you again ๐
I created a new team, set a suffix added it to the players scoreboard and tried both adding the fake entrys uuid and name. But nothing happens. No suffix, no sorting :/
when will the persistence package be merged into paper?
@night grotto
org.bukkit.inventory.meta.tags is mostly depricated
after doing some maven magic I can't seem to access anything in the persistence package. probably because it is not included
oh fuck
wrong channel
I saw -dev in the channel name and clicked on it without looking
my bad
Hey, someone has an idea why this is not working?
@EventHandler
public void onPlayerJoin(ServerSwitchEvent event)
{
System.out.println("ServerSwitchEvent");
Team test = new Team("Test");
test.addPlayer(event.getPlayer().getName());
test.setColor(2);
event.getPlayer().getScoreboard().addTeam(test);
}
I can see no color in the tablist
The BungeeCord (and by extension, Waterfall) scoreboard isn't hooked up to anything - the scoreboard really only exists for tracking purposes for server switches. You'd need to actually send packets directly.
Ah okay. Do you know how to send the team packets?
You would need to depend on some of the proxies internals to create the needed packets and access the methods to actually send them
Ooff, maybe theres a better way for sorting the tablist instead of with teamnames?
Thats the only reason I want to use teams
This is what I get when I use this code:
net.md_5.bungee.protocol.packet.Team team = new net.md_5.bungee.protocol.packet.Team();
team.setName("Test");
team.setMode((byte) 0);
team.setDisplayName(ComponentSerializer.toString(TextComponent.fromLegacyText("Test")));
team.setFriendlyFire((byte) 1);
team.setNameTagVisibility("always");
team.setCollisionRule("always");
team.setPrefix("A ");
team.setSuffix(" B");
team.setColor(2);
team.setPlayers(new String[]{event.getPlayer().getName()});
event.getPlayer().unsafe().sendPacket(team);
Something send invalid json
So the packet was sent but the client has some problems with it
Take a look at the field types
Prefix and suffix must be JSON chat components.
Worth noting that that is also version specific, so you'll have to deal with that fun too
And if you do multi-version you need to deal with any differences.
"Prefix and suffix must be JSON chat components." where have you found that?
I don't need multiversion at the moment
It tells you the field type used for something in the protocol docs
If you need to handle currency in your plugin what do you use (public plugin)
if you want maximum compatibility
just use the vault API
it abstracts all the economy plugins
oh wait this is the waterfall section
wrong channel
nm idk
discord is small rn
heads up there is a 1.14.1 prerelease, fixes that awful chunk loading bug
don't know if yall tend to worry about experimental type builds or not
[ERROR] /home/libertyland/Waterfall/Waterfall-Proxy/protocol/src/main/java/net/md_5/bungee/protocol/packet/PluginMessage.java:[53,5] <anonymous net.md_5.bungee.protocol.packet.PluginMessage$2> is not abstract and does not override abstract method test(net.md_5.bungee.protocol.packet.PluginMessage) in java.util.function.Predicate``` 
https://github.com/SpigotMC/BungeeCord/blob/master/protocol/src/main/java/net/md_5/bungee/protocol/packet/PluginMessage.java#L53
where is that even coming from =\ i have never seed a ::test method on any DefinedPackets
Wrong import
yesdog moved properties around.. i had them on a bad place... also i was building with java 7 idk why
Hello why i don't have any color : here
nope
transfer uuid
I'm going to make a queue server with waterfall and a queue server (spigot)
and queue players to other bungeecord sever(online)

i succeed with offline mode
still don't understand what you mean lol
I use that code to connect any other bungee server
then it showed me this
(Bungeecord online mode is on, and ip forward is on, spigot bungeecord is on and online mode is off)
Its clearly not
yeah lol, double check that online-mode is false in server.properties
Its possible if a player is on X server inside Bungee, send it to Z server without using message Channels?
From bukkit? Dont think so
Or maybe you can force them to run a command
but, plugin messaging is really easy
specially with the wiki example
I mean, its easy
But im making Server GUI using Server Pinger and i dont wanna relly on Messaging just for sending
You have to communicate to the proxy somehow, plugin messages or a messaging service like rabbit or redis are going to be your best alternatives
So what happen if i send the required packets for logging to other server?
I know is harder, but idk
On a local waterfall server a plugin I'm writing works fine but when it gets run on the prod server were getting this error https://pastebin.com/Ta6dtpRq
Is this because of the java version? (openjdk:8u201-jre-alpine)
error is happening when the plugin calls event.getPlayer().disconnect(reason) during PostLoginEvent
show your code
its fixed. was java version
heads up 1.14.1 is officially released
heads up you're hours late to the party
ill party when its ready ๐
hey! is already there a waterfall 1.14.1 version?
No
If somebody wants to submit a PR I'll happily consider it, but I have no interest in digging down on a patch that will be removed in a day or so
why will it be removed? sorry if it is a stupid question
because bungee will update, and waterfall follows upstream
can't wait for this update, man 1.14 has sucked with that stupid rendering issue
why would mojang even put out that turd..
okay, thank you sir @sly crown
Why do you use 1.14 on a production system? ๐
Self hatred is my guess
from what i hear 1.14.1 didnt even fix a a few important things?
tbh they probably just wanted it out the door ASAP to fix the game-breaking stuff
expect 1.14.2 soon

they already said that
just do it right the first time 
That would be ideal, but pushing out smaller incremental updates is still better than pushing out a bunch of big updates which take longer.
Esp for a project like Paper which has to rely on upstream ๐
Yea, smaller incremental updates allow for easier testing, e.g. you can focus more time on testing a particular mechanism vs dropping a huge set of features/fixes which only a small % will seek out or progress enough to; it also means less changes to have to merge in, which would be nice
waterfall 1.14.1 when?
Scroll up and read
i wonder when devs here finally get sick of those eta questions
or they might be already 
pffft
โWhen itโs ready.โ Not a good answer tbh, but itโs the right answer. Iโd rather wait and have a stable release when itโs ready.
@fringe aspen your PR is just an upstream merge right (havent looked)
and I assume its been compiled and tested once?
yep
โค
not building urself
๐ฎ
Anyone requesting an ETA will be fed to goblins.
pulled, thanks
message in #-help on build
elcontroniccat wont be happy

will it pass..
@fringe aspen update your git client too, while you're at it
WOOO
that used a merge commit not a rebase
fuck
hide me from electronic pls
wish GH remembered that globally instead of per-repo

praise github for adding this though http://up.theminecoder.me/54dfa8d37357/Screen Shot 2019-05-14 at 12.57.37 pm.png
yeah it makes cleaning up so much nicer
finally no more 1 branch forks for prs ๐
no more going back months after and cleaning up forgotten and abandoned repos
Sending the ScoreboardObjective packet causes this.
Tried around a bit but could not identify the issue.

I am not sure if this is the right place, but I would like to put in a request. A lot of people use Multicraft nd one of the biggest complaints is that Multicraft doesn't have a way to reconfigure the stop command for the buttons and also continuously issues the list command, Waterfall could distinguish itself by simply making stop an alias for end from the Waterfall console only, and perhaps also return something for the list command. Then you could say it supports Multicraft. Just a thought.
You must mean Multicraft
oh yeah,. let me fix that
MultiMC is a launcher for the Minecraft client
There exist plugins to make Multicraft cooperate with BungeeCord, but I don't see special Multicraft support going into Waterfall any time soon.
Multicraft is horrible.
It is, but it's well established, and I have a 10 server license, so I keep using it.
Pterodactyl is much much better.
I have some running under that as well. I tried pterodactyl, seems to be that I recall it having to run it as the root of the web server with / instead of with say /panel or something like that.
I suppose I could just add a subdomain and have pterodactyl be the root of that.
but we're doing a really sick Minecraft setup under Kubernetes so ๐
nice
The way you run Pterodactyl is ideally through a subdomain.
I'm not allowed to share many details, but there's a lot of custom code that keeps things chugging nicely.
heh, i went on with running servers in tmux pretty much as well :D
well my server launcher wraps tmux
tmux runs on absolutely minimal configuration
it's simply for backlog etc.
There was some consideration to have waterfall accept stop and maybe list from the console, but that is somewhat eeeeh
Couldn't a plugin easily do it if people really wanted? ๐
Guessing a simple plugin that handles /stop and does getProxy().stop().
ye plugin can do that fine
but bungee has been around for a while, multicraft def has premade configuration for bungee already
so why not use that? 
I just use docker-compose for all of my servers, makes it super easy
would probably expand into k8s if I was using multiple hosts but I'm not quite there yet
What do you do about the proxy, or do you config that manually?
when i was playing around with dockerizing bungee then i made a custom config adapter to load config values over http
hence i also made an issue about those configuration adapters
well, almost a year later :D
or is it two now? 
Woop woop 1.14.2 ๐
managed to get one of the commits \o/
uwu
@dreamy minnow yes, prelogin
or for waterdog in the IdentityManagementEvent is also an option
is it possible to dynamically add and remove servers with a waterfall plugin
yup, you can modify the servers map
yeah, you can take a peek into BungeeServerManager (on spigot https://github.com/tavonkelly/BungeeServerManager), that should give a nice starting point
cool, thanks
I use pluginmessagelistener for the javaplugin, should I also use that for the bungee plugin?
Hi guys- a few of my players are having an issue with 'Encrypting' taking quite a while on connection. Any ideas as to why this is? Also, is this only me or is it widespread?
I put my message in whichchannel ?
This channel is for waterfall, not paper
can ObjectOutputStream be used with the plugin messaging system
you can send literally whatever bytes you want as long as the client knows how to read them
No
@bleak current yes
Oh no, Java serialization...
yikes
iirc Macro/Keybind mod used java serialization
to get permission data from server
mmmmm.... tasty security hole
holy shit. does the "waterfall" name come from the Waterfall development patterns?
That'd probably be a tux question
i just attributed this pattern of adding features as "waterfall" and i almost crapped myself
Yep, it's a question for me. I think I got it from "bungee cord" (jumping from a high distance) and going with the water theme that's so common these parts. A waterfall, obviously, is a stream of water usually coming from a large height. That's where I got the name.
so what i'm hearing is we dump all the players into a blender and liquefy them
ghh i wish to blend players sometimes ye
waterfall is actualy when new fork geting born (drunk)
Guys, is the current 1.14.2 build stable enough to run as a multiplayer vanilla server?
Whoops, wrong channel sorry lol
t
test again,
test again!
oof discord broke
123
final test should work
right here
message
wzrd
wzrd
wzrd
clap
wut
how do i add papermc api to my build.gradle?
You mean paper's API? You'd want #paper-dev not waterfall, and info is basically on the github readme
dangit, hit the wrong channel my bad
Hello can i post here an announce to find someone who can help me with my modified watterfall to paid ?
if you pay well then you might as well dm me
doesnt bungee already have a bossbar api? (@ ivans bossbar pr)
well, if his pr gets accepted then waterfall can be advertised as a proxy with two bossbar apis
think about it @bleak current
more apis, more users!!
๐
There is a plugin for it afaik, not too sure what bungee itself has but it wasn't fully fledged
oh ok
I'd like to accept players when there are no online Paper servers. So they join into darkness I guess. How could I do that?
Uhm, anything with the BungeeCord API?
Can anyone help me out with trying to send a player to a different server from a Paper server? I tried following the docs on Spigot with the PluginMessage stuff, but it doesn't seem to be working.
I think you can send the player a message or something.


