#dev-general
1 messages ยท Page 413 of 1
yeah i meant that
Module system breaks a lot of the reflection
it enforces strong module encapsulation or whatever lol
You can probably still hack stuff up with things like MethodHandles.defineClass to define it in the current class loader
Yeah java 16 does break a lot of stuff
what is MethodHandles?
d; MethodHandles
public class MethodHandles
extends Object```
MethodHandles has 1 extensions, and 38 methods.
This class consists exclusively of static methods that operate on or return method handles. They fall into several categories:
- Lookup methods which help create method handles for methods and fields.
- Combinator methods, which combine or transform pre-existing method handles into new ones.
- Other factory methods to create method handles that emulate other common JVM operations or control flow patterns.
ah
There is a defineClass in there? Tf
d; MethodHandles#defineClass
public MethodHandle asFixedArity()```
Makes a fixed arity method handle which is otherwise equivalent to the current method handle.
If the current method handle is not of variable arity, the current method handle is returned. This is true even if the current method handle could not be a valid input to asVarargsCollector.
Otherwise, the resulting fixed-arity method handle has the same type and behavior of the current method handle, except that isVarargsCollector will be false. The fixed-arity method handle may (or may not) be the a previous argument to asVarargsCollector.
Here is an example, of a list-making variable arity method handle:
a new method handle which accepts only a fixed number of arguments
And what the hell is that for
You must have a lookup instance in the same package as the class being defined
You could throw in a placeholder class in every package you want to create a class in and use those for the lookup instance ig xD
Ew
Works tho
That was the replacement after removing Unsafe.defineClass in Java 9
It wouldnt exist in source
You could probably use something to generate it at compile
mhm
But does that actually work, considering your code is still foreign?
the jarinjar technique luck uses
Tried to get diff packages to load
is an example
But only same ones do
I wonder how many things are pretty much irrevokably broken now
Doesnt luck just use his own classloader to load all the jars up?
I mean ever since Java 9 it was pretty much foreshadowed..
Sure, warnings and all
There isn't even a flag to disable this is there
Yea they wanted Java to be a "Secure" language
Jokes on you Oracle! If it was actually secure reflection wouldn't exist!
xD
lol
At least not that part
Its still requires a class to already be in that package so ig the point is to not create new packages or something
idek
xD
Also agents still work right?
So, again, is it possible as foreign code, yes or no?
yup ๐
but require like a boostrap class
How are agents going to solve this
let me send a link
They can load classes into the current classloader right?
But this is part of the module system, I don't think they can mangle with that
hmm
I mean its not like you cant load things dynamically at all
Like agents won't allow you to export a package at runtime
The issue is you just need to create your own extended urlclassloader and use that
Cant append to the application class loader
This is only specifically for URLClassLoader though, the issue is much bigger
hm yeah
Wait
in conclusion: java sucks
That just seems to append to the system classloader
I'll just wait until C++23 is out and I get compile-time reflection ๐
Wouldnt the actual classloader not matter in that case as long as you delegate upwards
screw reflection
Take on haskell
Enjoy
At least it has specified primitive defaults. Poor C
Poor C when?
What i'm saying is, url class loader by far isn't the only thing affected by this
Oh ok
Or class loading in general
Hey how big is that int? Could be 4 bytes, maybe 6, maybe 3
imagine if someone made a dynamic numerical primitive
like it only uses the number of bits it needs to use
numeiaaroirical
BigInteger but primitive??
what is the keybind to change language in windows?
๐ฎ
lol
Let me introduce you to the haskell Integer type
why do I ask here as well? Whe theres google ...
Let me introduce python's int
Someone make a patch for BigInteger.MAX_VALUE
Now stop right there at the word python
BigBoi.MAX
Zip bombs? Never heard of em
Yugi are you telling me you are getting a boner now?
I mean with your pfp ๐๐๐
Nah I meant yours
lmao
Traitor
Anime chick pulse
https://i.imgur.com/tU4tXcu.png I bet its Guyanese Dollar
MeLee
Oh god
hes everywhere
Peruvian Huevos
its beautiful
Clash?
for this budget, the description is really small
#827055634586271775 message
He just needs a minecraft website
bedwars tournament wut
What more is there to know
minecraft.net, wheres my $9,000?
In your debt balance
Guyanese Dollar I'm telling you
tf is guyanese dollar?
also my keyboard keeps switching to fucking romanian. Wtf is this shit
9000 is about 45 USD
oh
lmao
lmao
Oh guys guess what I got $112 stimulus from my uni
omg so cool
xD
112 that you'll gift to me? Thank you so much
Bro I don't even have it
I'll invest them in stocks and then make you rich
They just said they did but I don't have a linked bank account
nice
Also why would I buy Adderall lmao
to keep yourself to the max ๐
yeah that's what you think when you don't play with high sensitivity
High sens and Adderall does not seem like a good combination lmao
Oh I got mailed an offer for Android dev
:o
Altho idk where tf they even see that I even use android
None of my android projects are public
Kotlin go brrrrr
They just knew
lmao
Kotlin
must be someone from google that forgot about the privacy policy
My git* has more Java/JS than kotlin afaik
Google? Microsoft owns github lmao
Yeah actually I'm gonna too
Sir, this is a Wendy's.
I've been laying in bed procrastinating
I really want to do that
But my phone only has 11% charge
Waiting for it to get to like 50
So I can atleast watch a movie
You don't have a charger that goes to your bed?
10 foot charger gang, cost me like $8
lmao
Yo @ocean quartz one more question before you go to sleep. Is there a way to clear all the items in a PaginatedGui? Since I have that schedule that reads the items so basically the menu updates but what it does instead of just setting them over the old ones, it just makes new pages so I just have duplicates
I just realized
is android dev worth learning?
my pins require only 1 more language to be completely 6 different languages
Not right now, you'll have to remove them i think
Yea its nice
My internship rn is as an android dev
I mean if you already know kotlin is pretty easy
Oh shit. Alright. Yeah searched thru the methods but couldn't find anything related
this will really suck
The framework is a bit scuffed
that's the thing, when I first wanted to try android dev all tutorials were in kotlin =/
For good reason wdym
didnt said it was a bad thing
yea oracle/sun sued google for using their libs initially
so they did a major switcharoo
Not sun, just oracle
I think it was sun
bruh what
Or it was oracle?
Oh I wonder if I use PaginatedGui#getInventory#removeAll
damn
Oracle bad company
sounds stupid lol
Sun good
That'll remove them from the inventory but not from the gui
yea google won like a week ago
Yeah they finally lost in the supreme court
so google just used java for android and god sued or?
Essentially they got sued for using the api, but the supreme court ruled that apis are free to use for everyone which protects like all programming ever
it compiles the jvm bytecode to android runtime bytecode
@static zealot ((Map<Integer, GuiItem>)PaginatedGui.class.getDeclaredField("guiItems")).clear()
I was just about to try PaginatedGui#getGuiItems#clear
Would that not just clear your map you just made
pretty sure that returns an immutable copy of the actual map
oh that's nice
Nah it's currently not immutable, but it'll
lol ok matt
with a few android alternatives to some of those classes
is there a list of projects for beginners to do on android?
like I want to try it but idk what to do
The official website has an intensive guide
Find the training option that's right for you.
Yeah what's piggys challenges for Android lol
They have enough challenges in those I think
Certification and degree programs
Nice
A bit
๐ญ
The view editor handles most things
its not that hard gab
Its actually really simple to use
it is horrible yug
and why do people - esp from india - call me gab ๐คฃ
gaby seems weird to say
idk I cant get my head around the xml android uses
try it once
yeah
Apply the same logic you would use there
You have tags and tag properties
Having a tag inside another tag makes it a child
diff layouts provide diff ways to position children
Most used ones being: ConstraintView, RelativeView, RecyclerView...ect...
ConstraintView is made to work perfectly with the editor
So you wont even need to work with xml directly with that
ok it doesn't sound that bad
mhm
what do you do in android?
Well currently I just dev a few apps for a company
I and another dude, its a team of 2
a few apps ok
That was such a weird sentence, I had to stop and think for a sec
lol
huh? xD
ignore me it is 3am
I just said that because Im not supposed to be too specific
I really don't think android development is like rocket science haha
mhm
I mean most apps are like websites made for phones
Take as example an app like amazon
A lot of them are actually a web app
Like with react native
Flutter does the same I think
They are cross platform
said no1 ever
๐
lmao
would u like to retract ur statement
nah
๐
well I guess no updated items for now
@forest pecan I made it work, I am just iterating the recipes right now, want me to show you the messy code I did lol?
oh what a plot twist
wait I didn't actually know this https://i.imgur.com/NbLp9ut.png
How's life noob @onyx loom
He's probably right
^
pain.
sure lmao
Give me a couple minutes
csgo 1v1 when?
So I have 2 methods:
1 Loads a list from a json file, 1 saves the list to the same json file.
The load method is only ran the plugin is enabling.
The save method is ran when the plugin is disabling and every few minutes.
Now my problem is that when the plugin enables and there's a problem, the list will be empty so if the server gets stopped, it will basically delete everything in the file.
What I do right now is, when there is a problem with the loading, I stop the plugin and I tell it not to save by basically using a boolean that becomes true only when I force stop the server.
I was just wondering if this is ok or maybe there's a better way?
I haven't tested a shapeless recipe, but it should work
https://paste.helpch.at/tugiguxege.java
that's a big boi
Ignore me making a singleton for no reason too lol
does singleton mean just a huge class with everything in it?
I can easily beat you now
ok sure
if i win u have to buy me a game on steam ๐
ok nevermind I'll let you know when I'm ready ๐
๐ฅฒ
It also probably wonโt work with items that have a stack size larger than one
I don't fully get the "force stop the server" part.. but I suggest you have an "enabled/loaded" boolean field that initializes as false, then you set to true at the very end of onEnable and then check it in onDisable, if it's false means the plugin didn't start up successfully and you don't save the list to json, if it's true means you do
yeah that's basically what I have
but I also stop the plugin when it doesn't load successfully
same principle? the boolean will not be true until the very last stage in onEnable
I do that because If I'd just leave it like that and no one would notice, everything that was added to the list during that session won't be saved so I just force them to fix it before letting them load the plugin
Almost same. It will be false by default and it will become true if something has gone wrong. And if something has gone wrong indeed it won't let save to the file and then stop the plugin
eh I guess I see it as a "true if the plugin was loaded and enabled successfully" instead of "true if something's fucked up"
Matt
So what do you guys think about this for the future mf-gui update:
triumph-gui and triumph-gui-legacy
val gui = GuiBuilder.paginated().title(Component.text("Hey")).rows(6).build()
val legacy = LegacyGuiBuilder.paginated().title("Old hey").rows(6).build()
Same thing would apply to ItemBuilder, where components would be primary and there'd be a legacy version for it
This is the only way i could think so far to support both ways
@frail glade your opinion is important in this one ;p
Will do on the update, currently it doesn't
That seems fine.
GuiBuilder and GuiBuilder.Legacy 
Yeah fuck legacy users
you get with GuiBuilder#legacy()
force them to add an extra import
Well the legacy would need to be separate from the main one though
Isn't a nested class separate enough?
The issue is that if I add a nested class people that want to use on let's say 1.12, they would need to have adventure so they could use the legacy one since it'd be in the same class where components are present
Yeah big headache because of legacy
fuck them dont support it
can someone take a look at #placeholder-api please ๐ญ
its literally been 3 minutes
you haven't sent any possible info
or any configs or anything
how are we supposed to know lmfao
and also, don't ask in other channels for help.
be patient
no, I'm the doctor
lol
i guess you have around 50 people a day like me that are probably that stupid that there is just a one button to turn it on and its common
im sorry, but I have no idea
about placeholder api
and its not usually one button lmfao
This is a community-based community support community program where the community (and sometimes others) help out freely on behalf of the community
Most of us devs can't even help you cause we code yes
but that doesnt mean
we know every other plugin in the world
lol
oh gradle
switch to ant bois
lol?
#placeholder-api: PlaceholderAPI plugin support
#general-plugins and #general-plugins-2: General plugin support
#development: Coding support
#minecraft General minecraft talk
#dev-general General talk for developers/coders
#off-topic Other talk that doesn't fit to any other categories
#bot-commands Bot commands
#showcase Showcase some work
#827055636109328384 Offer services
that's.. really all what helpchat is
Kinda sus 
lol
Yea
Why is abstraction such a headache to do well? ๐ฉ
True ๐ซ
just make every class abstract
Thinking about stopping using InventoryHolder, that'd make much easier to abstract since the gui wouldn't need to worry about title or anything only about the Inventory
Though only solution i can think of is a private static map that'll be passed to the event 
Gotta try that!
md_5 yells at people who use a custom inventoryholder and wants them to just use a map or something instead
Yeah
I don't mind using it, but it's making it too complicated since I'd always need to create the inventory inside of the class itself
If I use a map I can make sure that the inventory is created by the builder, so components can be used there
@forest pecan
I'm not sure what I did...
that is a whole lot of dirt
I agree
I don't even set any items inside of the crafting inventory, only the result
you clearly have over 100 million dirt in the crafting inventory smh
Every time I clicked the result of the recipe it multiplied lol
is guilds plugin not apart of this server?
Why so I have a feeling that request paid is cap
Lol
The 9k one? Lmao yeah very sus
Updated. Off to bed. Night.
โค๏ธ
@prisma wave genderswapped bm???
oooh~
thoughts on using java for csv downloading then uploading
cause i hate python
What's the downside of using java
that's a good point, I was just wondering if it was like really hard to do this kind of stuff with java or anything
cause python is like, the lang for easy file stuff
python would definitely be easier
But http stuff in java isn't too tricky
Especially if you use java 10+ with the new http library
ah okay
I don't really know python that well so it would probably honestly be harder
Verbose af but except that itโs poggers
new java isn't that bad
Which version are we talking?
latest
like 15 or 16
Java: Haskell
Yeah it got better significantly
records are great, the new switches are cool, var and List.of and stuff are useful
Wait List.of ?
Yes
d;jdk List#of
static <E> List<E> of()```
Returns an unmodifiable list containing zero elements. See Unmodifiable Lists for details.
an empty List
Java 11 addition
I should probably look at all the new java stuff
Well we have Collections#emptyList?
Ah explains it
that's probably just jdk 8 or domsething
So basically ImmutableList.of but now in jdk
list.of becomes a vararg after like 10 elements
Why not sooner tho
Optimizations probably
damn the switch expression in java 14 is kinda cute
once they add proper pattern matching it will be even better
i really wanna learn haskell but i get bored too quickly ugh
is ZGC good for minecraft servers?
think aikar said its somewhat unstable but not certain
huh cause it sounds pretty good on the changelog pages lol
hmm I think he mentioned how it could eat lots of memory if it needed without any concerns but I can't really recall since it was some months ago since he spoke of it in the spigot discord
ah okay. just excited for the future of java!
yeah same lol
im happy I got a cameo in Frosty's screenshot :)
Dew it
Haskell is not boring
github down for anyone else? edit: It's back that was odd.
there's no github licenses to stop things being used in private? 
Whats the point of that
A certain user has used the pmines plugin me and bm made and took full credit for it so I want to stop people doing that.
he doesn't have a license on it yet lmao
Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.
ugh I hate GPL 3
I mean neither me or BM expected someone to straight up take the code.
Who did?
Then whats the issue
?
^
I didn't, did i?
but not privately.
Very common
As long as he isnt selling the whole thing as his own work, he aint doing anything bad
yeah there are people who get paid to add hex support to deluxechat before it's officially added lmao
mhm
It happens with a lot of plugins, including glare's ones like Guilds or VoteParty.
i mean that's just the FOSS experience
I mean Glare is smart and just makes the changes for those people for money lmao
xD
if anything, it's good. maybe you'll get wind of the changes and implement them yourself yeah
Yo java is backwards compatible right? So If I move my dedi to java 11 all my java 8 plugins should still work? Or at least most of them? xD
JDK's are backwards compatible, JRE's are forwards compatible
so if you have like java 15 installed on your dedi, any plugin compiled for versions before and including java 15 should work
Including Java 15 obviously
Isnt it the reverse?
nope
huh
JDK 15 installed on my machine can run anything below it
something complied for JRE 8 can run on my JDK 15
JDK is forwards compatible as things compiled for older versions can run on newer versions
well I guess it's not really JRE vs JDK, more version you have vs compile target
https://stackoverflow.com/questions/4692626/is-jdk-upward-or-backward-compatible#:~:text=The compiler is not backwards,the -target 1.4 flag).&text=JDK's%20are%20(usually)%20forward%20compatible,are%20(usually)%20backward%20compatible.
the compile target just has to be less than or equal to the version you have installed
now we're getting into pedantry lmao
so basically the answer is yes, they will work?
Yes
kk. ty
Some things might break due to the module changes, not really sure
well now to find how to update
Depends on what the plugins do ig
Well yes, don't tell me you don't watch indian dudes code on yt
im sorry sir, but i excel in my coding abilities, thus i do not have to rely on "indian dudes code on yt", nor "luck"
Heh, and then you wake up
๐ญ
Ngl, I've actually made a fair few plugins recently, in a way that I've made the entire plugin without testing just structuring it in my head and then making it, and most actually worked properly, some needed some fixes tho cause I'm dumb
Those are the worst
Only person I watch code is Sebastian
I try to prefer some short courses instead of such yt videos
Only tutorial I've watched was from Tim Buchalka or whatever the dudes surname is
guys can someone pls help me with send me a manhunt script and a script too do so if i break leaf in minecraft I get random item
It's a class lmfao
script?
make it... return... a new.. builder?
what?
I need a script so i can make a manhunt with a twist u see
builder() will return an instance of the builder class
in the main class
but it is empty
this is what I'm saying
class Whatever {
public static Builder builder() {
return new Builder();
}
public static class Builder {
private Builder() { }
}
}
builder() will return an instance of the builder class
yah but make the ctor private ;p
k
Pulse
?
can u help me with a plugin i am currently making
?help
ยป Give the helpers some details
ยป Ask suitable questions
ยป Be polite
ยป Wait
Ok
k
I can't find a will to live either yet here I am
@vagrant token How are plugin configurations plugin dev? I confusion
have u not saw the new update patch notes?
for?
lol dude used the format for request-paid in offer-services
in version 2.5.9, plugin devs are now configurators ๐
even put a budget in
lol use maven noob
No need to shout.
Are you stupid or just dumb
2.5.9 ? what is that MF GUI version?
Stop being an idiot when someone offers a solution
Yes lmao, kill the program, and let it run again
it is a good solution lmao
You say it's been stuck for 30min so why wouldn't you do that lol
close the projects, clear .idea folder
bruh
closing the program is usually a completely optimal solution
maybe its the bad connotations of alt f4
if u said close program, maybe thats helpful instead ๐
open program manager, and kill the program
delete the project
๐
The best comments explain WHY your code exists, not what it does
#code #comedy #shorts
Inspiration: https://stackoverflow.com/questions/184618/what-is-the-best-comment-in-source-code-you-have-ever-encountered
gpl or mit
what for?
mit superior
for some damn reason
when i code in kotlin
i keep typing def
for methods
python flashbacks
๐ฅถ
๐ฌ
scala gang?
lmfao
I can use IJ for rust right?
iirc there is a plugin yeah
ยธIndeed there is
CLion is more apt I think
I see, time to download
CLion for haskell
I will slap you
Go on
xD
absolutely destroyed
yikes
does kotlin have tenary operator or whatever its called?
yeah that's what I use xD
lmao jetbrains just chooses a different opening theme for each update
its intruiging
Can I import IJ's theme to clion?
Yes
๐คฎ
That's even worse than IJ Fefo
that's what he said
๐ณ
yeah i'mma sue them
What..
๐
yeah Frosty questioned him too but didn't receive an answer
well at least I didn't see one
lol
lmao
@old wyvern gimme link to download Cargo
ty
yeah k bye bardy
the new splash screen is actually awesome
I love the patterns
they're really cool
HaskStorm splash screen is the best
Dude
actually
what if
Time to fork ij ?
๐ฎ
I knew you were gonna say that
Side project number 35?
hire a ghost worker
BRIGHTTTTT
gotta import my IJ theme
ok so i got https://i.imgur.com/npCBKXy.png
but it posts https://i.imgur.com/WbMuQSX.png 2 %'s why?!
I mean it does the decimals 
you what
I mean you put the extra % yourself?
it's in both the format and the sendMessage
there's barely any benefit to using CLion exclusively for Rust
i did? 
yes
Remove the % sign from the decimal format, change the type of percent to double, and change the 100 to 100.0
that should do it
you must feed microsoft with restarts
most windows processes are disabled xD
atleast i get to blame bm for these errors
It's always bm's fault anyway
Help, I stuck
๐ฅฒ
ยธHelp Yugi
poggers?
Now time to spend hours on the docs trying to understand it Frosty
Have you installed c++ build tools?
Why is the println function so excited
Rust is very excited
macro
I've read all the feature summary docs for rust but haven't ever used it and probably don't remember too much of it :L
off to find out what macros do again
They do what macros do in all languages
I tried it once, suffered for hours trying to do something simple ๐ฅฒ
Yeah thats rust
alright so the syntax for defining macros is disgusting
using them looks neat though
macros_do_not_rule!
What is a macro?
Does stuff at compile time
code that writes more code
That'll be a no
Functions that return code that replaces your code at compile time
Yea seems you need that
You're probably better off asking matt for help with this
I've never used rust
The error should tell you when no compiler can be found
No error when running rustup?
The installer said I needed c++ build tools, but as bright I am I didn't read shit and just entered everything so 
Is there no way to set the amount of decimals for a Double in kotlin?
yes
DecimalFormat
so many ways
Now to figure out how to make a display etc in rust
I presume there's some nice libs which will make my life easier
Why rust
Because
Oxidation
Don't you dare say java
Not rust
compiles to elara yes
Meh
HEY what
Rust is perfect for every application

rust is perfect for every application when you're on adderall
๐ณ
does anyone know where I can find a full tutorial on github markdown?
Is this all there is? https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown
I mean syntax doesn't look so different
Does it compile to the jvm? ๐ฎ
Does windows terminal have a in-terminal text editor like vim?
I mean syntax doesn't look so different
My man is in for a ride
notepad.exe filename
It's got a css vibe
๐ฅฒ
wot
gtk::{
tf
There's no built in terminal editor, no
rip
Lmao that's fucking bs kek, you need to start a trial in order to see the entire code
Windows Terminal doesn't have to do anything with it
just WSL bro
I mean windows used to ship with a 16 bit editor
Yeah pretty much
bash -c "vim filename" is your best option
Alternatively don't use Windows
Not much of an option
btw, does unreal not work properly on linux?
Some guy said so in his game presentation
like in my class day before yesterday
Probably not tbh
rip
ur working with unreal now? 
I see, are you also making a game for the class?
What's the game about ๐
A parkour - escape the room type of game
๐ฎ
Anyone want to bully me on some changes I am doing to mf-gui?
What type of game efe?
I want to be able to know what the menu looks like before it's even built, thanks
use unity 
unity in mobile ๐ค
yeah
lol
(including unity
)
idle game for unity tho ๐ค
Question is whether it's worth
So I am trying to change away from implementing InventoryHolder, since it'll make my life easier to add components support
My current solution is the following: (don't really like it that much)
So on the BaseGui I'll do:
@NotNull
private static final Plugin PLUGIN = JavaPlugin.getProvidingPlugin(BaseGui.class);
/**
* Holds all the instances of BaseGui that are currently opened
* This is to avoid implementing {@link InventoryHolder}
*/
@NotNull
private static final Map<Inventory, BaseGui> GUI_HOLDER = new HashMap<>();
// Registering the listener class
static {
Bukkit.getPluginManager().registerEvents(new GuiListener(GUI_HOLDER), PLUGIN);
}
Then on the GuiListener:
@NotNull
private final Map<Inventory, BaseGui> guiHolder;
public GuiListener(@NotNull final Map<Inventory, BaseGui> guiHolder) {
this.guiHolder = guiHolder;
}
This part bothers me a bit ๐ฌ
But basically it'd make it simple to check the gui, on open I do GUI_HOLDER.put(inventory, this) then to get on the events guiHolder.get(event.getInventory()) then remove it from the map on close
Idk what an idle game is so
cookie clicker type shit i think
Yeah probably don't need an entire engine for that
Forgot to ping, @old wyvern, @hot hull
Seems really easily prone to breaking/funkiness since bukkit a whore
As in detecting when to remove the menu
Might wanna check what Inventory uses for hashcode before trying that
Yeah it really is which is why i don't like it
For example I'll need to check if the viewers of the inventory is just 1 or else don't remove it
Doesn't seem like it changes anything so the base hashcode
Otherwise that'd actually be a decent way for handling it ngl
ah then it should be fine ig
Do you think there is any better way of doing this?
You could keep track of the viewers maybe?
Would still be practically same way as this
hmm
I could also store stuff on a WeakHashMap iirc it gets removed from the map by the gc when the reference to the instance is gone, but idk ๐ฉ
Might just go with what I have
Yeah
Very smexy
Imma PR a kotlin dsl
Oooh nice
builder pattern is obsolete in kotlin
use named args with defaults instead
for static factory
Just an object
of usage of object?
uhhh
What do you want an example of?
use named args with defaults instead
this
class Human(
val name: String = "dkim",
val age: Int = 15,
val height: Int = 150
)
fun main() {
val olderDkim = Human(age = 20, height = 170)
}
ic
Older taller
xD
just an example
when do i make something a data class and when do i not?
like would bukkit Player be a data class? since its holding data? or just classes that hold data that don't have any methods?
just classes that hold data that don't have any methodsUssually yea
Where you would use POJOs
"What is POJOs"
data classes generate a normal hashcode and tostring implementation with their fields
Plain Old Java Objects
dkim is 15 ๐ค
There dkim you didn't need to ask this time xD
๐ ๐ฅฒ
xD
no idea
A player should
Player, world, inventory, things that hold data
Bridget
Bridget here
what is a bridget anyway
Brigid is a Gaelic/Irish female namewut
An alternate meaning of the name is "exalted one"
Mrs. Bridget Monad
Exalted Mitten