#dev-general
1 messages ยท Page 502 of 1
allman no
bad
allman needs to go sit and think about what they've done
and how they ruined like, 1/3 of C#'s semantics
but also, it's a lot harder to read
mine?
but what if String was something like DeluxeAsyncJoinPlugin
what about now with syntax highlighting
in that, since the args are variable lengths, you need to read all the way until a comma to find the next one
okay the colors help
then it'd go over the margin
that's ok though
the point is that it's before the margin MOST of the time
it doesn't have to be perfect
no if it's only like 10 chars over I just go over
I only do 1 per line if it's super super long
which can happen with guice injections
ic
Well then you just have a strict margin with extra steps
is that a THEME I see??? ๐
๐
i also have a background picture
default IJ ftw
Yeah no
Atom one dark best
im sensing a lot of allman hatred rn
I use the basic dark theme + background picture
care to elucidate?
no
Yes it is
but its built in
no??
?????
what??
thats the default IJ dark theme
It's even called Darcula lol, it's a theme
its installed by default??
Unless I am referring to a different theme
Being default doesn't mean it's not a theme
^
Default IJ comes with 2 themes, Classic Light and Darcula
no, cause you didn't realize lmao
wait... bm is a console gamer?
are you adding to an arraylist on every single message
thats disgusting
why
absolutely gross
it works
and it's not like it's a new arraylist
:))
bad code
oh dear did i trigger everyone by accident?
Horizon used to be playstation exclusive right?
yea
isn't horizon made by microsoft
should I OS this bad boy to trigger ya'll all?
forbidden west will only be on ps4/ps5 afaik
You're probably thinking of Forza horizon
yes
I also catch a NPE.
Noooooooooooooooiiiiiojikjwiq
didn't know there was another horizon game
Horizon Zero Dawn is a 2017 action role-playing game developed by Guerrilla Games and published by Sony Interactive Entertainment.
Yes
Jump off a cliff
Jump off a cliff

cliff -> you
We have a another matt now?
An amazing game
oh they left
does it cost money
you guys are funny
or not
Frank you have no final
He's typing a book
u stoopid
matthew this essay you're typing better be fucking good
no they give you money to play it
xD
how can i commit this code without leaking the login code
Free on PS4/5 now afaik, on pc it's like $20
get a way to get the login code like a config or something
Inb4 it's just "Hey"
but yes absolutely amazing game
what do u do in it
Separate those as environment variables or a config file an exclude them
is it like ark or rust
or uh, command line args are really easy
Nah

