#dev-general
1 messages ยท Page 285 of 1
d;Object#toString
public String toString()```
Description:
Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.
The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
Returns:
a string representation of the object.
Requested by: dkim19375 โข jdk
dkim object isn't part of spigot
right xD
Clap
literally nothing
functionally
idk if it has some underlying optimizations
yes, if your default case is just a break
it's useless
what is default in java
again though, idk if having a default case has some underlying optimization
either a default method or the default case in a switch
i.e else
Yea, the compiler adds that flow without being explicit about it
also I thought protected meant that u can access methods/fields in the same package, but it doesn't, what does protected do?
?
there's a method called actualequals
Same package and child classes
Yes?
maybe i was doing something weird
What class we talking about rn
Package protected is different from protected
๐คฆ
Package protected is the default access modifier and has no keyword
That allows you to use in same package only
it's probably RawServer
Indeed it is
dark if it's a support query, go to #development
yes
and just ask your question
i make discord bots :))
don't ask if there's people to answer
That doesnt work,if free.

yes there is
that's not true lol
๐ฅบ
๐ time to close source all my projects
They ask like 2k$ for a bot.
tF
back in the day when I was running a server, I found a developer pretty easily who coded for my server and didn't ask for a cent
it's not impossible
they literally joined through a server list
Can i discuss what the bot has to do here?
Hey, I'm Barry!
I'm a unique Discord bot created especially for HelpChat.
Authors:
I was created and I'm maintained by @pallid gale with support from the Admin team.
Code base:
I'm created in Javascript using Discord.JS
Source code:
At this stage I'm closed source due being a mess and some secret internals. However you can contribute to my links/version knowledge here.
My bot which i want to commit...
i just got here but there are 100% people who code for free lol
^
No James, where's my money, you owe me 1k
I didnt,i am writing it
ppl who has for $2k is scammm
true
No dkim lol
most people who write mc plugins aren't worth that much lmfao
There must've been a good reason why the dude asked that much lmao
Unless the dude was just a complete idiot or was memeing cause he didn't want to do it
what if it's like:
I want all these bot's features:
oops
i meant to make newline
not send message
shift enter
a
b
c
Basically its simple invite counter for a server.
Twist:Need to also count plasma old counts for my member as i used that earlier but its being dead nowadays.
LOL
that's not worth $2k
2k for an invite counter
that's worth $0, no doubt
Y'all are just dumb
looks like it
thats not for a discord bot lmao
Making and testing that would take let's say 30-45min (realistically), so an appropriate price for it would be 5-7.5$ ~
if you want someone to write a bot post in #805698757411995648 #805698761442590730
๐คฃ mb
Increases as you add more bullshit tho
yes
I hope someone takes it
i love the inconsistency in the naming though
like you're half way there with the british spelling of colour
then you go and stick a 'z' in there
and i'm like lol
lmao
ew task timers
You really like timer so much, didn't you ๐
true lmao
should i use paperlib or just tell someone not using paper to go die
bm ur just as bad with your "Initializable"
๐ฆ
How do you guys spell the z lol
s
@obtuse gale why did you use a switch for that?
oh you mean pronounce
zed
yeah usually zee
I see no point in that switch
zeex with a silent x if im feeling quirky
zeeee
๐
In british, they say "zed" more often
Just do 1 line and make the value timer
zephe with a silent ph
if you say "zee" here you will get murdered
pzee with a silent p
if I'm referring to the letter itself I'm pretty mixed on zed/zee
because it's "zed"
qrqetqtqetzeegqeg
with a silent qrqetqtqet and gqeg
Is that invite counter in java or py?
or that's what british english uses anyway
what invite counter dark?
what is "plasma old counts"
Inused plasma before
^
So it counted old invites
1$+ Free minecraft server hosting (2gb,amd epyc cpu)The what
kde plasma :))
A bot
xD
Its a famous bot
Hmm ow
Which is being dead now
How can it have a price but also be free
's :)
Do we get the bots db
not as famous as @ruby crater
we can't get the data from it afaik
Clearly
unless u manually input
@vast pilot explain how you get the database
๐
d;info
๐
docdex is in 17 servers
Need to contact plasma then
lol
uhh
But does it have Docdex?
plasma can't compete
o.o
Give me a moment
o.o
Piggy, go test my shit
What
I don't know how Piggy, I'm dumb
idk
cuz it kinda does
adding role when reach certain invites unlike other invite counter bot.
I bet docdex cant do this i mean
I don't remove server data from the db if they remove it
so i can just count the rows
there's 19 rows, which is one legitimate leave (other leave was my test server)
I wouldn't trust a bot with "Adminstrator" perm by default...
Big brain
^^
@vast pilot we can't get plasma's logs
you can make it play to the left
or right of you
and it plays based on the location
Yeah so uh
No
no no
have you ever heard of 8D audio?
yes
Only the player to whom you play hears it
or those songs?
8d audio is trash
xD
Uhmm faster process doing that?
yea its basically that but its based on location but the player can only hear it
yeah 8d shit
8d audio makes no sense
lmao
hmm
xD
lmao
Lol
@vast pilot self bot if you wanna be terminated
๐
i bet the only people that like that shit are the people with sound setups that play from a single spot
people who use speakers
๐คฎ
i find also that developing responsive sites is a fuckmess for me
lmao
would this detect the player death event?
no?
css ๐
its like normal when you look at it. then you pray they wont drag the window to the left
lol
and?
pulse
yes
https://piggypiglet.me/#tos you can literally drag the window to the left
try it (drag the top purple header)
do you use bootstrap?
Lol
lol
d;logger#severe
public void severe(Stringย msg)```
Description:
Log a SEVERE message.
If the logger is currently enabled for the SEVERE message level then the given message is forwarded to all the registered output Handler objects.
Parameters:
msg - The string message (or a key in the message catalog)
Page 1 โข Requested by: PiggyPiglet โข jdk
public void log(Levelย level, Throwableย thrown, Supplierย msgSupplier)```
Description:
Log a lazily constructed message, with associated Throwable information.
If the logger is currently enabled for the given message level then the message is constructed by invoking the provided supplier function. The message and the given Throwable are then stored in a LogRecord which is forwarded to all registered output handlers.
Note that the thrown argument is stored in the LogRecord thrown property, rather than the LogRecord parameters property. Thus it is processed specially by output Formatters and is not treated as a formatting parameter to the LogRecord message property.
Parameters:
msgSupplier - A function, which when called, produces the desired log message
level - One of the message level identifiers, e.g., SEVERE
thrown - Throwable associated with log message.
Page 1 โข Requested by: PiggyPiglet โข jdk
[BlockBreakEvent, BlockPlaceEvent, EntityDamageEvent, CreatureSpawnEvent]
.forEach(event => listen(event, Cancellable::setCancelled))
๐
Thoughts on the type bindings?
Eg every type has a variable with its name that returns Class<T> or whatever the elara analogy is
Sure
Damn nice 

void setSprinting(boolean sprinting)```
Description:
Sets whether the player is sprinting or not.
Parameters:
sprinting - true if the player should be sprinting
Requested by: efefury โข spigot
fr, gotta go fast
d;spigot
@prisma wave tutorial whenโข๏ธ
i think he abandoned it
No
Not abandoned
Just trying to find motivation + suitable time
I've got commissions and schoolwork that take up most of the time, plus 2-3 other side projects + time where I cba to work
ah ok
the 53x has two factors
a highly optimized jaro winkler algorithm which originally lowered the 1500ms to ~600ms
and then caching
due to a stupid fucking oversight from me
it was calculating the distance of the same two objects multiple times
oh nice
basically instead of the ~100k calculations it should've been doing (for the jdk, other javadocs are WAY lower)
it was doing 2.7 mil
i guess that would make things run a bit slower lmao
d;httpclientbuilder#setauthenticator
HttpClient.Builder authenticator(Authenticatorย authenticator)```
Description:
Sets an authenticator to use for HTTP authentication.
Parameters:
authenticator - the Authenticator
Returns:
this builder
Page 1 โข Requested by: PiggyPiglet โข jdk
oof that's so much faster
speed
kinda crazy how much you can save just from caching
thats very noticeably faster
Omg Piggy i love you
that's kinda eh atm
it's only on paginated messages
and it doesn't delete the original command
got a bit of work to do on it
i think its fine if the original command stays
it's not, because then people will think the bot is broken
Yeah
true i guess
@prisma wave guess i gotta watch a tutorial from a guy that uses eclipse, capitalizes packages, names their main class Main, and uses static for everything
or just don't watch a tutorial
plus idk where to find a wiki
?learn-java
Start with this -
https://docs.oracle.com/javase/tutorial/java/concepts/index.html
Breeze through this skipping stuff that doesn't seem relevant like bitwise operators-
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/index.html
and then hit this
https://docs.oracle.com/javase/tutorial/java/javaOO/index.html
They're the first three from this larger thing - https://docs.oracle.com/javase/tutorial/java/index.html
Which you should definitely go through overall. But those three should be enough for slightly better understanding of wtf is happening here without feeling like a huge time sink
That one is a small part of this larger site - https://docs.oracle.com/javase/tutorial/index.html
wherein "Essential Java Classes" and "Collections" also have good useful stuff
Requested by: Brister Mitten โข learn-java
Ur hurting me here
that has nothing to do with spigot
takes too long
still
||spoonfed*||
lol im just reading my first messages in this server ๐คฎ
all of my old messages are questions about dchat lmao
mine are the world's weirdest questions
lmfao
I don't even remember why I came here
back when i was learning java and the spigot api at the same time 
I came here after searching for a support discord for 30 minutes ๐
noob moment
this was the only invite link that worked
i remember when you joined johnny
you and sxtanna would just argue all the time
that was fun
sxt and johnny, would have been a great couple
i remember getting bullied by sx when i first starting asking questions about development
good times
he did that for everyone
yea ik
always thought it was a girl until the very last week
xD
lmfao
yeah who knows
Getting bullied by sx was one of the best parts of my day ๐ญ
ikr
I do remember that part but I don't know what initially prompted me to join
I seem to remember an overwhelming amount of complaints regarding his behaviour
lol
yes
only pussies complain smh my head
Donโt make comments seen as โToxicโ, โPut downsโ, or anything with potential similarity.
you added this right
Ah good times
This was an absolute shithole when dev-general didn't exist let's be real
can't believe cube didn't let me make this channel for ages
i probably wasn't here
Damn, it's been that long
damn was made right around the time i started learning java
Fantastic
l;mfao
that was good
๐ญ
learn kotlin 
Not a bad suggestion ^
it would probably solve your issues
I wanna try Kotlin react, but stuck on a commission ๐ญ
i wanna try it too
but i dont wanna rewrite my website a 5th time with a different framework lol
i need ideas
Watched a conference today about it and seemed so much nicer than js
mattttttttttttttttttttttt
Yes?
ok nvm
.-.
Pretty similar to Java
if u know Java it shouldn't be too hard
do i know java
hot
Very hot
i might try and make a web panel for a plugin im working on
might use it for that lol
sadge
private void checkJavaVersion() {
String[] javaVersionElements = System.getProperty("java.version").split("\\.");
int major = Integer.parseInt(javaVersionElements[1]);
if (major < 6) {
System.exit(0);
}
if (major < 8) {
Logger.warn("You on drugs?");
}
if (major < 11) {
Logger.warn("Update Java Bitch");
}
}
thank you for coming to my ted talk
updated for all of my plugins
Not enough detail provided within the messages
lmao
lmao
no 17?
๐โ๐จ
not out yet
@forest pecan Where's the fucking final tho
Fuck
Absolutely disgusting
private void checkJavaVersion() {
final String[] javaVersionElements = System.getProperty("java.version").split("\\.");
final int major = Integer.parseInt(javaVersionElements[1]);
if (major < 6) {
System.exit(0);
}
if (major < 8) {
Logger.warn("You on drugs?");
Logger.warn("You are an animal");
Logger.warn("Suck my fat dick");
Logger.warn("Subhuman");
Logger.warn("Absolutely Disgusting");
Logger.warn("Go die in a hole you bastard");
}
if (major < 11) {
Logger.warn("Update Java Bitch");
}
private final void checkJavaVersion() {
final String[] javaVersionElements = System.getProperty("java.version").split("\\.");
final int major = Integer.parseInt(javaVersionElements[1]);
if (major < 6) {
System.exit(0);
}
if (major < 8) {
Logger.warn("You on drugs?");
Logger.warn("You are an animal");
Logger.warn("Suck my fat dick");
Logger.warn("Subhuman");
Logger.warn("Absolutely Disgusting");
Logger.warn("Go die in a hole you bastard");
}
if (major < 11) {
Logger.warn("Update Java Bitch");
}
making a private method final is useless
lol
you cant override it the first place
as it is already private to its own class
overachiever

import elara/nag
let majorVersion => javaVersion.getMajor()
match majorVersion {
_ < 6 => exit(0)
_ < 8 => nag()
_ < 11 => log(warn, "Update Java Bitch")
}
๐ฅฒ
And where do I download this Java Bitch Edition?
you can reach into my ass for it
YES!
Lol
wait
yes to the first part
Its too fast for you
The course is already over
You know elara now
๐
Ask your inner self
Elara lies within your soul
Unleash it
Alternatively, you could go check the examples
Yes
yes
Functions
Attempt
Yes
What type of function is that?
๐
PURE
xD
Contracts
Type contracts
generics on crack
#T where T.toString() => String
let print(T t) => {
// here now t has all the mentioned contracts, as in, in this case- you can use toString()
std.out.write(t.toString() + '\n')
}
Lol
๐ฎ
Bully
Bully Maguire offered Doctor Strange kind words of encouragement, but Strange responds by yelling. Naturally, Bully Maguire kills him.
|---- CREDIT ----|
Also, a big thanks to
@Matan Animation Studios
@id3Y
@T0bey
@Tanay Pandey
for providing some of the green screens I used in the video.
Check out Matan's public Google Drive for green s...
Now this hit hard
hot

You're digging lol
after adding final to every place I could, my jar size increased by 15 kilobytes
i feel proud
lol
i opened a corn chip bag i brought from the garage and it was snowing outside
and when i stuck my hand inside it
my hand started shivering
wtf
just weird lol
๐ฑ
lambda calculus mitten
I haven't seen the parentheses before, what do they do?
you should probably add a space between b and m then
with gradle was it ${project.version} to get the version from build.gradle to the resources folder?
if u use processResources expand yes
as much as DocDex is useful it sometimes can be so bad. people just spam it and questions get lost before they're even sent xD
true
lol
should add permission based system
where x roles can use the reactions regardless
processResources {
doFirst {
file("${buildDir}/resources/main").listFiles().each {
delete it
}
}
def name = shadowJar.archiveBaseName.get()
expand "pluginVersion": version,
"pluginMain": "${rootProject.group}.${name.toLowerCase()}.${name}Plugin",
"pluginName": name
}
I asked this in #development before asking here and literally 3 docdex messages were sent right after I sent the message
xD
this is what I use blitz
and no I don't use processResource
replacetokens?
I just have them like this: https://i.imgur.com/xNeJjuI.png
you have to do something under processResources dodo
either use replace tokens or just expand, filter and from
why is gradle like this? ๐ฆ why does it need to have 100 pages of documentation.
it might be but I'm to lazy for all those pages.
like I give up when I see the size alone xD
lol
Update your Kotlin
Also you don't need java
this project is this old: compileOnly "org.spigotmc:spigot-api:+" xD
I used to use +
for gradle
james its old project. I use paper nowadays
absolutely not
Yuck
yes
it looks gross
Kotlin gradle sucks
ewwww
paid actors clearly
no YOU are the paid actor
JSExp 1.7 is finally done, woo
cap
Sooooo
If I want to edit essentials but stay up to date with their changes, what should I do?
Update your upstream fork
i didnt realize typescript was kotlin
lol
I mean, wont that override my changes?
Depends what you change. Also yeah patches would work
Yea I thought about using patches
Smh
thought.schedule().accept((do)->{do.cancel()});
At some point imma just make my own version of essentials
Imo essentials is poorly written
The project structure and data pattern used is too heavily based on configuration files and it's sloppy + spaghetti code
All of the features are too far integrated into the config system making it difficult for developers to understand how to implement new features
Plus most of the people that use it dont care about the code but the size of the project itself
True, there would be a massive positive effect on the size
Essentials is good :/
not the actual size
You could merge all of the projects into one with modules and still have it be the same size of the main Essentials project
No just how much stuff
Like, eseentials has been around for years and people just think it is good
oh i thought u meant features
Itโs maintained by a group of knowledgeable people, at least EssX
๐คท
Could be far better if they worked on actual features rather than useless shit like "beezooka"
nuke
Itโs the kittycannon that made me not buy cmi
CMI is so dogshit

i hate that plugin
Im tempted to try make my own essentials xd
Gaby team?
I saw the CMI source
moducore
It's horrendous
@surreal quarry I will contribute to moducore
Yeah
send source
arcane essentials ๐ณ
For personal usage conclure
Fuck
Haha no kali xd

โน๏ธ
jaims
just fork it and pr if you wanna add stuff lol
Although in java but
god damn kotlin
Interop yk
kotlin good
Theyโre interoparable
interop tho
yes I know
Wait since when is your name Jaims lol?
but I dont know kotlin
Nor me
i've just always had a nick in here lol
Lol
ever since i boosted
yako maybe go out from your comfort zone 
I thought it is James
yea thats my real name
@steel heart can u do kotlin in intellij
teach me
Tmrw
fun main() { println("Hello World") }```
because kotlin has top level functions
are there modifiers
no static
not static
you can get similar with companion objects
yeah companion objects are the closest analogy
but top level variables are usually more idiomatic
static is a pretty useful and....popular feature
but top level variables sound bad
like singleton abuse
not really
class Blah {
companion object {
val STATIC_VARIABLE = "blah"
}
}
Blah.STATIC_VARIABLE```
they're not bad
should I use companion instead of TLVs
first class functions (i think they're called)
depends on the context
what's "they"?
jesus there ctx n ow?
I already learned java
ok gimme a couple of years and ill get the hang of it
Kotlin functional > Kotlin OOP
^
But...OOP is JVM
lol
like
fun blah((String, Int, Boolean) -> Unit)```
JVM is for OOP
lol
JVM not for functional
lol
lol
Wat
functional = noob python
If JVM is OOP, then explain Clojure
lol
bm boutta get himself muted again
scala too ig
We need to teach this dude a lesson
Scala and Clojure are FP on the JVM
i think thats a bit more functional than kotlin
sorry what
I that a lambda?
what are we talking about
Yako functional is awesome
then why does my cs 1010 teacher yell at people for using functional concepts
because theyre an idiot
Well imperative is beneficial
๐
you would use it like
blah { s, i, b -> ... }``` so yea
and you can do it all without creating a `GigaHexaConsumer`
But functional can be very nice
Functional is the future
lol
Imperative -> mutations -> side effects -> gay bugs
Functional -> declarative -> epic
they have a doctorate in cs
if u wanna do functional there are probably better languages than kotlin
kotlin is good because it allows both imperative and functional
okay so basically what you are saying is that it's acceptable and encouraged to use OOP in kotlin?

Like Elara
Kotlin is multiparadigm
Okay great! OOP it is
any paradigm is encouraged
OOP is good but not perfect
but it's a lot easier to mix the two in Kotlin
I must say, OOP really does a good job at abstracting concepts
A good OOP design can be very hard to create like an actual good architecture
check again
I think most people here would define functional as just "first class functions and map filter etc"
You mentioned static was good
I used it in 2017
Also sus
kotlin uses top levels for that
based on input, no external things
Shouldnโt be called static tbf if itโs utilities
No it should
Public util c()
static isnt just utilites
Much better
pog
c'est facile
pdm?
Static is bad 99% of the times
absolutely
how do do pdm in kotlin
ok sick
you have to be careful
sometimes
id recommend you check the kotlin example
cuz kotlin's codegen sometimes messes stuff up
what do I do for the gruopId
for reasons that might become obvious
Wouldn't recommend pdming Kotlin directly though
why not D:
Pdm lol
do I do com.<myname>.project or save project for artifactid
since when has gradle had artifactId?
Minecraft plugin generator
oh
Because it can call STD specific things on enable, before PDM has acted, since the main class will need to load
project then
Minecraft plugin generator
oh nvm
matt it works fine as long as the intrinsics stuff doesn't happen before you call loadAllDependencies
If that does what I think
no kotlin suport
thats why you have to bypass the intrinsics generation
lol
Bad
adding kotlin is literally 1 line
no?
Sounds too ass, just shade Kotlin and pdm the rest
it compiles to the same stuff
you add the kotlin std lib
Kotlin jdk lmao
Kotlin sdk is a thing tho
kotlin has its own stdlib, yes
Matt its like 1 line
which u have to shade or pdm
its worth it to pdm kotlin
i mean
just make your main class in java and write everything else in kotlin
seems like the easiest way
Disgusting

๐
just get a plugin thats shaded kotlin and plop it in the server alongside ur kotlin plugin
ez
hmmmm
PluginDependencyManager.of(this).loadAllDependencies().join()
bypasses intrinsics, loads kotlin, no issues 
Just download kotlin in every directory
No chance it wonโt be loaded
Okay James ma dodo so where do we start?
eh
Uh settings
lol
Or project structure maybe
the exact same as always
And then just set jdk 11
Also might have to specify in your pom/build
oh yeah im ubuntu
IntelliJ dodo moment
if you are asking abt moducore i generally put my todo stuff in the gh issues
THANK YOU
might try to add support for others later on but i dont want to right now lmfao
Do I select Application for project type?
Gradle
Why not get from version control?
I think IntelliJ will make the appropriate configurations then
hi
@surreal quarry bye
bye
@hallow crane
Minecraft?
ohhh I clicked Kotlin
Create new minecraft application?
where
4 maybe
yea lol
Why no one tell me
ok i made it
Wait
its working
how do i make a gitignore
Just add a file?
lol
yeah bit i need to make it
it needs to be filled
with information
on what to ignore
i have a username and password in there for my maven repo lol
Lol
o
i should probably just put it in my users gradle.properties buyt im lazy
I declare my pls not mess up utf 8 encoding there
So itโs essential to push it for me
should I ignore .gradle/?
No
yes
yes
smh
lol
oh but keep gradle/
yea
Ya
it's been a long time
Yo
i usually use my template maker thing
Yem yemy
imo its better to just learn how to make the project
it usually doesn't take that long
ok so delete src/main/java, only use src/main/kotlin right
yea
^
but dont do that ๐คก
java shit goes in java, kotlin shit goes in kotlin
yes
i havent, but it has its uses ig
If you happen to work with something that involves interop alr
for example if you wanted your main class in java to make pdm easier
you make your main in java, then everything else kotlin so you don't have to deal with intrinsics
Ayy done with commission, time to try Kotlin React ๐
๐



java in kotlin