#dev-general
1 messages · Page 346 of 1
not bad
I'm not sure if It's efficient
player_list though breaks conventions btw
and just wanna get you out of bad habits now if I can, naming variables things like p and loc doesn't look very nice imo, and isn't always the best for readability
good good
however, I guess It's a bit unfair for a challenge, since the column gets destroyed instantly, haha
I'll try to do a timer, so the blocks can dissapear one at a time, at a fast pace
do you guys know if java has a function like "sleep()"
that is, It stops the thread for a couple miliseconds and then continue?
Thread.sleep, though it is blocking obviously
oh, It makes sense
so, if my thread is supposed to execute every 5 seconds
but the thread itself takes 8 seconds to execute
it wont work as I intended, right?
yeah, yeah, no prob
wait
idk what you mean
do I call the thread in async?
BukkitTask taskPrincipal = new BlockMisser(this).runTaskTimer(this, 0L, 10L);
mine is currently like this
oooh
you don't want to sleep the main thread (use BukkitScheduler)
all right, thanks
yeah never sleep the main thread
^
so like ```java
Bukkit.getScheduler(this, () -> {
System.out.println("hi");
}, 20L);
a lot of games run their logic on one thread
games
yes
goroutines I can't comprende but they are seggc
they are beyond mere human comprehension
Good evening does anyone mind just helping me out quickly about litebans material?
Noted
Im currently getting an error on line 430 for the argument foreach() just wondering if there was a fix for this?
Is this a development question or?
not currently but was going to bring up after my appoligies!
@ocean quartz I found why it wasn't granting the format properly, you forgot a . in the permission, it's triumphchat.chatformatdefault
https://i.imgur.com/bqCSeA8.png boi we got console input working
That #4 :moan:
Frosty please keep your calm and do not, i repeat: DO NOT open #816184749752188958
Omg
Weird, because i gave the dot
I should have listened
also, tell them to delete the other request whilst they're at it 
that latest abomination lol
yeah
I don't wanna spoil it for those who haven't already lost faith in humanity from this server xD
lmao
i feel like the terrible plugin is at the point where it has so much stuff that isn't even worth calling terrible because its impressive how its not just shitty
but how much it breaks the server
lmao
🙂
yeah I guess we made it do terrible things but not with terrible code
we're literally using reflection to get the server
i dont think a beginner even knows how to do that
xD
oh btw, are event priorities a good idea to add?
we should have just made it in Sk**** xD
omg yes
yeah for formatting
formatting?
also I keep saying we but all I did is tell people that they moved when they move xD
actually, wouldn't priorities compromise the extensibility of the event manager? since it would know about its listeners
debug and see what that prints out
still trying to figure out how to write a file to META-INF in Gradle
actually hold on a minute
okay yeah I'm officially stupid
Took you long enough to figure that out smh
took me long enough to figure out that I just had to make a folder in src/main/resources called META-INF and put the file in there yeah
oh btw, logging to files is now a thing
oh also, would anyone know why it still seems to create the data folder in the root directory rather than in the plugins folder when I use File(pluginsFolder, description.name) (where pluginsFolder is File(ROOT_FOLDER, "plugins") and ROOT_FOLDER is Path.of("").toAbsolutePath().toFile())
it's really weird, since it's able to create that directory and walk it just fine, but it still seems to create the folder relative to the root rather than the plugins folder
what's wrong with that lol
looks so wrong idk lol
I mean, yes, it's a bit messy, but it works lol
anyone have plugin for open door with right click ?
iron door*
That's how you make an motd :kek:
ewwwwwwwwwwwwwwww
ok ..
second line is what matters
wait did you find a way to change the MOTD on refresh?
actual player count
I mean can't you just use the ping event for that?
probably
Sir this is #dev-general
Sir this is #dev-general
Sir this is #off-topic
I think event priorities are pretty important
yeah they are, not sure how I would do them though
update with command dispatching has just been rolled out btw
also, there isn't even any events yet anyway lol
probably gonna add those now
@prisma wave you know a way of doing event priorities with my current reactive setup? or are they pretty much impossible because I have no record of the listeners
Is that channel true for asking an error about building a server software?
what?
please do 🙂
I downloaded a GitHub repo or something else, I don't know what are you calling that
than it says "download maven and git" in that page
I did
than it said "use ./sportpaper build" to build that server software
so I did
and I got an error
what is the error?
liking the Linux 👌
what
okay, so it's looking for things that don't exist
hmm
Priorities don't really make sense if everything is immutable?
yes I decided that too
very valid point (@heady birch)
Bukkit priorities be like: Oh? You're supposed to be of high priority? Go to the back of the queue, PEASANT!
Lmao
so what should I do 😄
make sure you're cloning it properly I would say
I just did 😐
oh btw, anyone got any idea how I should do cancellable events?
since atm, isCancelled is mutable (it's @Volatile)
should I store the event and then check if it's been cancelled after I call it?
though that could cause race conditions, since multiple plugins could receive the event from the flow at the same time and write different values
yeah no with that model there is no way to await plugins' responses to events
volatile does not avoid race conditions at all
Oh nvm I forgot what a race condition is lol
uhhh
it prevents threads from interleaving and ensures a before and after relation on a field
vroom vroom
The race condition here is in the design
you'll have to find a different way to handle this
Yeah
the problem is that there is no coordination anymore
and to coordinate you have to take time into account
Take some time to think this through
What does it mean to receive an event in a minecraft server and what does it mean to cancel it?
Well, what you have, in essence, is actually two different, separate actions
- the server receives the event
- the server sends a response in some way to realise the effects
now, if everything is asynchronous and we use Flow, we can't just put the plugin inbetween and have it be responsible for both ends
You somehow need to make an extra, synchronous hook, maybe separate
yo, I'm trying to get the entity that was damaged, using the event "entity damaged by entity"
I know how to get the damager
how can I get the damaged?
getEntity afaik
oh, nice
@NotNull
public Entity getEntity()```
Returns the Entity involved in this event
Entity who is involved in this event
d;spigot EntityDamageByEntityEvent#getEntity
@NotNull
public Entity getEntity()```
Returns the Entity involved in this event
Entity who is involved in this event
hello humans
hello homo sapien
any nginx gurus out there to tell me what i'm doing wrong here?
the goal is to display an image when someone visits https://example.com
server {
listen 443 ssl;
server_name ~^example.com;
ssl_certificate /etc/nginx/ssl/example.com.cert;
ssl_certificate_key /etc/nginx/ssl/example.com.key;
location / {
try_files /data/test.jpg =404;
}
}
the /data/test.jpg exists in that location, and ssl works
do u own example.com?
i own the site that i am actually trying to display the image on
just use an index.html and have a body that is just an image tag
that would be much easier
;-;
well i suppose that's what i'll end up doing
but is there not a way to have it straight up display the image, without an html file
I'm sure that is
but to be frank
that would be odd
u can just do a normal nginx config
and in the default pages list thingy
but the image b4 the others
so it prioritises that
I cant tell ya how specifically
I forgot lol
xd all good, i'll look into default pages
thank you 😄
(and i'll probably still end up using the index.html)
i.. set the image as the index.html
root /data/;
index test.jpg;
victory is mine!!1
yo
I'm trying to create a task, like this:
BukkitTask taskPrincipal = new coolDownHealWeapon(this).runTaskTimer(this, 0L, 10L);
however, I'm not on the main class
Isn't it right?
CoolDownHealWeapon
upper camel case for variables
for class names its different
all words are capitlized
oh, makes sense
but, for my problem, how should I pass the parameter for the construction? I assume that, because I passed "this", I'm passing a variable which is an object of my class
However, It's giving me an error, on "this", that says: "Required type: Plugin, Provided: Protetor"
Protetor is my class name
I don't really understand why It requires "Plugin", since on my constructor, I have a Protetor
You'll need your plugin's instance, so you'll need to use dependency injection to get it
^
when you use this, you are referring to a current instance of the current class
it doesn't point to the actual Plugin instance you need
therefore
?di
Dependency Injection
Dependency Injection is a way of providing objects with the objects they need ("dependencies"). This is usually done with a constructor, but can also be done for individual methods
Read more here: https://en.m.wikipedia.org/wiki/Dependency_injection
Dependency Injection in Java:
https://paste.helpch.at/yijawupoju.java
Dependency Injection in Kotlin:
https://paste.helpch.at/esogakutod.kt
oh
use the variable for the constructor
so, instead of this particular object, I need to pass a Plugin instance, that is, an instance of my main class?
yes
Yes an instance of the main class
oh, I see. In my last plugin, I also used this, but on my main class, so It worked
now that makes sense
Yeah
thanks!
cause your main class extends JavaPlugin
ooooh
Also #development is the support channel ;p
It's alright ;p
think I finally figured out what's up with the plugins folder whack
for some reason, it seems to be null when load is called (called inside of a forEach inside of the apply block)
okay yeah, maybe rule #1 of using apply is to not use the field from a function that's called within the apply block
'til it's not 🔫
I can't help if you don't tell me what you need help with
is it possible to remove suggestions
so like instead of it being bob fefo /kill it's ```
fefo
/kill
Yes
If I'm not mistaken there is even a tab complete event
wait
what about like this:
d;methods spigot TabCompleteEvent
org.bukkit.event.server.TabCompleteEvent#getBuffer
org.bukkit.event.server.TabCompleteEvent#getSender
org.bukkit.event.server.TabCompleteEvent#getHandlerList
org.bukkit.event.server.TabCompleteEvent#setCompletions
org.bukkit.event.server.TabCompleteEvent#setCancelled
org.bukkit.event.server.TabCompleteEvent#getHandlers
org.bukkit.event.server.TabCompleteEvent#TabCompleteEvent
org.bukkit.event.server.TabCompleteEvent#isCancelled
org.bukkit.event.server.TabCompleteEvent#getCompletions```
kill
killl
killll
/kil
```into ```
kill
killl
/kil
all the events only support the argument tab completers
I don't think those (command names) are in the tab complete event, but you can listen to PlayerCommandSendEvent if you want to change which commands clients can see (doesn't mean they won't be able to run the command, if they have perms it will work)
If I have a plugin as a jar that i made that i loss the source code, can I convert that back into kotlin source code?
Or do I somehow have to manage to edit the decompiuled kotlinj cod
you could try inputting the decompiled java into intellij
ur doomed
i think i have officially broken discord image embeds
click on that