true
Action RPG I guess, not really survival
skyrim?
I love/hate ark so much
I almost wrote the command line args in but i thought no point
I love the game, I hate the stupid bugs
more of a rust guy myself
I like playing ark with friends
not public servers tho
fudge it, lets os this bad boy, 2 secs.
William Andrean Shakespeare!
Oh yeah i don't like public servers either, just play like co-op with my fiance
have u played crystal isles map?
not the official one
the old community one
it's so good
best map ever
Not yet
Oh shakespeare is back
imagine having a fiance 
When do we get our illyad?
if it's still possible to install the og version, definitely give it a try
it's a really good map
has so much cool shit
Hi Guys.
I want to know your opinion as a developer (new or experienced) regarding the difficulty & effort to start making our own functional plugin & make it works smoothly (well optimized not causing lag)
I run a minecraft server with my friend as a hobby & side hustle. i came to the point that plugin devs keep asking for $ for a bug fix or small feature request (adding notification when received something) and it starts troubling me.
So i have this in mind while configuring our server that i should start making my own plugin. I want to know what i'm facing ahead. I have very minimal programming experiences, and a very little knowledge as of now. Also is are taking paid courses worth the money? I dont mind spending some $ to speed up the learning progression.
Ty in advance.
Oh my
holy
The best map imo was extinction, and just because of 2 things, the orbital supply drops were awesome, gave something important to do, and the snow owl is the best creature
functional plugin
extinction...
YES
what season pass is that?
I only have the original season pass
A
ok ๐ฅฒ
Was the supposed "last" dlc before they started milking it more
Take a decent java course, doesn't have to be paid. Then you should have enough knowledge to know what is gonna be optimal / crappy
to add onto this, decent courses do not exist on youtube
should I do the token from args[0] ?
This one
yeah just reading the javadocs and stuff once you know enough Java, you should easily be able to make some nice stuff
I think there are a few decent "pure" java ones
I didn't like the titans too much but the small things were pretty nice
too hard to find
or looking at the source code of others' plugins (not Odin's)
not worth the effort
WHAT
WHAT
dude pluralsight is from my state, it's pretty cool
after what you just showed me, I don't think you can be trusted as a source of teaching
I used to teach kids to code LOL
are sites like udemy, a good place to invest my time & money for their courses?
not sure sorry, I've never done an online course
I mean if you're teaching fundamentals then there's nothing really wrong with that
gian has said some good things about the tim buchalka course on udemy
Yea the courses on there is top quality, not even coursera can compete, the only one there that I felt slightly boring was the clojure one
no i mean, I used to put listeners and commands and it all in one file @prisma wave
The instructor for that course was just blant
ooh hoo hoo
Probably good enough to do something like the website Solo learn for Java
Then start doing small things like Piggy's challenges
Then pass by #development and get bullied into writing better code
Its pretty great
๐ฅถ
Search for Haskell Fundamentals Part 1
Theres also lots of resources for Java
Sounds fun ๐
And some for kotlin
=faq delete main
@quiet depot, Deleted: main from the FAQ list!
oh no!
Noooooooooooooo
I'm realling not a fan of the trolling when people are asking for legitimate help
end of an era ๐
yes this is not an appropriate time
it is only acceptable when people are being annoying
Lemme just sort out this token thing in this bot then i'll let you guys roast me ok?
wait what
i was just trying to see if it worked
not when rands are being annoying
I never said anything about it when you guys used to do it, but now that you are staff you should definitely not use that wiki anymore, if someone asks in the wrong place guide them to the right one
Yes we need to be nice to everyone - if someone is using the wrong channel we must NOT give them links to random functional languages
i wanted to see if ?main still existed
Yes we must!!
They deserve to learn the truth!!
Wait what
my gosh this takes so long
you can do it on my behalf yugi
anyone who it's relevant to
I bestow the responsibility onto you
staff getting reprimanded for pulse's actions ๐ฅฒ
ban pulse
๐ฑ
I wasn't really addressing staff specifically
was mainly pulse
but anyone who it applies to should take note
Just ban pulse my guy
oh yeah that was Matt sorry
piggy why wont you use the forum
my thread
that's th eonly forum I use
jesus fuck, so many support
I think we have 11 support members now
hehehe
Uh me what? Sorry got lost in the conversation
we're spreading
Dammit where are these gifs when you want them
I never said anything about it when you guys used to do it, but now that you are staff you should definitely not use that wiki anymore,
Ah yeah
hahah
xD
Piggy, can faq be an image?
This should be one for when people don't explain what they need help with
prefer to link them to an appropriate question asking resource
stackoverflow has an excellent one
Was there a x y problem faq here?
maybe he's a true neutral, arguing both sides
Based on your question, we think you may be having an "xy problem", which is where you ask about your attempted solution rather than your actual problem.
Please read the following and re-explain your original problem so we can better assist you: https://xyproblem.info/
Oh yeah i remember that one
I guess so
@forest pecan your second paragraph, where you talk about poor youtube tutorials
youtube tutorials in general are usually poor, regardless of topic
Stanford professors with youtube courses ๐ฅฒ
yeah idk about those
never watched them
ik mit has a bunch of online courses u can do
speaking of which it's insane how many of my friends don't recognise famous universities
none of my friends recognised the name "MIT"
lol
what
just randomly came up in conversation recently
Literally the best uni in the world
yeah idk
like usually I'm the ignorant one on irl things, because I don't keep up with the news or use social media (apart from discord) or anything
Tell that to sheldon!
was shocked that they didn't know such a famous uni
they've obviously never contributed to open source projectsz
it might be because prestigious universities don't really matter in australia
a university is a university
your education will probably be decent regardless of where you go
best uni = best license ๐
unlike in america where it varies
i mean all unis are pretty dec I'd say
and most of the time it really doesn't matter where you got your degree from, only that you got a degree
idk if we have community colleges
we might but we might not call them that
never heard them being called that
put that in an FAQ answer lol
probably relocation
Shoudnt matter as long as package is unique
^
for this
the whole "Main" argument imo is useless
no it definitely has merit
@prisma wave am i a cool kid now https://i.imgur.com/uKMHYiK.png
pulse using paper-writing strategies
Yes, because I have to write essays like every week
So I wanted to blow some steam off
for english?
Yes
feels bad
anyone wanna roast some code
Sure
That's why my thread about some tiny topic is so huge for some reason
this doesn't even follow essay structure though
just don't mind the name
it doesn't, its freely formatting
sure its bad and whatnot, but like if u guys are in a support channel, the first thing i see sometimes is dOnT uSe MaIn, people are there for help, not to be told why a class name is bad. the issues should be solved first before any bad practices in general
wat
smh imagine not using my lib
- Usage of deprecated "compile" configuration
https://github.com/UntouchedOdin0/VerificationDiscordBot/blob/master/build.gradle#L28
handles it all for you ๐
my commits are now verified
Well, actually it should technically be the opposite, but..
cause they should already know basic stuff like that
first before
wot
I disagree with the whole "learn java" thing
I have heard both arguments now, Sxtanna used to say that if you fix the smaller issues the big ones will fix themselves / become more obvious
I say help them learn java
the compile dependency configuration is deprecated, use implementation instead
just learn java
It came mainly from spigot discord, as a lot of us came from there
no it didn't
the learn-java thing
it's been around for a lot longer than the spigot discord has existed
it's not from spigot
True
it's not even unique to helpchat
for modding too
though, in an enviornment that you are asking questions about an API (and specifically states in the discord channel to NOT ask Java questions), mainly referring to spigot discord channel help-development
Then, yes, I would be extremely pissed
doenst apply to hc
tho
the majority of people won't want to delay their plugin for a few months to learn java
i feel bad for their plugins then
i was lucky and didn't get ?learn-java spammed ๐
nothing wrong with that approach
I learnt java through plugins
Its not good..
just going to point out
see i just had a policy of not asking questions until I had tried for like, half an hour at least to solve it by myself
@pale shell
Why public?
https://github.com/UntouchedOdin0/VerificationDiscordBot/blob/39558be9dd74f2c59bd56391c87aad64d62221dc/src/main/java/com/verificationdiscordbot/listener/ChatListenerEventBuyers.java#L17
it's a perfectly fine way of learning java
I try to avoid saying it, although it's very frustrating when someone doesn't understand the most basic concepts so you can't actually explain what they're doing wrong
^^
usually you can figure it out yourself as long as you know a teeny bit of java
yea what BM said
that's how the api came
I'd only really say "learn blah" if they're struggling to understand the most basic explanation
package private ๐คข
We meet like 50 of these kids each day
there's also the issue that some people are just incapable of coding from the start
people who struggle with logic shouldn't code
those god damn server owners
java is a very complicated language (although once you learn the basics its sorta simple)
what on earth is that
that want a custom plguin
you know the featherboard guy?
Nial?
Its Odin's verifyer bot or something
๐ค
he wrote the spigot thing
I mean that class in particular
and i implemented it
if(false)
java ๐คข
Im talking about your implementation
code is logical
if you're not a logical person you're going to struggle with coding
@pale shell remove the gradle folder from gitignore, it should be committed as well (don't confuse it with .gradle, .gradle should be stayed ignored)
u can
yeah unless it gets mutated thats definitely not working
please stop embeds
<link>
ok
also need a protocol at the front
or just delete them
Nice
wtf
*emilyy
wtf
hmmm
dkim have you considered learning discord-style markdown
hurry where's the FAQ
AAAAAAAAAAAAAAAA
oh nOOO!
?discord-style markdown
yes
uh
We are waiting for the perfect moment
I thought maxim was one of the people who knew what he was doing
And then we do a little trolling
really? i always heard the joke that featherboard is as light as a brick
lol
There's probably a reason for that
Allows it to be set from another plugin or something I'm guessing
Look at that entire library bm
yeah it's a bit weird
so did I
Although 3 years old, so that's kinda an excuse
but he wrote some proper donkey code into EZBlocks
Yea i guess so
rewrite WHEN
I have made many a custom enchant
See pinned messages in #development
I know you have the api thing but i need someone to write some what i can use with UPC.
ultraprisoncore has it's own enchant system and all you gotta do is write the enchants and that's what i need
dude imagine being cool enough to have like, 5 pinned messages in #development
what a cool guy that bister mittren is
yeah I wanna be like him when I grow up
xD
shame that cool guy bm doesn't accept money anymore 
ill happily take it
?
If you can legit help get these things done the moneys there for you. Being serious
what are you talking about
I need to hire someone to get some things coded asap.
what needs to be done
no dont
he needs an entire server implementation written in Kotlin within the day
im just asking ๐
ez
trash language
It's a bunch of plugins, i'd rather take it to dms because I don't wanna fill up this chat.
sounds like effort
Well the chat is very busy right now
yeah sounds like free advertising to me
you're interrupting about 4 different conversations rn
i was gonna make a couple contributions to private mines the other day actually
Well, moneys there for you, up front and on going.
more information required
but i decided against it because i saw u needed UPC to build it, so didnt wanna fuck anything up if i were to change something lol
I need to get a basic enchant system sorted out and also I need to get some sort of basic robots system created
I am going to make MittenPrisonCore
idk see what ultraprisoncore does
I'll fund a core off you if you can make one.
what does that mean
probably combines autosell and and like ezrankspro into 1 lol
yeah pretty much
yeah definitely worth $20
๐
prison core plugin Speedrun
any% or 100%
I need to get a enchant system and also a rankup system made which works together.
How much would that cost?
min%, publish it on mcm for $30 with the minimum possible effort
Lots
Name it
10000$, 50% upfront ๐
150
dude mitten is such a good brand name
Ok, I'll sort it.
how have you not used that more
Good question
@prisma wave Are you really busy with comissions at the moment?
haven't made anything public that's actually good
MittenDependencyManager
hire me ๐ฅฐ /s
Would you be able to take some comissions? Serious question.
Yeah hire dkim
what do you need done?
can vouch for dkim he built me hypixel in 2 days good dev
I will do 150 for the enchant and rankup
I need to get a enchant system built mainly
see i just haven't made anything good at all
However I may give up on the commission at any time to play more terraria
bm, if we were talking real numbers how much would you be looking for
150 is real numbers
Wew
Maybe 100 but if I'm charging $15/hr that seems reasonable
what
bm provides only the best work
dkim you can work with bm if you want
and constantly makes haskell references while coding, which is worth $5 / hour alone
lol
bm can i just dm you for a bit
not here, $7.25/hr 
i tend to do about $0.40/hour
I got some questions
waay under minimum wage
Oh ๐
lol
Dont so such commisions lol
don't judge my money choices
i dont
minimum wage is like ยฃ7/hr here too
it's bigger than minimum wage here
Yeah
ยฃ8/9
Although that translates to like $13
Ah
dkim do you have a portfolio at all
By portfolio project, I just meant something to show a potential employer
the one upside of bri ish pounds
im young enough, i dont need one yet ๐ฅฒ
lemme stay young ๐
Speaking of which, I mayy just score another gov internship
anyone get this EVERY time they open IJ now?
before it would only pop up if i were to clone a repo or smth, but then once ive loaded the gradle project, it would never show up again?
๐
no
its SO annoying
at least u dont have to invalidate cache daily
get a BETTER pc
consider yourself lucky ๐
Just use emacs smh
yeah IJ always tells me to update my Kotlin code style for gradle KTS, but like, I have never changed it??
oh i had that for a while before, havent had it in a while now tho
lol
i think ive only had this since updating to 2021
hi gaby
Can an Object... contain null values? I'm asking because when doing a null check for varArgs[i] the IDE says it will always be false.
Yes
yes
at least in kotlin yes
so im assuming yes for java
it should give you a reason as to why it will always be false
"unable to find cause"
bm there's some things i wish your system had that would make me wanna use it more:
- Ways to add and remove x amount from a certain enchant
- A way to disenchant enchantments
IJ being bad
First method seems pretty easy to implement
Second wouldn't be impossible
And the spigot example stuff is, as it says, an example. It's not an API or library or anything
imagine
should be @NotNull Object@NotNull..., which is really strange syntax but hey, Java
beautiful
that first @NotNull is for the elements, and the second is for the array itself
e.g. @Nullable Object@NotNull[] means a not null array of nullable objects
poor soul
@old wyvern https://stackoverflow.com/a/46457506/10007759
?
Wouldn't the type need a ?
yes, what i meant is that you can use ? to make a nullable vararg, in java you don't have ?, so I assumed that it could be nullable
@ocean quartz can i see ur colour scheme in IJ? wanna mess around with some colours myself and wanna take some inspiration xd
There, i made it public on gist https://gist.github.com/ipsk/58eae0bdff2f67385de24a10a8af3c81
Also @cinder flare @jovial warren @static zealot I made some small changes to it, there were a few things in Kotlin specifically that had no color since it was a bit old
was looking just for an image xd
nvm just gonna copy urs ๐
imo the label @transaction is too dark
That's not a color I pick
The color changes based on the bracket
alr
@quiet depot they just told me to use something else xD
I mean, you don't return@ methods
i meant the method colors, like install()
No, that's default
just going to use it directly in the dedi (going to make multiple folders that go to each server's path so I Don't get lost)
I really hope it won't mess anything up
well its been some amazing 2 hours 
now all I have to do is end them on a high note (the suislide)
jesus this font size lol
I use 15 with line height 1.2
man how
i use the default line height
ugh you have bad eyes + we have small screens xD
nah i have a relatively large screen
I have it "dynamic" ctrl + mouse wheel to change size based on what i need
12 good
no its not
12 + 1.3 line height
that doesn't work for me D:
wait where the fuck do I import this again? FIle -> Settings what next?
how

that's nice
there will be 3 dots next to the color scheme, then u can import from there
https://i.imgur.com/UmlD4xb.png someone please explain how you can program with font this small
but forgot to reenable here
how do i enable it
it's fine
no it's not
that is too small
Font size depends a lot on monitor and distance from screen
no it is not
yes it is
I like it big 
im using 12 on a 27" lol
I have a 21" 1920x1080 monitor lol
yeah you have a 27" monitor that's why
I have a 21" monitor that's about a metre away from me
Mine is 23'' 1080p
I normally use 16/18 depending on what i am doing
a metre? ๐คจ
actually maybe about 2-2 1/2 feet
u on the other side of the room?
for me about 1.5 feet
1 foot away from my monitor is too close lol
it's pretty much the reason why I wear glasses
turns out that maybe sitting a foot away from your monitor for hours straight every day for like 4 years straight will give you bad eyesight
lol
I'd actually give you my address, but ik you won't come
how else are you gonna come to my house
dkim face reveal and voice reveal in one
you can do that in room 1
good point
@half harness btw did you find how to zoom in/out with ctrl+wheel?
im not on pc rn
wait am I going crazy? I swear to god when I ctrl + clicked on Sound for example it didn't decompile the code but rather it used to have it all (messages etc.)
damn I'm bad at saying stuff
xD
uh
hey @ocean quartz can you please give parameters a better colour lol
so u know you can ctrl+click (not shift) to open the class
so for example when you pressed on Sound here
it would open the Sound class from bukkit.
Wdym?
are you using server jar?
the sorta white sorta light grey just doesn't really fit and is kinda boring tbh
or api?
probably inherited from One Dark tbh
Yeah that's default from one dark
isnt that what ctrl+click does tho, the decompiled stuff is just IJ being stoopid
shift+click does nothing for me
ctrl
I Corrected myself
2 message down I think
let me also edit that one
but what I mean is that it didn't use to be a decompiled class
I might just be going crazy. don't mind me please xD
https://i.imgur.com/GUi3Fok.png kinda like this colour ngl
wait matt did you change the color of method parameters?
no I did
oh
trying to find a colour that looks cool and doesn't conflict
actually harder than you'd think
yeah
pastel pink looks kinda nice tbh
// args
private List<String> args;``` DMenus is the gift that keeps on giving
lmao
I get this error when I try to run this expression with javascript
Code:
https://github.com/Lorenzo0111/RocketPlaceholders/blob/ac0600a83e224e7314da29c6f0955c2c3e72e3c5/src/main/java/me/lorenzo0111/rocketplaceholders/creator/providers/PlaceholderAPICreator.java#L116
https://github.com/Lorenzo0111/RocketPlaceholders/blob/ac0600a83e224e7314da29c6f0955c2c3e72e3c5/src/main/java/me/lorenzo0111/rocketplaceholders/creator/Placeholder.java#L151
Error: https://paste.helpch.at/ojiziwehaj.md
Expression:
org.bukkit.ChatColor.stripColor('%lands_land_name%')
yep. function calls are not expensive on the jvm
If the code in question gets hot many vms can inline it at runtime
also this would break dynamic dispatch
and all dynamic access to a function
Would anybody here be able to help with some coding? I gotta have a way to set a certain type of blocks in a players mine using the privatemines plugin but I don't know how to, I have a blocks.yml file and I need to get it from there.
This is #dev-general, do you think anyone here actually writes code?
@NotNull final List<@NotNull Pair<@NotNull String, @NotNull String>>
Annotations for everyone
should swap the first notnull with final
anyone wanna see something cursed btw
No
value.toLong() and ( 0xFFFFFFFF shl 21 ) == 0L -> writeMedium( ( ( value and 0x7F ) or 0x80 ) shl 16 ) or ( ( ( ( value ushr 7 ) and 0x7F ) or 0x80 ) shl 8 ) or ( value ushr 14 ) md_5 coding be like
tf is this
You deserve a bullet to the kneecaps
just got bored and put spaces around all the brackets lol
this is one of the cases for writing var ints that I'm stealing from Velocity
ever get that feeling there's a bug in your code? https://i.imgur.com/FjVgHEr.png
"a"

ty ty
how that code would looks like, if it was written by a normal person?
you know, that code would look significantly better without all the bitwise word shit
he was attempting to obfuscate the code xD
netbeans is too slow to accept the tapping
lmao
no i dont think theres a bug. i think it wont compile at all 
i wanna scream at this point ngl
I went to add XItemStack into the project and it now requires like 20 other classes????????
How do you even manage to get that many compile time errors
just shade it lmao
just shade it?
For me it was the time something messed up in gradle and it couldn't find the paper api anymore
value.toLong() and (0xFFFFFFFF shl 28) == 0L -> writeInt((((value and 0x7F) or 0x80) shl 24) or ((((value ushr 7) and 0x7F) or 0x80) shl 16) or ((((value ushr 14) and 0x7F) or 0x80) shl 8) or (value ushr 21)) ๐ฅฒ
lol
๐ฎ
@jovial warren
yes, its on central
com.github.cryptomorin:XSeries:7.9.1.1
exclude the packages you dont want, or minimize it
you can shade xseries??????
Yes?
nah. its probably negative at this point
(((value and 0x7F) or 0x80) shl 24) or ((((value ushr 7) and 0x7F) or 0x80) shl 16) or ((((value shr 14) and 0x7F) or 0x80) shl 8) or (((value ushr 21) and 0x7F) or 0x80) jesus fucking christ
||gottem||
STOOOOOOOOOOOOP
ty
lol
I mean it literally asks you not to extract the classes into your project in the README
xD
Noticing a trend here
๐
same
Simply bring forth your dyslexia when you hear a mention of documentation
ez win
๐ช
Cheating
I gotta work out how to fix this
where in the luckperms is located the code for redis?
is it just me or does that sound like Yoda
um bm
it's in common
oh no
wat
what did you do
pls send help
do smaller commits right
yes?
well um
I forgot to commit my work for the past week or so LOL
๐คฎ
๐คข
oh u have committed
You have made commits
just not pushed
thats fine then ig
Nothing wrong with that
mhm
i use github desktop ๐ฅฒ
That's probably what you should be doing
keep master for stable stuff, don't push until something is working (or use separate branches)
I have a question but i'm scared it'll be dumb
hm thats an interesting way of looking at it tbh, makes sense
sinner
i usually just push the latest changes to master straight away ๐ฅฒ
broken or not
in the Util class, I have 1 error left before it's a clean file saying SonarLint: Add a private constructor to hide the implicit public one. Can someone please explain what i'm doing wrong and how to fix?
Add a private constructor
I fixed it, thank you!
i have 3
throw AssertionError 
Piggy does that I think
Like i dont understand. Don't you already assign it final
and it should be null already?
Overkill imo
Name it what the util is for
that's what the file name is?
dont put it all in one
Thats what Im saying, why is it named that
StringUtils
class Class
ask bm
Be specific when naming stuff
#dev-general message anyone ๐
bm wrote this
Have you commited this sin?
It was a long time ago and I was lazy
xD
i think some people can see it like bm and yugi
๐
i can ๐
Whats validity are you asking about pulse?
i dont understand, am i being stupid or something?
yea i dont get it either yugi
result = ((Component) method.invoke(object, context));
should i add tests for my library?
Understand what?
or just the actual program?
Yes
but final Component result;
tests
Yes
its still initialized only once
Thats fine
any ideas for tests? specifically https://github.com/dkim19375/dkim19375JDAUtils
idk what to test, since its about JDA, and I can't get a JDA instance...
same with spigot plugins
Use a mocking framework
actually lemme commit some stuff
like Mockito
whats that do?
but doesnt the conditional make it assigned twice?
cause by default its null?
or am i like 2 iq rn
final Component result;
if (contextRequired) {
result = ((Component) method.invoke(object, context));
} else {
result = ((Component) method.invoke(object));
}
fixed it btw!
Creates mock objects that you can control
Heres an example with PowerMockito
No
its assigned once in each possible branch
Both cannot happen
im just not sure cause I thought it was assigned on the spot at declaration of final Component result
it would be defaulted to null
Didn't wanna do it, but @prisma wave I had to call you out. https://i.imgur.com/3Gibr2X.png


