#dev-general
1 messages ยท Page 350 of 1
that is A tier shitposting
honestly, you are one strange human being Niall
boolean to sgnifiy the event has been triggered lol
omfg
But nah I like EventBus
class MyListener {
@Listener(ListenerPriority.NORMAL)
fun onJoin(event: JoinEvent) {
event.isCancelled = true
}
}
this is the current system
๐คข
Yeah thats neat
not very pragmatic
oh also, yk what else copying the Bungee event bus gave me?
the fucked up priorities lol
why do users not have the option to compose their event handler functions
will have to fix those
hopefully as simple as just inverting the value to be Byte.MAX_VALUE and using value--
for plugin {
event_list = eventLists.get-or-put(plugin, new linked list<PlayerChatEvent>).add(event)
plugin.broadcast_chat_event(event_list)
}
๐
https://github.com/jphp-group/jphp more modern than quercus
what
the
fuck
is
that
no
BM wdym gn
barry put you to sleep ๐
u stay here

I might have to try this
still seems ded
Something about that $ -> syntax gets to me
last commit june 2020
mmm
oh btw, KiteBoard multiplatform when
I wish java had structs
soon
me and you should abstract KiteBoard to be multiplatform so I can eventually make an impl for Krypton lol
I swear that's just an illegal word
every time I say KiteBoard, Niall just disappears
Lol
let rec admins = bristermitten :: admins [piggy cube other guy]
Abstraction ๐ฆ
would mean KiteBoard for Krypton would be easier
so we wouldn't have to rewrite it from scratch lol
basically Bukkit++ lol
but I'll allow you to use packets with ease if you really want to lol
the server will be available as a dep
imagine
but you shouldn't need to anyway
auto player = bukkit::getPlayer ("player name");
(*char) player[10]
what will it do?
we do not know
A server implementation with a packet api ๐
the best you'll get there is the server's packet API
the API won't expose packets
What if plugin developers want to make their own packets???
the backend's packet API is actually decent though
just implement Packet and then send it pretty much
minecraft codebase on github... make a pr smart arse
its write function will get called if it's outbound
packetHandlers->register(0x01, myPacketHandler) ๐ฎ
I'm in
*char
e.g. ```kotlin
class MyCustomPacket(private val myCustomParameter: String) : PlayPacket(0x82) { // fake ID lol
override fun write(buf: ByteBuf) {
buf.writeString(myCustomParameter)
}
}
doesn't matter
ez
just hate exceptions and all that
doesC++ even have exceptions
safety obsessed LOSERS cant handle a bit of pointery pointery
Niall what do you think of the packets
Do you have a read method as well
it does and they need to be "activated" with a compiler flag lol but they are highly discouraged
like
you bet
highly discouraged
you choose which one you override
Yeah i think it is pretty good
optionals should be used instead
if you wanna make inbound packets though, you gotta register them with PacketState.PLAY.register(0x82, ::MyCustomPacket)
operator new tho
You could always have PacketEncoder<? extends Packet> PacketDecoder<? extends Packet> idk probably over the top
imagine overriding operator delete[]
Thats nice. I like this way of registering them
@prisma wave @tranquil crane thoughts lol
actually lemme tweak
famous wrapper "kanye west" once said that c++ was more modern than haskell would ever be
Let me guess, in 2023?
the only thing I think of when I hear the words "C++" is whatever tf kinda syntax cout >> "Hello World" is
<< *
bit shift ๐
wait does it actually bit shift that string into cout
you are "shifting" the string into cout
huh
dear god
I legit don't know who thought it was a good idea to overload << and >> for cin and cout lmao
why can't it just be printf, println, print, etc. like normal people
dw lol
I mean you can use them
printfn ๐
just std::printf
global functions and variables are also highly discouraged lmao
that's why the C standard library is under the std namespace
what, you don't like your programming language full of magic functions? php not good enough for you??
lmao
really makes you think
if programming was English:
Can you please declare me a main function with a value that prints the words "Hello World!"
let's just write a minecraft server implementation in php
it's the perfect language
okay, maybe time for you to depart now
would php be more secure if popular functions such as mysql_query were in a different namespace? probably
I'd rather use Python than PHP
ever heard of PocketMine?
though I can't really say shit, since I'm actually starting to like Python now
excuse me
It's an MC:BE impl in PHP
burn it
i feel like python would be much less obscure if they adopted modern features such as arrays
blursed
modern
arrays
you're fine with python being "obscure" then lmao
lol
but "modern arrays" are where you take issue
if only there was something similar ever since the inception of computing...
oh wait
pointers
scarily true
y'all seen how to get an element at an index n from a tuple in c++?
std::get<n>(some_tuple);
(::::::
Cool
how
That is cool
what's really cool is that it's all compile time crap
love that
and the fact you can pass values for template arguments
this represents everything wrong with the world today
lmao have you all seen the sonatype ""helpful"" videos on publishing etc to central?
the music bro
lmfao
I thought that said dkim for a moment there haha
clash anyone?
hmm
I feel like they should have done it the other way around
no I mean like they use their sentinel object to indicate that no value has been calculated yet
that would make more sense
the fuck is that shit
Bukkit
I wouldn't call it ACTUALLY_NULL lol
other than what I described
because it's not actually null is it
It's a marker for it being actually null
lmao xD
wat
you're confusing me
it's not actually null, since it has a value
omg you missed the hint
.
yes. but this value is a stand in for something else. it's a slightly confusing name, but they're not saying that the value the name is associated with is null
ah right
oh btw, anyone know where the items are in Bukkit?
dw, got it
org.bukkit.material lol
seems legit
also, https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/material/Command.java worst name for a command block ever
Why ...
clashes with commands lol
Why?
MaterialData
@deprecated all usage of MaterialData is deprecated and subject to removal.
- Use {@link org.bukkit.block.data.BlockData}.
yeah I saw that
so where are the items then ๐ค
OH Bukkit doesn't have items does it
it just has Item and ItemStack
I'm looking for the item classes
ItemMeta & subinterfaces?
I guess
They are like the "BlockState" of an ItemStack
yea
but where are the items
what do you mean by that
the item interfaces
??
an ItemStack represents an item yes...
ItemMeta would be the equivalent of BlockState (vanilla block data, the one that contains the NBT)
BlockData (vanilla block states, old MaterialData) have nothing to do with items
I swear Bukkit has an Item somewhere
they do
oh right
Not necessarily
a heap load of blocks don't have neither a specific BlockData nor BlockState
I suppose it makes sense
e.g. stone
right... blocks have BlockData and BlockState
also, this is why Bukkit is a mess
there is nothing extending just Block
why tf is ItemStack in org.bukkit.inventory
Block is Block
because ItemStack is, fundamentally, tied to inventories?
and depending on the block it has a BlockData or a BlockState, or both
very good point actually
anyway, gn you lot
night
- Fefo, 2021
you seem to be misunderstanding how blocks work in bukkit
maybe
gn
I mean, idrc how Bukkit handles them, I just wanted to know so I can use it as a reference for Krypton's API
That implies you do care if you're taking it as reference
I guess
Idk why I'm even using Bukkit as a reference, should just be building the API by abstracting the server
A.k.a building it around the server
But instead, I'm building the server around the API
Anyway, I really gotta be off now
Gn
Probably good to try to maintain plugin compatability eh?
Man the LP discord gets the biggest dumbest braindeads when it comes to API help
Literally 0 programming knowledge
Entirely
Hey man, learning an entire API is pretty hard, cut em some slack
I know, I had some hiccups when I entered the LP API realm
But I'm not talking about the API specifically
I'm not even talking about Java specifically
Oh lol. Did you have to explain interfaces to them like yesterday? Haha
I did but this is worse
I'm like "Did you give the lp variable a value?"
"I have this public LuckPerms lp;"
And asdjhkfasdhfaos
And Luck wants us to be nice and all but girl I just can't sometimes
That's why I rant here lmao
Well it makes for some quality entertainment, so keep it up! ๐
We do have a delightful #pebkac channel :P
The wiki clearly says how you should import the API, how you should get an instance of the API
I link it to them over and over again and they still get it all wrong
Ah the old "Not everyone should be a programmer" haha
Defo no lmao
An entire channel dedicated to pebcak??
And an archive one yeah lol
pebcac* ๐ฅด
Can't see it ๐ฅฒ
heh
@distant sun What .. the .. fuck
What would be the best way to store data in a database like SQL that might change in the future? Like if a field was added to an object.
Is it best to just add columns if I ever need to, or is there a better way? If you have links to anything that would be helpful too.
You'd have to have something store the database version and create migration handlers
Most ORMs do a lot of it for you if you wanna go that way
are those relocations?
Yes
no actual like
Whats wrong?
I'll have to learn about ORM's, if you have any links that would be good, I looked at this one
https://www.tutorialspoint.com/hibernate/orm_overview.htm#:~:text=ORM stands for Object-Relational,as Java%2C C%23%2C etc.
Wdym?
Still confused what you're trying to say, but no I pinged him because that's the most hideous thing i've ever seen in my life
I've heard JOOQ is also nice
https://www.jooq.org/
Okay thank you, I will look into that
you know how python and c++ and c have this thing were if an integer is set to 1 you could do something like
if (num) {
}
cause 0 = false, 1 = true
why didn't Java have this if its parent language was c?
Because booleans in C are literally just numbers afaik
Cause it was confusing and non-obvious
Whereas in java they're an actual type
^
which means you can't do branchless programming
0 is false, anything other than 0 is true, whether it's 1, 2, -10654 etc
weirdchamp
#816184747024711693 message
lol ever since this guy put [requirements] now everyone is ๐คฃ
The herd mentalilty haha
What do you mean? We agreed on this LMFAO
Did we? It's hideous
-.-
Go to sleep matt
It's horrible, groovy sucks for that, it's like the worse thing i've ever seen
yeah the chances are you wake up tmrw and feel great about what malloc did for you
no
Optional<Optional<Optional<Optional<?>>>>
Supplier<? super Object>
Consumer<? extends Object>๐คก
๐คก
yea you're just splitting a string literal
Can you do that in Java?
That seems like a Ruby think to do haha
5.times()
``` and all that
@steel heart
public class Person {
private String name;
private String email;
private int age;
public Person(String name, String email, int age) {
this.name = name;
this.email = email;
this.age = age;
}
public String getName() {
return name;
}
public String getEmail() {
return email;
}
public int getAge() {
return age;
}
@Override
public String toString() {
return name + " - " + email + " - " + age;
}
@Override
public int hashCode() {
int result = 17;
result = 31 * result + name.hashCode();
result = 31 * result + email.hashCode();
result = 31 * result + age;
return result;
}
@Override
public boolean equals(Object obj) {
if (obj != null && obj.getClass() == this.getClass()) {
Person castObj = (Person) obj;
if (this.name.equals(castObj.getName())) return false;
if (this.email.equals(castObj.getEmail())) return false;
if (this.age != castObj.getAge()) return false;
}
return false;
}
}```
compared to
data class Person(val name: String, val email: String, val age: Int)
lmao
lol
so?
as I said, beyond saving
you missed the copy method
If you can't see the impact that those lines would have, you will never like Kotlin
I can generate all that with java in my ide within some seconds
and also optional parameters
Just cause you can generate doesn't mean it doesn't make code cleaner
if you like infering then I accept your choice
You still have to look at that bad boy
@obtuse gale The message I pinged you there was saying I'm coming for you to convert you into a Kotlin user
It's called sensible defaults
lombok ๐ฅฒ
cleaner hmm then I could just use lombok with java
LMAO
NOo
yeah sure lmao
try
you see
someone make the bot do the thing
agreed
the thing
?plsnolombok
Why is Lombok bad?
- It's a compiler hack - the Java compiler isn't designed to modify code, so it can cause difficult to debug errors, or worse
- It requires an IDE plugin, so unless you've properly configured Maven, Gradle and your IDE, you'll get hundreds of compilation errors. This process takes time too, it's not easy
- Lombok'd code won't show in Javadocs
- The code generation is often unpredictable and difficult to debug, and often you'll have to do it "the hard way" anyway
- Java is supposed to be explicit, Lombok hides a lot of key functionality into a subtle annotation which can be easy to miss
- While IDEs support it with a plugin, it's usually more difficult to find specific things, like usages of a getter because they don't exist in the source code
- Finally, Lombok'd bytecode doesn't match the source code, so it causes a pretty annoying warning in IntelliJ
Now I can get behind taht
๐
Poor Conclure
It has to be done, conclure
in java (without lombok) you could in principle have public fields and use Objects.hash instead, that would surely cut down it reasonably
if your point is to make it more consise and friendlier
But that throws away safety
public fields in java ๐คข
You know why getters and setters exist, right?
Properties
No, they just have automatic getters and setters that you can then override
They have getters and setters
yeah for that I recall
So if you don't care at first, you don't have to code anything
but even so why would you override a getter
Since when should you not care about your code
If you then want to change it and make it harder to access, you can do it without having to change the code
That's why you can
var something: String
set() = ..
get() = ..
most cases that wouldn't be necessary
question, why cant kotlin sometimes use its getter/setter format on bukkit? Eg Server#getPluginManager
You're exactly right, which is why it does it by default so you don't have to, then you never have to override it :)
Those aren't getters in a way, they aren't linked to a specific field, it's just a static helper
Hmm, I see.
class A {
public O o;
}
class B {
{
new A.o = new O();
}
}```
if we change o in class A without refactor surely class B wouldnt compile
```kt
class A() {
lateinit var o: O;
}
class B() {
init {
A().o = O()
}
}
wouldn't this be the same case for kotlin starmism?
did I type the kotlin out right btw?
lol
That isn't the same
Im not sure what you're trying to do lol
ok there then
data class A(var o: O)
Implies you're doing A(o)
I'm saying if you have a getter that returns like, I dunno, health of a character
So in Java it'd need to be
class A {
O o;
public A(O o) {
this.o = o;
}
}
Verbose as it gets
yeah I recognized
Then if you actually want to only ever return 0 even if they go negative health, you can setup an override getter in Kotlin and it wouldn't change its access
The second example still wouldn't work because o is never initialized
lets go with that
Yeah but this is a pretty funky example
I'm not saying for all cases, just ones like I said above
But in theory, as long as it doesn't return something different, you should be able to in-place override any getter without having to change the code using it
Lets say that we're talking about regular POJOs nothing extraordinary
then technically an exposed java field would work equivalent to kotlins propertioes?
sort of
not 100% equivalent
Yes, but you'd run into a lot of problems if you ever wanted to control getting and setting it
That's why getters and setters exist and are common coding practice for defensive coding
To protect you from yourself
though in principle if the getter and setter only acts like a vessel for the object it is somewhat meaningless
Yes, but in Java you'd still write out a getter and setter in case you'd want to change it later
yup
And yes, I know you can generate them with your IDE, but it's still annoying boilerplate you have to read
And it's hell for watching students code with NotePad++ lol
although we have refactor tools in ides
but lets assume other stuff depends on your project
Yup, but it's built into the language!
then yes
And yeah, even better!
I mean ok?
I feel that
The teacher really says "I don't recommend using an IDE/linter" and I go 
why
Then my Intellij goes brrrrr
lmao
I remember having to write a whole Arduino program with pen an paper for an exam
It was like
3 frigging pages long
Dude wtf
yeah idk either
Programming teachers genuinely suck
Starmism you encouraged me to create a why not to use kotlin over java thread 
I got a 100 so ๐
VS Code exists man
Oh yeah? What would be on it lol? "I don't like automatic vals for variables passed in, I hate common coding practice and safety"
I mean you can stick with java lol
would rather
Eventually they'll most likely make that a thing because it's a smart thing to do and they're copying Kotlin haha
yeah I feel that
and they're copying Kotlin
I mean Conclure did mention that lmao
I mean they did add more functional switches and sealed classes for instance
And it compiles to JavaScript too lol
So you can make a fullstack web application in Kotlin
yeye thats a good reason to learn kotlin
think matt did something with react and kotlin
ooh have you seen string interpolation
okay stop
that shit is nice, though I guess it doesn't save too many lines
val x = 4
val y = 7
print("sum of $x and $y is ${x + y}") // sum of 4 and 7 is 11```
String#concat works great duh
but I will take it as java might add it one day
so no worries
๐คก
Overriding << to ostream things ๐
I mean having to use .equals, not overriding ==
Oooh yeah, the C++ way! I never really got why that was the concatenation operator lol
yeah true but it's probably to make it more customizable if thats aword
It's not really a "concatenation operator", it's more of a "you're shifting data out to the stream"
you can + strings just fine
Okay I did not know that ngl
I just thought it was a funky way to print to the console
but the << for cout is dumb as fuck ngl
ya haha
it kind of is.. you can definitely use regular functions for that lol
I bet someone's made a function that's just println then does
cout << inputString << endl```
printf kinda lame tho
and if I'm not mistaken << just calls .write under the hood lol
so << is used cuz its shorter?
ยฏ_(ใ)_/ยฏ

who knows what C++ be doing man
I hear a lot of good things about newer versions of C++ though
Ever since C++11 (so 11, 14, 17 and 20) they have been adding really cool and useful stuff
yeah but like every project still uses C++11
java did add some support for a newer C++ version in 16 ๐ฎ
for like the 2 projects I currently have in c++
I think
or older ๐คฎ
wait wdym
like you can call C++ code easily in Java or somethin?
Java is also getting much better tbh
It definitely is
ya i didn't know that ngl
But C++ best waifu
Reflection TS ๐คค
347
Fefo you should give me some example projects to do in C++ with about 2 days of experience and a lot of knowledge of Java and bit of C :)
A BrainFuck interpreter lol
I remember doing some mandelbrot thing..? I think?
my boy Wilfred being a hero
it can cross-compile BF haha
https://i.imgur.com/Ll4KdE3.png uh is it normal for this to take like 5+ minutes
It seems to be Building the model...
That looks like when it compiles Maven's thing to parse it
Also why is that progress bar so beautiful
um
u use maven?
๐คฎ
I remember doing a whole tic tac toe thing in c++ and even made a whole thing for calculating unique boards (mirrors/rotations etc), all because I wanted to make MENACE
https://en.wikipedia.org/wiki/Matchbox_Educable_Noughts_and_Crosses_Engine
I still have the project finished and in theory it works and it learns from itself and previous games but I never played more than like 5 rounds so I never actually found out if it actually learns anything lmao
Basically my first and only machine learning project hahah
is it open source
I'm trying okay! I don't have a choice when I'm contributing to other projects loll
No
ok

Wtf Dkim
https://i.imgur.com/ARZ7cbl.png
at least i have an A
๐ฆ
still happening
i hate this
ima restart intellij
wtf
what kinda
Probably so slow because you don't have the Nyan cat progress bar
@half harness get a brtter pc
i want a brtter pc ๐ฆ
Thats a thing?
yes
I need that now.
its a plugin
how do i fix this?
just download more internet
?download-ram
I'm glad that's a bot command
Ah yes
Download the Nyan progress bar
But what about the Mario progress bar? hmmm ๐ค
nyan cat best
^
cuz lowling Tier I :kekw:
8 already???
hell yeah that's what I'm talking about
:p Tier 3
I used to be a #cubes-pings tryhard, then I failed twice and gave up at tier 3
The only conversations are in #dev-general and #development
idk
no project errors
invalidate caches and restart ๐
oh shoot I had #off-topic muted haha
bro try the plugin I was working on
It deletes the files in the target/ directory
prob same as gradle clean
...
clears caches
cool
gtg byeeeeeeee
Dude mine had 18 repositories and 41 dependencies, plus it didn't even work when I did it
ooooooooooooooooooooooooooooooof
I had to add a JSON thing's dependency lol
gson ftw
I mean for someone who hasn't heard about Aikar's JVM flags on this community...
oh I see
Yeah, I see your point
I dunno man, I hadn't heard about Purpur until I read a thread on reddit
Lol
Though I have been running servers for basically 10 years so.. guess I'm just dog water :(
lmao
Paper has been a thing for ages, don't know about Aikar's research on the flags but still lol
I mean it doesn't say you can't use them on Purpur
It just says my boy recommends Paper
Oh, I use them on purpur, but they're not from purpur
smh
Idk man, I'm tired lol
Fefo's too big brain for that github discussion
Also is that the new darkmode thingy? I like the blue accents
Yeah
is dope
dude legit has userManager.searchAll(...).join()
and says "This problem can be solved by returning CompletableFuture"
well what do you think you're calling join on
Okay so this might be really dumb, but what's with the GroupManger#getMembers syntax vs GroupManger.getMembers?
Is it just a thing like you do on the docs?
ah
I mean it's nothing legitimately official outside of this guild
but
Class#method() for instance/member methods
Class.method() for static methods
the # probably boils from javadoc
Purpur is paper in a way
which is kind of stupid because when rendered it shows .
Its a fork
Exactly
But its not a purpur recomendation, its aikar's, thats my point
Billy wouldent do that much research /s
Does paper officially recommend Aikar's stuff? lol
Paper is aikar
Check paper's timings
Airplane has a blog wierdly enough
forums
a public diary :p
Like I saw a blogpost about accurately simulating the way light reflects in water and makes weird lines on the bottom of the pool in Unity
it was kinda sick
Imagine not dropping out in middle school, smh
Full time minecraft dev at the age of 12
Or whatever middle school is
I forget now honestly
Just take the course at Mineacademy and learn how to become self reliable
How do put your face on everything?
11, grade 17, 10th grade 16, 9th grade 15, 8th grade `14, 7th grade 13, 6th grade 12
I guess 12-14
Ah, ok
Or 13-15 if you live where I live and had middle school be 7-9th
man I have no clue how anything of grades and stuff work outside my country, shit's confusing as fuck
Im new to this server were it the channel were someone can help me with a texter pack
Uhhh, #general-plugins ?
What country ๐
Argentina, all the way down south america
Oh woah, so you speak Spanish then?
I guess I do
I'm in the US, and everything is stupid for no apparent reason lol
I guess I do hahah
facts
Nah yeah I can agree to that one
:p
lmao dyno pls
LuckPerms but the punishments channel lol
I do, yeah
Invite is hidden somewhere in the internet...
ah it's the LP channel hmmm
COUGH
cough
Huh? Is that the invite or smth?
bro imagine being unlucky
oh no
Night!
this guy really hit me with a https://cdn.discordapp.com/attachments/821951273582592000/821951860021657641/WIN_20210317_22_43_05_Pro.jpg
360 camera where?
i go past this all the time and i hate it
that's kinda cool, dunno if I'd use java as my language of choice (besides the pun)
void
return ...
Return on a void method 
no the java code is wrong
that's something GCC won't complain about tho
epic
I mean it will complain
but it won't stop you
llvm ftw
I asked that same guy what directory the texture was in and he said "the one that I made"
im scared
๐
oh you're not as scared as the time I saw this image from someone in the lp discord... https://media.discordapp.net/attachments/703971293367894017/741582869457010728/unknown.png
you know what I'm talking about exactly...
ummmmm
mom come pick me up
that's either winrar or filezilla and the icons for a .jar are internet explorer
@jovial warren Suggestion for Krypton
Add plugin load priority
gotta love these people.......
proceeds to ping every single staff member in existence
"srry"
Shoot me please
It's 5 am
that should be enough of an answer
Schools aren't closed there?
In college?
High school
But the 5G ships!
oh ye u rite u rite
don't want my sailboat flying away with the power of 5g or anything
aw sheet my state is only at like 6.2% of adults vaccinated :(
I hate it here
Lemme see if they released an approx of where we're at
My country is going really slow too, 3.3% fully vaccinated
Well yeah but you also probably don't have the financial might of the US to order vaccines and stuff lol
We have enough vaccines for the entire population already, they are just slow at distributing
oh what!@
sadly 
Yea y'all pretty much fucked
hey man, im tryin
best part about being a developer? remote work!
canada, here I come :)
Hehe
Argentina not good?
๐
yeah but then you have to speak dollar store spanish
Exactly!
lol
what do yall think about the new /debug feature in 1.17
looking an awful lot like aikar's timings ey