zoom in on it
how
.jfif?
jfif is just a jpg
You get this figured out?
Rip
Aj had the same thing happen to me on the old pc, took 14 hours to remake it but was worth it in the end
What the hell
lmao
The last two are just pure evil
Btw i've tried benchmarking the persistent collections and I've found out that it doesn't make much sense when my CPU reaches its limit in any benchmark lol
I need someone with a more potent cpu to execute these
so far it's just two very small benchmarks, but I just wanna see if you'd get other results
clone & ./gradlew jmh
Alrighty, one min
might take a while, haven't configured much (it's probably not representative of the actual performance right now)
should I be closing other stuff before running this?
I hope it will be fine for you lol
if not I definitely need to adjust some settings
only things I've got open that'd be using cpu is discord & chrome (quite a few tabs, but only one is doing anything, youtube is playing a vid)
aight
how long does this take on your machine?
its been running for about 4 mins now
18 mins
oh okie
5 forks, each 5 iterations (+ warmup) with probably millions of method calls each
wonder if it would go faster if I was using oracle jdk
you should be able to see the current progress in build/jmh/results.txt
Oh wow that's a big benchmark lol
yeah lol it's the default settings
it's on fork 3
I will adjust this more because it's probably not the right fit for this
You gonna add the kotlin impl too?
johnny before you go, just wait for this to finish, should be done in a few mins
clojure might actually be faster here no?
bm I think he's using kotlin and clojure
I saw both being downloaded by gradle when I ran it
haven't actually looked at any of the code tho
And it’s gone.
the kotlin might just be for the buildscript or something
The source is just clojure + java
So far I only have clojure vs default java collections
the variation in these iterations is huge
And only list/vec and only adding
yeah
Ok I was wondering why ij was showing every class as not found
This was just the initial test to see if it even runs
for somereason ti thought this used the haskell sdk xD
lmao
Is Javascripts easy?
yes
Yep
I learn Javascripts from Mimo apps
Why?
not talking to you lyzen
Ouhh okey
Yeah, I don't know why that is but I presume in clojure's case there's increasingly more work with larger structures
Bad thing or no?
Easier than most languages
Really? I learn about Var.. & Console.log()
Still new actually
Some are better or worse
My personal opinion is that JS and Python are the 2 easiest "mainstream" languages
Any language with “var” is naturally an easier language
Most people would probably agree
mhm
I’d agree with that
Ouhh
Java has var :)
it's also worth noting that the two easiest mainstream languages, are also arguably the worst languages ever design wise (except perhaps php)
But do you ever use it 😂😂
yeah you mean dynamically typed languages
Yeah actually
Monads are famously easy to learn 🥲
Thanks for the info
bm do u understand monads
My target is to be awesome Javascripter
B
thanks to you lot i've been getting fp vids in my recommended
Deffo
Amazing!
Javascripts can make a games?
Join the gang!
Ditch Java
Damn
java best lang
Ditch impurity
Imma do hack gui
Embrace the pureness
Jk jk
(lets ignore liftIO for now :))
lyzen when I said yes I meant little web games
Some hacked clients are coded in JS
Ouhh..
APL is among the easiest programming languages to learn
Most are C++ or C#
are you talking about minecraft jerry?
Normalise functional game frameworks
To make games use C++?
or other games
And then the rest are typically Java
Usually yes
yeah desktop games are usually c++ lyzen
Thanks
9 times out of 10 it's c++
or c#
Ehh kinda just hacked clients as a whole
You guys are aweome
jerry minecraft hacked clients are pretty much all java
Not the ^ ghost ones
They are typically not java to hide them better
As of course most developers know java
sounds rather counter intuitive
piggy
I mean for hiding sure
Did it end?
Ghost clients...
lmao
So... After I learned about Javascripts.. Is it same to use it for Scripts or Denizen plugin?
do you have a source / example for that?
did yours finish?
what's the purpose of a ghost client? Is it for client side anti cheats?
I might have source to some around
I didn't think anyone actually played on servers that used those
screensharing I think
minor hacks
idk it's dumb
wtf