Nice one JetBrains
Hi, I have a question. How do I place the EZ-Prestige on a leaderheads plugin poster?
Nobody answers me ๐ฆ
๐ญ
And no one will answer here either, this is the wrong channel
Wait in there patiently until someone who knows responds
๐ญ
So I once took the terrible decision of making a public plugin, it's literally trash but I recently added a nice and dandy API to it (cuz someone needed one) and I'd like for someone to tell me what they think about the API, not the backend impl because it's trash and there's no way I'm fixing it without an entire rewrite from the very ground up ::)
IMO the API is clean and concise, and hopefully it is (it's also very small but it's natural for what the plugin does)
https://s01.oss.sonatype.org/content/repositories/snapshots/
"com.github.fefo6644:betterjails-api:1.5-SNAPSHOT"
So yeah just like import it in maven/gradle/ur mum and start at the BetterJails interface :)) pls k thx
please I really need some feedback other than my own ego
some background information, it's a plugin made to replace EssX's jail system
BetterJails only has 3 methods?
Indeed
I mean the biggest part is the event bus lmao
But hopefully the jdocs are explanatory enough
ah yeah they're helpin
Pretty straightforward API imo
I suggest a PlayerJailedEvent and PlayerReleasedEvent, could be pretty useful
PlayerImprison(ed?)Event & PrisonerReleaseEvent
Was gonna make those cancellable but the spaghetti backend made it impossible lol
my feeble brain can't handle the stuff going on but it's definitely fancy
Lmao
how do i get a list of all of the events I can listen to?
They are all under the ...api.event package (in their own sub packages)
Making the event bus made me read the documentation for Class#isAssignableFrom(Class) a lot ๐ฅด
Because of the whole "listens to subinterfaces too"
๐ฎ
well this is certainly a grade above anything i could come up with
all i'd want is some thorough documentation
to make sure me and other small brained developers can figure out how to use all of the features hidden away in this juicy package
There isn't much to it xD it's just the event bus doc that needs to be read thoroughly lol
What color scheme is that, it's kinda thicc
I use Material UI with Atom one dark theme and slightly modified color scheme
For the font i use Fira code medium
Okay I'm kinda new to development outside of a classroom (kinda), please explain the event bus. I presume it's just you throw events into it, then Spigot catches them and tells all those EventListeners that that event happened?
Non, these are totally unrelated and detached from Bukkit's event system
Okay, please do tell then :)
So I get the Material Theme UI plugin then change it in there?
But instead, you're vibin with me! :)
Suffering at 6am
I have my own event bus (which allows for things to be platform agnostic)
In my case the other plugin passes a class of the event they want to listen to and a consumer of said event type, I literally just keep a Map that maps the event type -> handlers so yeah lol
I changed a few colors to make it even nicer, didn't like how the string green looked
Oh so what does your event bus accomplish then?
What color did you change it to?
Oof I'd need to check, i can send it to you tomorrow, not on pc right now
Ah okay sick, thank you!
I can dispatch events not only not depending on Bukkit's system but I can keep track of as many things as I want and design it the way I want it to
For example if I make cancellable events I can keep track of which plugin did it based on what handler was called etc, this bus you can also subscribe to superinterfaces (e.g. subscribing to BetterJailsEvent lets you listen to every other event of a subtype)
But doesn't that make it more annoying for other developers to listen to your events? Since it's on a whole new bus
It basically boils down to flexibility
Yes ๐
Oh cool
But if you're designing something that will run on multiple platforms (say LuckPerms) having an own event bus is a must-have
Is BetterJails really going to be that widely adopted? lolo
I guess it's good practice though
Was planning on making it for Sponge and Fabric too but like uuh in a thousand years lol
I guess I just want the challenge of abstracting it out of the server software
yes I know I didn't think of that when I made it
Then when I realized I was like
Oh...
oh I thought it was intentional haha
it's kinda hilarious tho
Well no one complained so :^) it's staying
haha yes, you put Maven before Gradle in the help section >:)
Like every other "importing X to your project" section
They always put maven first lol
Ngl maven made it amazingly easy to publish to sonatype
what's sonatype?
Central
Oh I see
Central repository for Java applications or whatever
If you want to distribute your JVM library, Central/Sonatype is a common choice after self hosted
Ah I see, I know what Maven Central is lol, just didn't know it was called Sonatype
alright, time to clone betterjails and see what I can pr >:)
Yeah I'm not touching v1 no more LMAO
When I said "it's literally trash" I meant it xD
Oh I should be touching main branch shouldn't I
The main one which I haven't touched in a long time either but it's the v2 rework!
Yes that one
And it has many things wrong already lolol
Amazing ๐
There's a trello list linked.. somewhere
Idk if in the readme or in spigotmc/bukkitdev
Ah I love trello!
I really like it but it doesn't make me any less lazy lol
At least you can identify, at a glance, just how lazy you are!
Sad :)
Lol
Oh also, https://github.com/KryptonMC/Krypton/pull/13/commits/74aa011570e02390412ab52942cd5247faa6687d totally didn't write those manually line by line lol
Totally didn't take me a few hours to do that
What do you guys think of those enum names btw? They're named by their names on the wiki, rather than whatever vanilla calls them internally
Or any Bukkit BS naming
And I split blocks and items as well, to make it easier to find what you want
is Krypton like paper but in kotlin?
There's a big difference between Krypton and Paper
Paper patches vanilla, Krypton is made from scratch
So the real difference being that you can't use like any plugin on Krypton?
At least it's in Kotlin though, that's kinda really nice