what hacked client doesn't have a keybind that disables it
literally every hacked client ever has that
You realise screensharing is a thing in those places
Basically gives you a slight unnoticable advantage and make the UI look like a vanilla client so people dont easily understand

I suggest you try: https://www.haskell.org/
The Haskell purely functional programming language home page.
that won’t work you will still have Strings
wym?
Strings from process hacker can be used to detect its residue
Thank you

god people need to get a life
you will still have Strings What?
Basically yeah

It’s just a tool
oh hey my thing finished
Process Hacker, A free, powerful, multi-purpose tool that helps you monitor system resources, debug software and detect malware.
uhh
But it’s good at it
Eh
this would only detect your ghost clients
it's impossible for something like this to detect a proper java client, because they're literally part of the game
Is that not the exact same info you would get from the task manager 🙂
whereas a ghost client is a separate executable
You also have lastactivityviewer
Yeah this doesn't make sense
And a few other methods
Bruh
It’s a crazy community
Ghost client bad, Ghost processor good
I’ll tell you that
god it's like script kiddies developed the perfect formula for catching a hacker, by mixing together a bunch of shit they've got no understanding of
Yeah it’s odd
these people need to go outside
They have started to create dedicated SS tools if you really want to say that
I open my pc and connect a circuit board that MaKes be SuPeR KeTonE InduCed AdredaLinE DestrCtin Bridge with 250K CPS in a block game
🙂
It’s odd
Imagine the server trying to process that many packets per second
We use STRONGLY typed immutable JAVAScript frameworks to ensure your ULTRA KB hacks are 100% UNDETECTABLE
i bet the people doing the ss shit are the kind of people that use a vpn to improve ping
Lmao
Uh not sure, more info might be here https://github.com/melix/jmh-gradle-plugin
like the results.txt file had easy to understand stuff
then when the task finished it got converted to some bytecode I don't understand
huh
Nah man, It takes over the server
I run the server now
😎
surely the server would just disconnect you if you sent that much data
Java good? 😮
🥲
Pretty impressive for clojure considering
I wonder how java linkedlist would compare
Didnt the test include the kotlin persistent collections implementation??
Don't think so
ah
wdym?
build/results/jmh
ah alrighty
there's a results.txt file but it's just bytecode
weird
🙂
Also, did IJ start to just casually consume more RAM in newer versions?
Seems it takes like 1.5 to 2gb on idle for me rn
it indicates memory usage
ah
wot de fuck
oh the benchmark ended
my ij license expired
welp, I mean reappling should take less than a day to be accepted with them so
Yeah you have to renew it every year iirc
@lunar cypress ```
Benchmark Mode Cnt Score Error Units
ClojureCollections.benchmarkVec avgt 18 138092.658 ± 111312.453 ns/op
JavaCollections.benchmarkArrayList avgt 25 27507.548 ± 17950.582 ns/op
😮
😮
oh wow
ez flex
What is that?
report for a subject I do at school
Ah
rank is out of a cohort of 27
only been at school for like 7 weeks so doesn't really mean anything
somewhere around there
mm
@old wyvern memory indicator
what version
Me?
Yes
ah
So I assume task manager is showing the allocated memory and ij is showing whats actually being used of that?
1.16.5@hot hull
then it lag
Paper, never used purpur, so no clue what it fixes/adds
Forget Yatopia exists btw, complete abomination
I used Paper since 2018
I heard purpur offers more performance but it's not as stable as paper
Yea I reember glare saying purpur is nice
For me Paper is the best Software for the Server
Altho when I first saw it my impression was just "The dude make a fork for just entity mounts?!"
Tuinity is great btw
Really?
Yea
Okey
lmao
Do you mind if we are friend? @old wyvern, @prisma wave, @hot hull &@quiet depot?
I do mind, who u
Cool 
Someone that want to learn about Javascripts
ew
Sure man
All you'll get from Frosty is shit lol
There
Elm > javascript
Surprised that "jump off a cliff" hasn't come out yet lol
Lol
You're ew lol
Yeah 😄 👍
Haskell > JS 🙂
@dawn hinge Do you mind?
Make me Frosty
Not at all
Aw
wtf
Wait.. wtf
Oml
I wanna go skydiving 

Might make the world a better place 
I'm messing lol
thanks, that seems to confirm my expectations
i ran it again, not at my pc rn tho, will check soon to see if the new results are scuffed
I got similar proportions to BM, so his machine probably bottlenecked it as well
Mine were weirder john
Benchmark Mode Cnt Score Error Units
ClojureCollections.benchmarkVec avgt 18 138092.658 ± 111312.453 ns/op
JavaCollections.benchmarkArrayList avgt 25 27507.548 ± 17950.582 ns/op
💀
well "usable" in this scope, yeah
they’re corrupted right?
how so?
oh, idk what the zeros are, but the data at the top is the result
yeah i was at full CPU most of the way through that
that is very interesting
RAM limitations?
wdym?
I had ij open if that affects this ig
RAM wasnt full
CPU was at 100% for some time tho
the process was using like 6gb ram I think
Wait what's this?
a benchmark of persistent collections
running on my vps atm
I don't really see where the huge gap comes from
Yea same
Then again, it reported an error of 100K+ so maybe* a certain operation or something just spiked for a small amount of time which affected the final results
Whats cnt?
ah
Ok great, I think I'll write a proper benchmark perhaps even using bfs as the test
with a kotlin, clojure and java implementation
Ooh
Can I run it when I get home?
I wanna see how it benchmarks on my Ryzen 7 3700X 32 GB RAM semi monster machine lol
Subtle flex
Big flex now
xD
Oh also, thinking about performance, you know there's actually a legitimate reason why running a Minecraft server on Windows is bad
Yes, its not written in Haskell
Too much mutablility
Windows doesn't have native IO, unlike Linux, Mac and FreeBSD
^
classic windows
So you use NIO on Windows
What windows needs is IO String s!
Especially with Kryptin as well, since Krypton supports KQueue (Mac/FreeBSD), Epoll (Linux) and IO Uring (Linux 5.2+)
Vanilla supports Epoll, so it's still better to use Linux
But with Krypton, it'll run much faster on Linux, then faster on Mac/FreeBSD, then (comparatively) slow on Windows
Microsoft monad 🥰
Lol
edge :: Microsoft Chrome
Maybe it is
Maybe you are
Maybe
lmao
Oh btw, does Elara have monads?
Maybe
That was a response to BM lol
xd
Lol
Just ()
You live in the matrix that is Haskell
Lol
Ooo
5800x 🥱
Even bigger flex
What's the 5800X like? Because I think the 3700X is already stupid enough
because ark is the pinnacle of optimized software
yes
graphics settings don't really impact cpu usage all that much
thats just the game i am on rn
other than that
watch dogs legion runs smooth as fuck
Lol
93 javadocs
how do i do
sounds good to me
93 Javadocs + 1 KDoc soon™️
93 docs 🥱
with a 5800X there is no useful information that you can get from games anymore
a 3600 can handle almost any game already
the rest is up to the gpu
im running a 3080 with it too, i bought an entirely new pc cause i had a amd fx 8350 and 1070
and it just wasnt enough
to do anything
a 1070 is still a decent gpu
but to get a new cpu i need a new motherboard ram etc
ye
so i just went all out with new build
do you at least play in 4k
wasted lmao
What does DocDex use to index Javadocs btw?
only 60 hz
same
you all are wasting your money holy shit
nah
flex is worth it
i wanna get a 1440p 144hz
@jovial warren jsoup
but im not too bothered
that's like where a 3080 starts to get reasonable
ye
Would you accept a PR that added support for KDocs and Krypton soon™️?
yes bardy
but im running my os on a hard disk anywyas
docdex doesn't just have to be for java
Yeah idm abstracting it a bit more to support more than just Javadocs
it's beta so idc if the api gets fucked over
Haha fair enough lol
Might have to implement the hackery I did last time for Punishments to get Jenkins to copy KDocs over
I had a sed script to replace the reference paths so the CSS and stuff would resolve
Or I could just use GitHub Actions to upload to GitHub pages, which won't require any hackery
Or something else
nope :c
god damn it
would anyone have any idea about the best way to deal with cancellable events?
in my current reactive flow setup
I mean, mutability in a highly asynchronous environment, idk what I expected tbh
Suspend the event result execution till all listeners result?
how do I do that?
remember that call just emits a value to a flow, and that we have absolutely no clue how many listeners (if any) there are
I assume with async and await from ktx.coroutines
Not sure how much flows suppourt coroutines
I mean, they come from kotlinx.coroutines, so I'd assume decently well
Oh you werent using rx*?
rx?
oh btw, fun fact: you can absolutely use coroutines from Java from what I've seen in the code
a Continuation is just a glorified callback, and they're not that hard to generate
you can absolutely use coroutines from Java from what I've seen in the code
Thats kinda false. The point of coroutines in kotlin is be able to use sequential style code in place of continuation passing style, if you are just going to write callbacks, thats pretty much equivalent to what you normally do in Java.
yeah
Seems collect is suspending
I'm saying you can
You can what?
You are not using "coroutines" in the normal sense tho then
Its literally back to callback hell
bard
What terminal* operation are you using rn?
listen just uses filter, there's no terminal operation there
and call uses tryEmit, which gives me nothing
maybe @prisma wave can help with this too 🙂
huh?
The docs mention that they are lazy
The listeners shouldnt run without a terminal operation I assume
Are they working rn?
@jovial warren
yeah the listeners work
Thats weir
they can use collect
As in the user?
the event currently uses collect, which is terminal
but what I'm saying is that how can I know when collect has been called?
collect is a suspend function
So it should continue only after every listener had made its change?
Alright
https://github.com/KryptonMC/Krypton/blob/master/server/src/main/kotlin/org/kryptonmc/krypton/event/KryptonEventManager.kt this is the event manager
when I emit an event to the shared flow, I have no idea how many (if any) listeners there may be
and emit will not suspend and wait for every collector to finish
because that's not how flows work
they, well, flow
oh also, thinking about it, the reason might be because plugins are ran under their own scope
well, initialize is, which is the suspending function
is tryEmit an extension?
oh actually, I'm really dumb
okay I've just seen the comment I should've seen all along
Which is?
https://i.imgur.com/ot0Wd8h.png (SharedFlow docs)
that's literally exactly what I need
I said tryEmit isn't suspending
I wasn't aware emit suspended for that reason
I know it suspends if there is no buffer space available under a regular buffer config
I see
right, let's see if this works now
and I need to read even better apparently
because if I look a few lines up, https://i.imgur.com/HFs6zWN.png
ffs why doesn't this work
emit suspends until all its subscribers receive it, but that doesn't mean when they collect it I guess?
grrr
Huh?
I need to suspend until every subscriber has collected and processed the emitted event
basically, I need cancellable events
wdym?
all on the same thread, sequentially
That way you can actually have priorities, no race conditions, etc
Probably the best way
val event = PreLoginEvent(session.profile.name, session.profile.uuid, session.channel.remoteAddress() as InetSocketAddress)
runBlocking { server.eventManager.call(event) }
if (event.isCancelled) {
session.sendPacket(PacketOutDisconnect(translatable { key("multiplayer.disconnect.kicked") }))
session.disconnect()
return
}
```current code for calling pre-login
where call calls emit
what do I need to change?
ew
idk what else I can really do there
idk how I would implement synchronous event stuff into this current event bus
you suggesting I just forgo the reactive event bus entirely and just use a regular old event bus?
I mean, I can't really think of another way
no clue what a reactive event bus is
it's reactive
so when an event comes in, you get it
there's no registration BS
it all just flows
BM
help
🙂
oh also, putting in synchronous events means I'll probably want to step up my current concurrency model a bit
how about you keep both options
idk yet
idek how BM thinks I should do synchronous events
also, non-cancellable events will still be dispatched async btw, that won't go away
for example, HandshakeEvent will be thrown onto a separate coroutine, since there's no reason why that should be cancellable
and anyone who may think that there will be an EncryptionResponseEvent:
Ok
Yes
You really love that gif dont you
yeah lol
I was thinking of using the Simon Cowell no, but I wasn't even gonna bother looking for the right one
idk, that gif just annoys the hell out of me for some reason 🙃
¯_(ツ)_/¯
still trying to figure out how I should do these synchronous events BM spoke of
could mean the death of the reactive event manager
BM
Elara bad
maybe just ignoring me because it's glaringly obvious and he wants me to figure it out for myself
seems legit
lol
BM pls help 🙂
how should I do this
I need a way to implement synchronous events
https://i.imgur.com/fdPNOxc.png god damn you BM
I suppose I could scrap the reactive event manager entirely and just go with a standard event bus
that would work
whether it would be nice or not though is another story
If you want to continue with this design maybe you can convert mutation into a request format?
Like you have events post "Requests" into a channel that you keep receiving and handling
That should mean only 1 thread would actually be doing any modifications
yeah
I also need to think about preventing Krypton from becoming yet another vanilla
yeah I've seen that
is Minestom heavily single-threaded?
I mean, it implements Sponge, so I wouldn't be surprised if it is
not sure what Sponge is like for multithreaded implementation support though, but I would imagine that it's not all that great, considering it is intended to be used by implementations that both build on to vanilla
No
Atleast thats what mode told me when we spoke
yeah
You can look through if you want to check I guess
Don't think sponge has too much multithreading since it also uses vanilla server iirc
yeah
huh?
Dont think it does
Yup it doesnt
They were in talks on something about mixins from sponge or something
one of the reasons I didn't go with Sponge, along with it being a complete API (not what I need atm for this project), is that it is one of the worst projects for Kotlin friendliness I have seen
But im pretty sure they arent a implementation of sponge
MineStom itself is just a plain API that abstracts away netty
ah right
It comes with no features of itself
They do have a vanila "reimplementation" tho
They do seem to have a few service meta files about sponge tho
Dont see anything else from sponge in there tho
yeah
Does anyone know a good GitHub Packages alternative. Packages on github are really annoying to work with.
I know jitpack is a thing, although their private repo subscribtions aren't really the cheapest :/