#dev-general
1 messages · Page 173 of 1
haha
well why the fuck not dude
f
Never had that kind of error
@prisma wave I think I figured it out maybe
am I the only that encounter some issues with IIJ randomly freezing after updating to 2020.2.1?
@prisma wave apparently when I try to instantiate JDALink using this, it comes back with: "Type mismatch: inferred type is Lavalink<T> but JDALavalink was expected"
could that have anything to do with it?
I mean, still getting an NPE, but somewhere different this time I think
quite possibly
@obtuse gale since you're online right now, I just wanted to ask you again if that issue with spigot-maps was resolved for you through the last update
I actually havent tested it tbh,
I can when I get a chance next and let you know, ive still just been using that fixed version that I made, but ill swap to ur version when I get back on my main pc, im on my laptop rn
ok great, just wanted to check back so I know when I can close the issue
class LavalinkPlayer(
private val link: Link
) : IPlayer {
init {
addListener(InternalPlayerEventHandler())
}
val listeners = CopyOnWriteArrayList<IPlayerEventListener>()
override fun addListener(listener: IPlayerEventListener) {
listeners += listener
}
}
```first one to spot the problem with this gets a cookie
(hint: if you know how the Kotlin compiler works, you'll understand instantly)
meth 
listeners += listener
you're on the right track, but what's the problem with that
Nothing, just meth
reassignment of a final variable?
nope
hmm
since += works in Kotlin, it's the equivalent of listeners.add()
yeah ik, should probably get a replacement for that, but still, that's not the issue
another hint: think about the order
May they rest in peace
wait you got your resources deleted? wow
since
+=works in Kotlin, it's the equivalent oflisteners.add()
That depends on the functions available on the class
I'm still surprised none of you have figured it out yet
if you have only plus that would try to reassign
listeners hasn't been initialized yet
finally
logic in constructors bad
yay
yeah it took me a little time to figure out that one myself before I showed it to you lot
also is it just me or is the fact that apparently "Evaluation of suspend functions is not allowed" or whatever is the most annoying thing when the entire thing you're trying to debug is entirely based around coroutines
didn't they massively improve coroutine debugging in 2020.2 or something?
maybe I need kotlinx-coroutines-debug
also what might be a better idea is instead of actually querying the REST API, I use something like mock web server or mockk to imitate the responses
How do I specify the output dir of the gradle build task?
And how do I shade packages?
basically this but in gradle:
<build>
<plugins>
<!-- Maven shade plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>me.blocky.lib</pattern>
<shadedPattern>${project.groupId}.lib</shadedPattern>
</relocation>
</relocations>
<finalName>${project.name}-${project.version}</finalName>
<outputDirectory>deployment</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<directory>${build-directory}</directory>
wdym output dir of gradle build task?
Make a copy task
wdym output dir of gradle build task?
@jovial warren where the classes and jar file gets placed
I didn't know you could change that
the output dir is
build/
@jovial warren right, I would like to change that
you can in maven, I'd be surprised if gradle couldn't do that
Make a copy task
@ocean quartz that does what exactly?
https://stackoverflow.com/questions/13915351/change-gradles-working-directory-when-compiling-a-groovy-project anyone say first result for Google search "gradle change build directory"?
yeah I didn't know it was called "build" directory. I googled output dir and it gave me a bunch of stuff that didn't work or I didn't understand
ty
make a task that copies the jar from build/libs to somewhere else
Yeah this is what i meant ^
I found a shadow task
but it's so hard translating from groovy to kotlin
when I have no fucking clue what those things mean
this part is interesting: https://imperceptiblethoughts.com/shadow/configuration/relocation/
gonna have to learn groovy syntax I guess
This was pretty nice watch
https://www.youtube.com/watch?v=6P20npkvcb8
Kotlin is similar to the Java programming language, so it's natural that your Kotlin code looks very much like Java code when you are first start to use the language. While this is fine to begin with, you're probably not taking full advantage of all the language benefits. In t...
ty
Oh, it's not about the groovy stuff xD
Just a video i watched earlier
Is that... Eclipse?
No?
Or is it just IJs light theme
It's IJ yeah
🤢
His sealed class explanation was pretty good
What could be the reason for a plugin to not import stuff in gradle?
I looked at multiple examples online and the ShadowJar task just isn't recognized.
with unresolved references
the more I use it the more I hate gradle. nothing works and everything has multiple ways of specifying shit only for that shit to not work again
and it's well documented with lots of examples. if you google shit for gradle ur lucky to get an answer for groovy. and only if you know what the things you are googling for actually are and do because whatever you google there's something that does it, but it's probably not what you want. And fuck you if you dare use kotlin dsl because no examples can be found for those.
it's just frustrating
What are you having issues with borz?
and passing variables to subprojects is more difficult than it needs to be
What are you having issues with borz?
@old wyvern just ranting about gradle again, same old.
Can't get the shadow plugin to work
because it's doc is in groovy and the examples I found for kotlin dsl don't work
and there is no useful error msg that tells me why
or what to do
so I did this in my build.gradle: https://imperceptiblethoughts.com/shadow/getting-started/
buildscript {
repositories {
// Using Bintray repository:
maven { url=uri("https://dl.bintray.com/davideas/maven") }
// or Gradle plugins repository:
maven { url=uri("https://plugins.gradle.org/m2/") }
jcenter()
}
dependencies {
// Using Bintray or Gradle Plugins repository
classpath("eu.davidea:grabver:2.0.2")
classpath("com.github.jengelman.gradle.plugins:shadow:6.0.0")
}
}
apply(plugin = "com.github.johnrengelman.shadow")
You shouldn't need the buildscript nor the apply
Well how the fuck am I supposed to know that?!
xD
what should I need
and why
like... it's so beginner unfriendly it's unreal
Have you checked that out yet?
plugins {
id "com.github.johnrengelman.shadow" version "6.0.0"
}```
This is an example of what i use, it's basically just this
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.4.0'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}
shadowJar {
relocate("me.mattstudios.mf", "me.mattstudios.thing.mf")
relocate("me.mattstudios.mfgui", "me.mattstudios.thing.mfgui")
archiveFileName = "Thing-${project.version}.jar"
}
Because they're for groovy
Yeah in kotlin dsl is tasks.shadowJar() {}
You dont need the () I think
Import it
not working, kotlin dsl got some compilation errors all of a sudden
Oooh i didn't know in Kotlin you could specify a deprecated level, like from warning to error
Show your entire gradle
Oooh i didn't know in Kotlin you could specify a deprecated level, like from warning to error
@ocean quartz yeah you can also add code that it can replace with Alt Enter
Very cool
Yeah, really cool
Also have you ever used Kotlin's contracts?
=haste
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
Show your entire gradle
@ocean quartz https://paste.helpch.at/azunagikuv.makefile
everything broke
Unresolved reference: KotlinCompile
and it doesn't tell me why
or whats wrong
You are doing this in a build.gradle not a build.gradle.kts file right
You're trying to use Groovy in a Kotlin script
where
.kts is kotlins script file extension
oh yeah that's not the right one
Try this
Import it..
or something
idk
Import it..
@ocean quartz You said not to do it with the import statement
I did it like you said
from the groovy tool thingy
Importing a gradle change is literally just clicking this button
I have no idea what you have done then, because that works perfectly fine for me
Not gradle's fault here
Does shadow come up under tasks section?
not gradle's fault but I didn't need help from 5 people to set this up in maven is all im saying
Does shadow come up under tasks section?
@old wyvern I'll check when I get back to it
Alrighty
Thats because you understand Maven
im done for now
Thats because you understand Maven
@errant geyser Without prior knowledge, just like gradle
and it was easy to just look stuff up and copy-paste solutions until I figured out what stuff did and tinkered with it
with gradle you can't even get started because tehre's 5 different solutions and none work and if you pick the wrong one it fucks up your whole IDE and now nothing compiled even though I reverted it
@ocean quartz I know how they work but I don't really have a use for them
I'll go cool off. See you guys later. Sorry for the rant...
Sx showed me an example yesterday and it's pretty cool, like compile time dynamic nullability and stuff
You still have contact with Sx? 😱
Yeah lol
🤣
same
why does intellij show this: directory¥file.txt instead of normal directory/file.txt
anyone knows how to fix?
You bought that file from china
huh
What a comedian
hey just curious: since the Bukkit/Spigot/Paper/whatever the fuck else people use these days API is under GPL, does that mean that if I was to say purchase a premium plugin, I could request the source code and they must provide it to me no matter what?
since they're using something licensed under GPL, and GPL cannot be sublicensed, that means that their project must also be licensed under GPL
I'm just curious of anyone knows anything about this, since I'm just curious about these sort of things lol
I could be wrong, but technically yes, everything done for bukkit needs to be GPL compliant, but, doesn't mean the person will and if they don't you can take it legally but is it worth it lol?
I mean, if you've got the money to take them to court, you're likely to win the case
so any developer who isn't a dick head will give you the source code then I guess
I don't think the seller is required to give you permission to the source code?
they're required to give you the source code by the rules of GPL @steel heart
if you request it
and if you've purchased it
idk maybe this is helpful https://www.spigotmc.org/threads/the-most-important-part-of-your-project-might-not-even-be-a-line-of-code.121682/
small question guys, can we do ItemStack & ItemMeta stuff async ?
and looping through an inventory async ? 😛
uh
?
No I don't think
why isnt holographicdisplays plugin on spigotmc?
its on bukkit?
the author is probably too lazy
can i link download of plugin on spigot in my plugin or is it not allowed to share non spigot links?
I think it should be fine
ok will check spigot discord to make sure but thanks.
i cant belive he accualy linked my plugin under description as plugins using this plugin wow.
what tha heck is this on 1.16.2
java.lang.IllegalStateException: No API implementation set. Is Holographic Displays enabled?
works fine on 1.16.1
eh
updated plugin works fine
Gaspar, you got HD working on 1.16.2? What version of HD are you using?
looks like I still had 2.4.3, oops...
XD
do SortedMaps preserve the position of the keys? and if so how would i get the position of said key?
yeah
so what would be the best way to go about getting this then? the only thing i can thing of is to put the keys into a list and get the index that way
that'll work
you could also just iterate over the entrySet
since that's O(n) at worst
Who here knows their stuff about reflection?
Ask away
I would never
lkkkkkkkkkkkkkkkkkkkkklllkkklklk
?
🌝
🙂
I would never
never in a million years
Obfuscation via kotlin
clojure*
Wingdings*
@jovial warren Does the license specify in what format I have to give them the code?
Also, keep in mind that copyright law isn't international and each country has their own way to deal with it
If you normally write obfuscated code, sure, no problem. Running perfectly normal looking code through an obfuscator with the purpose of making it difficult to read or maintain, however, is not.
Technically speaking the code cannot be obfuscated
Technically speaking the code cannot be obfuscated
@ocean quartz Why? You're allowed to modify it. Who says it has to be human-readable?
☝️ He got a good point
Because you didn't write it like that, if you write it obfuscated then yes, but you cannot modify it just to be hard to read later
Also, how do you prove your obfuscation was the result of trying to make it hard to read and not some other purpose?
Because you didn't write it like that, if you write it obfuscated then yes, but you cannot modify it just to be hard to read later
@ocean quartz Why not?
How do you prove you used a tool to obfuscate?
What if you write it normally and it obfuscates itself because you wrote an obfuscator in it to run on itself?
I am not a lawyer nor was the one making the license, don't ask me lol
I'll quote what I said earlier
doesn't mean the person will and if they don't you can take it legally but is it worth it lol?
Then the obduscation becomes part of the purpose itself
As a base and as it stands yes you cannot obfuscate it, does it matter though? Probably not, no one will pursue legal actions if that happens but in court you'd probably lose
Would that not also mean that mc server hosts and anybody owning a server would have to give the public access to the whole server setup?
Wha
No, GPL applies to the software and it's addons not the usage
About if code can be obfuscated in accordance with GPL i think?
Hm well
I think its if you redistribute your version at all, you need to be able to provide the original source as well
or something like that
Ah
The “source code” for a work means the preferred form of the work for making modifications to it.
preferred by whom?
Who determines what's preferred?
The judge
Since I have kotlin code, do I have to provide the source code in java? which doesn't exist?
No?
No in kotlin technically
The judge
@ocean quartz Not many judges know a thing about software
Unless you decompile and move the resultant code to Java I guess?
It doesn't matter lol
No?
@ocean quartz why not? java is preferred over kotlin
Idk you can probably find a workaround
What
No one really goes to court for this shit
You wrote the software in Kotlin, that is the preferred way
I prefer it in Rust. You are legally required to change it to Rust for me 🙂
java is more widely used, you could argue it's prefered on that basis
And it doesn't matter if the judge knows or not about software they'd be the ones judging you, what they say is final lol
If client stated it must be in Java you shouldnt be using kotlin in the first place
Your honour
And it doesn't matter if the judge knows or not about software they'd be the ones judging you, what they say is final lol
@ocean quartz not how the law works actually. appeals are a thing
Please be aware of my clients earlier statement: "kotlin good java bad"
Jesus, you're taking this way too far ahead lmao
Doubt it
Jesus, you're taking this way too far ahead lmao
@ocean quartz That's where I would take it if somebody sued me to get their hands on my code. If you ask me not even close to far enough
Have there ever been a court case about a bukkit plugin?
@old wyvern i hope to god that there hasnt been
I'm not so sure tbh and a damn plugin can mean a lot of money in the case of a few premium plugins otu there
Most of the big premium plugins are open source and GPL compliant though
Do you have to provide the source for premium plugins to all clients?
🤔
By law I mean
By law, technically yes, if they asked, but no one cares
Most of the big premium plugins are open source and GPL compliant though
@ocean quartz tbh most big plugins in general are os anyway
Ah
Yeah
A lot of people hold tight to their source and do everything they can to prevent leaks and it ends all the same way lmao
Then there is the ones with open source who don't worry about anything
Idk, it'd depend on the country
Ah
Then there is the ones with open source who don't worry about anything
a life without stress 🙃
Some countries wouldn't even take the case seriously
Well Cases in my country takes years
a minecraft plugin being brought to court kekw
Best case would be to sue in the US
And i mean like 6-10
🙃
I mean does the client approach the court of his country
Or the dev's country?
I think it's based on the country you sue it on
Like let's say you're from UK, you want to sue me (I am from Portugal) you can sue me in the US
Lol
It's stupid yeah
Would you have to visit court in the US?
Then again don't take anything I say about legal shit seriously, i have no idea about this shit, i am not a lawyer xD
And i think so, idk what happens if you don't
😂
Well, meet you in US then matt 😂
Ah shiittt xD
hellll yeahhhhhh
And do a big meet up
😎
🤞
im not publishing my code, I'd rather destroy it than let that abomination of software abuse that crawled out my my nasty ass keyboard and into the servers of literally 10s of people see the light of day
I doubt I can be sued for damages if I destroy my source code after publishing the plugin
updates require re-writing the plugin
but it's worth it
The shitty source can be made from the bytecode
wew
Wait what is that guy on about?
Any reason that I shouldn't just provide my library as a maven project and let the user install/shade it into their plugin?
whats the other alternative? having them copy paste the code?
for libs i always make a lib project then shade it as i need it
I've just never made a lib before that I planned on making public
I didn't know if people preferred that or if they preferred a jar they could manually include
I prefer the shade option, was just looking for outside opinion
Most people don't like working with jars
Yeah, good to know. Only need to figure out how to unregister a custom entity in 1.16 and I can release version 1.0 of this lib 😛
is it best practice to manage the build and dependencies of submodules in their own build.gradle file or in the root build file?
Probably their own
The best practice is to write your entire plugin into one file named Main
Ah my bad. I’m still a noobie
why does
plugins {
id("org.jetbrains.kotlin.jvm") version ("1.4.0")
}
compile just fine but
val kotlinVersion = "1.4.0"
plugins {
id("org.jetbrains.kotlin.jvm") version (kotlinVersion)
}
doesn't?
help? 😛
isn't it def for variables in groovy?
this is kotlin dsl
Oh
val just means the variable is not re-assignable. const in java
final
eh sorry, final of course
how to upgrade gradle in project?
gradle -> wrapper -> settings or some shit file name
Then change the version and reimport everything
where is gradle?
the folder above your src dir
ye but where can i find wrapper?
sec lemme open IJ
Run gradlew wrapper --gradle-version [ver]
and how can i run that if i type that under gradle it just tries to build..
No it doesn't
it does for me
Show me
Gasper
open the gradle dir above your src dir
Which contains the wrapper
then there's a properties file
ye?
Manually editing files is so 2008
shh Johnny
johnny i got your's to work i waas in wrong directory.
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
frik
Oh this issue
Change it manually 
Oh yeah then you do need to do it manually
Gasper
what are you gonna change there frosty?
http://images.virtusdevelops.eu/shareX/10zusnnz.png
Wrong dir
thatws .gradle
gradle
thats all there is
Not .gradle
and where do i get distribution url?=
Just change it to 6.5.1
Just change the version in there
okay.
The rest stays the same
why 6.5 if theres 6.6?
ok
hey @heady birch if I purchase KiteBoard, would you give me the source code? (GPL says you're supposed to but I'm just curious lol)
Lol
weird question but just try not to ask why lol
er... don't ask how I know it has this lol, but I wanna see how your command system works
because the Argument/Arguments thingy and Completor seem pretty cool tbh
er... I may or may not have downloaded a cracked version, ran it through a deobfuscator and then decompiled it...
🙁
yeah I'm on 3.0.8 lol
It might be a little different
no Context or Registerer or TabCompletor
Pro Premium Elite Full Which name fits best a premium resource? 😂
er... Premium obviously
how the hell did you get the original names back?
Yeah thought so
@heady birch Java deobfuscator figured them out
ive always wondered because the original names would show in stacktraces..
But I think that it's kinda lame to have your premium version of the plugin... be called premium 😂
all of them, except for the UpdateChecker1, which is a synthetic class
oh yeah thats Chocos updater
I just googled "how to deobfuscate Java code" and came across https://github.com/java-deobfuscator/deobfuscator , ran it through that, and surprisingly, it actually worked
if you tell me which obfuscator you used, I could probably get a better result 🙂
proguard
it's proguard? okay
its pretty wack now
so that's why everything's named IIIIIIIiIiIIiiiiIi
until Spigot updated their rules
since these new spigot riles
yeah
yeah
Imagine obfuscating your plugins 🤢
I gotta buy it to get the latest version to deobfuscate right?
Imagine obfuscating your plugins 🤢
@hot hull ikr lol
I hope you don't mind Niall, I'm not gonna share it, I just wanna practice my skills lol
yeah that should be fine
I tried using the deobfuscator on LiteBans first, but I guess it's still breaking the rules, since the main class name and package hierachy are bad
out of interest did it reverse variable names?
some plugins have exemptions
like I can figure out that any variable with private KiteBaordPlugin IIIIIIIiIiIIiiiiIi is probably named plugin, and anything that returns that instance is probably getPlugin()
some of them are a tiny bit more difficult
fun fact java deobfuscator is made by an old mc guy
also this Metrics class (from bStats I know) seems to like doing this: java public Whatever myMethod(MyVariable myVariable) { if (myVariable == null) { throw new IllegalArgumentException(); } } a lot instead of just using @NotNull from like JetBrains annotations or something
like wtf lol
look at the Metrics class from bStats
also @heady birch if I manage to deobfuscate and decompile this to a good standard can I have a cookie? lol
@NotNull doesn't carry any runtime semantics
does it generate code on compile bm?
you can find it in the constructor @heady birch
not that I know of
Oh I see
line 52 in my version
it's just an IDE warning
yeah there is no annotations there
well it definitely compiles or has runtime semantics
cuz if u pass a null value in, it’ll throw a runtime exception
try it
you know what the most tedious part about getting these files to java files was?
oh really?
yeah, i encounter it every now and then when debugging
Oh nice embed
the fact that when decompilers decompile class files, they give you the decompiled code, but you can't save it or anything, so I had to manually copy the contents of every single file one by one to java files
idk
Lol
wat
what decompiler are you using lol?
cfr exports to file
luyten exports to file
luyten can export fine, you wasted your time
lol
anyway, I gotta deobfuscate and decompile with a new version of KiteBoard now
I'm taking a screenshot of Niall's explicit permission, just in case xD
there is absolutely nothing niall can pin against you legally
you may deobfuscate it as long as you don't redistribute any of it
yeah of course I'm not going to redistribute it lol
you have a right by the gpl to redistribute it if you wish, however that’s by all means, a dick move since niall said no
i never got the gpl properly
but I gotta use a new deobfuscator now since the old one doesn't support ProGuard lol
GPL cannot be sublicensed, meaning any work using a GPL-licensed project is also automatically licensed under GPL
and GPL is what entitles me to request the source code from you, and by GPL terms, you're supposed to give it to me, though I'm not fussed that you said no xD
will open source it at some point
Well I mean he doesn't have to give you source, unless you ofc take legal actions 
I don’t believe gpl explicitly disallows sublicensing, the sublicense just needs the same terms
obviously that’s fairly limiting in itself
the gpl is basically a contract
as far as licenses go, gpl is extreme
apparently ProGuard has a mappings file lol
How does the license apply to something that technically doesn't include any of their code, just references
read up on the aggregate section of the gpl midnight
plugins are an extension to the base program, and are therefore considered an aggregate, and are covered by the gpl
anyone got any idea where ProGuard's mappings file is likely to be located? or is that like really old and not package any more
Interesting
Eh, guess this gives me more reason to complete my server implementation
does it use nms?
Nope
anywhere near cuberite or glowstone functionality wise?
Not atm, I'm trying to get chunks in the game
what lang?
But this is still early stages of development, so I'm doing pretty good
Kotlin atm
I plan to support all versions of Minecraft including MCPE
oo
similar goal to me
I’m in the midst of writing an api for both versions of the protocol, with implementations for bukkit, sponge, bungee, velocity, and nukkit
for use in papi 3, and my personal framework
Nice, are you near Glowstone level atm
it’s merely an api, they’re hardly comparable projects
Ah alright
Yeah, I'ma have to write the same api at some point
Maybe that'll save me some time if you make it open source
GPL license tl;dr:
Nice, any link?
camdenorrb
it’s closed source while in early development
prevents people from wasting time pring shit and making useless suggestions
Alright
So it disallows sublicensing but you can of course use and modify it
https://github.com/camdenorrb/Netlius
This is the networking api I made for my server implementation, if you ever need one
and you have to disclose source
no but it doesn't matter, you have to disclose the source under a GPL compatible license
which as far as I could find out is only GPL3
if and when GPL4 comes out, that will probably be the only other one
so it's forward-compatible
@ clip gif me sauce for ploogin pleass
blocky you have to disclose the source if requested
@mental stag https://github.com/PlaceholderAPI/PlaceholderAPI3
blocky you have to disclose the source if requested
@quiet depot Requested by whom? And how do you know it has to be requested first?
apply from: "https://cdn.piggypiglet.me/gradle/spigot.gradle"
dependencies {
spigot "1.16.2-R0.1"
}```
you don’t have to publicly advertise “here’s my source”
you just have to give it when it’s asked for
oh lol
that’s not mine, stole it from someone else
🤔
it’s pretty nifty though, which is why I stole it
surely theres a way with reflection or something to loop through all the . classes in a package or all the classes that implement listener and register them all or something? Just something ive bee nthinking recently - idk reflection at all if you couldnt tell
Wait did you steal that from Sxtanna?
yes
why?
not reliable imo
I recommend scanning the jar itself
@heady birch can you tell me what Java version it was compiled with or do I have to view the Bytecode version for that?
Just something I was thinking...
1.8
cheers
Whys it not reliable tho?
surely theres a way with reflection or something to loop through all the . classes in a package or all the classes that implement listener and register them all or something? Just something ive bee nthinking recently - idk reflection at all if you couldnt tell
@obtuse gale Why not make an abstract class you derive all your listeners from and have it manage all the subscriptions?
I’ve just had issues with it in the past
if you’re insistent on using the classpath instead of scanning the jar, 2 popular libraries exist for the task
I mean the computer does what its told... surely its not just gonna randomly decide not to lol
org.reflections & classgraph
it’s volatile
bukkit does funky stuff with class loading and shit
and that could also change at any time
ah
what if it was for jda then if its just a bukkit thing
the fact that your jar, contains all your class names, which can then be loaded, and sorted, and grouped into listeners, and whatever else you need
it doesn’t matter what way you go about it
the classpath isn’t really meant to be manually accessed
obviously you’re inherently safe if you use one of the libraries I mentioned earlier, as they’d update when something breaks
however by simply scanning the jar itself, you’re probably going to be safe for the future
also scanning the jar is trivial, scanning the classpath, is not
ah alright, i doubt im gonna do it or anything just something id been thinking of...
It’s extremely common
maybe not in the mc world, but definitely outside of it
iirc it’s a concept built into spring
@heady birch never knew you were one of those xD
NO
YES, good Niall.
What class is that
deobfuscator
haha
As they should be.
@hot hull shut the hell up lol
Nah
allman = trash
literally not
Oi, tough talk for a fella within crusading distance
guess I might as well fix up this allman code then
lol
wait so allmann good or allmann bad?
allman trash
im confused as to what side to point my sword at
allman is this: ```kotlin
class Whatever
{
fun myMethod(): Boolean
{
if (myCondition)
{
return true
}
}
}
All these weebs don't have good taste
@hot hull https://www.youtube.com/watch?v=7wivOEXlL9s
MAKE SURE YALL SUBSCRIBE AND CHECK OUT MY NEW VIDEOS !!!!! THANK YOU! LETS GET TO 20k!!!
instagram: @joshies.memes
the animation isnt mine but i added some effects and music over it. took about 20 min enjoy.
original video: https://youtu.be/Iy0quwXzThw
i dont know why I love this
is that a joke
which
also (don't mind the blanks), but is this the correct way to do this or something?
basically defining and then initialising later
where
CommandManager line 50/51
ah okay
so I'm guessing in this case, that's meant to be defined and implemented and then it's called in the if statement
like this: ```java
final Censored censored = censored1.censored2();
if (censored.censored3().censored4(censored[censored]))
if anyone can figure out what any of that means, I'll give you a pound lol
also btw, does @Override not stick around after compilation?
^ I wanna be a part of that
lol
also @heady birch , AboutCommand line 45, who's ID is 333751?
Does allmann specify
if
{
...
} else
{
...
}
or
if
{
...
}
else
{
...
}
?
i hope bottom
bottom one
yeah, that's why it should be } else {
Y'all have feeble minds, you can't handle allman 
I actually think
if {
...
} else {
...
}
looks clean as fuck if the body is short. I guess Allmann is better for larger blocks and I forgot what the other one was called is better for smaller ones
no, it's just that my style is based around writing less code
no, it's just that my style is based around writing less code
@jovial warren dude, linebreaks don't count as writing code are you mental? 😄
let the IJ formatter do its job then
also @heady birch , why are the arguments classes factories? just curious lol
you mean the getInstance() ?
no, I mean the public static Arguments create() or whatever it's called method
oh
I'm just guessing it's create since it looks like a factory method
its kind of like a builder I guess
ya know, sometimes I really can't tell whether these variable names are just what happens when you decompile code or your poor variable naming xD
show example
final StringBuilder sb = new StringBuilder(); (I know everyone names it this, but ya know, still kinda bad xD)
tbh so far, I think I'm actually doing an alright job at this
the CommandContext was probably the easiest to name so far
I've named the String value in the Argument class rawValue because that's what it looks like, that's about the only variable name I'm not actually sure on so far
oh and required, thanks for that as well xD
whereas the implementations are spelt right 🤦♂️
lol
I just called it completor
also @heady birch , what kinda whack code is ```java
for (int length = arguments.length, i = 0; i < length; ++i)
like why did you create the length variable when you only use it once
unless that's again not something that you did
also if anyone knows how to force IJ to inspect raw .java files, lemme know
line 45 yeah
Can't read shit anymore because it doesn't look like I had coded it lol
does <plugin name> overload sound bad for a premium version of a plugin 😂
what plugin?
Karma, you can tell roughly what it is about just by its name
I don't wanna have something basic like Pro or Premium
Too cool for that 😎
KarmaOverload
does
<plugin name> overloadsound bad for a premium version of a plugin 😂
@foggy pond Go withKarma Karmelion
Lol

And yeah I guess, my only worry is that overload is usually a negative word isn't it?
also what kind of a class is CommandRegisterer @heady birch ? lol
What about Karma Prime which is where the word premium comes from?
A mess thats what it is
yeah... I can see that
It adds the command alises in the config
With some weird reflection thing
CommandMap
Yeah Prime does not seem that bad
I liked how Overload sounds better, but Prime makes more sense
Just an fyi tho, I'm using it for my premium plugins as well
yeah was gonna say, this reflection is proper wack
I mean it is not as common as Premium or Pro so it would still be better than those
I keep forgetting that this is Java and that all code needs to finish with ; lol
though I get reminded when I press enter and it gives me like a 12 space indent
okay @heady birch wtf lol
wtf is this: ```java
} catch (NoSuchFieldException exception) {
final IllegalAccessException ex;
ex.printStackTrace();
} catch (IllegalAccessException ignored) {
// we ignore this because this should never happen, I guess
}
yeah no idea lol
what's it supposed to be? something like this?java } catch (NoSuchFieldException | IllegalAccessException exception) { exception.printStackTrack(); } or did I get it right in my comment saying that the IllegalAccessException is ignored
if this the the commandRegistrar still
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
}```
okay cool
it's really handy that the deobfuscator was able to automatically reverse all class (I mean class, enum, interface, etc. lol) names for me, otherwise I think this would be a lot harder and I'd probably be here all day lol
yeah i wonder ifs written into the class file or something
probably
because I notice even with obfuscation the stacktraces show the actual class name
yeah
it's probably in some sort of signature somewhere
also is your API shaded in here somewhere btw?
because I wouldn't've thought that'd be the sort of thing you could get away with obfuscating
and yet I can't find them lol
You shouldn’t obfuscate apis
They are in the same packages as the implementations e.g
I don't obfuscate anything, I'm just testing my skills deobfuscating Niall's KiteBoard (with his permission of course)
a.b.c.d.e.a.class
a.b.c.d.e.b.class
a.b.c.d.e.c.class
a.b.c.d.e.Criteria.class
a.b.c.d.e.CriteriaRegistry.class
oh criteria
yeah that's in net.kitesoftware.board.criteria for me
maybe a couple of these package names were figured out by the deobfuscator as well idk
ah okay
yeah
what's the package containing all the animation stuff in called btw?
because I called it "animations"
animation
bruh this is so annoying lol
with the package containing Colour called "colour", the gradient stuff "gradient", and then the implementations "impl"
actually nvm I called it "animation", so I was spot on lol
yeah exactly
wait I got those bang on as well?
yeah
you wanna know where I got impl from
you showed me that screenshot of the command package and I saw all the commands were in impl lol
yeah
I see you haven't changed the configuration package since the old 3.0.8 cracked version I deobfuscated and decompiled last time lol
yeah
its kind of wack all that stuff
i made some cool annotation for it though I guess
yeah it seems like a cool idea
some of these things you made in here could probably be published as separate libraries tbh
just maybe with a little tweaking
like you have a full animation API and command framework built-in to this
True
giving back to the community isn't such a bad idea lol
also why do you initialise your default settings in GlobalSettings using a static block btw?
and you do the same in LanguageSettings
that's definitely changed
That will be the decompiler/deofsucator
yeah
public final class GlobalSettings {
@ConfigOption(path = "general.enable-update-check")
public static boolean ENABLE_UPDATE_CHECK;
@ConfigOption(path = "general.enable-scoreboard")
public static boolean ENABLE_SCOREBOARD;
@ConfigOption(path = "general.enable-tablist")
public static boolean ENABLE_TABLIST;
@ConfigOption(path = "general.enable-scoreboard-reinstate")
public static boolean ENABLE_REINSTATE;
@ConfigOption(path = "general.enable-short-command")
public static boolean ENABLE_SHORT_COMMAND;
@ConfigOption(path = "command-aliases")
public static List<String> COMMAND_ALIASES;
static {
GlobalSettings.ENABLE_UPDATE_CHECK = true;
GlobalSettings.ENABLE_SCOREBOARD = true;
GlobalSettings.ENABLE_TABLIST = true;
GlobalSettings.ENABLE_REINSTATE = false;
GlobalSettings.ENABLE_SHORT_COMMAND = false;
GlobalSettings.COMMAND_ALIASES = Arrays.asList("kboard", "kb");
}
}
```this is what I got
no idea lol
two*
OH
Ive got a server setup running inside IJ, how do I setup hotswapping or whatever?
you should split some of the libraries off and make them standalone and then release them as standalone libraries
like this configuration thingy
or better yet, open-source the whole thing and let me do it 🙂
whats the thing ive gotta add to change my gradle jar output directory?
shadowJar {
archiveFileName 'whatever'
}
```?
that just changes the file name doesnt it
oh you want to change the build dir

@heady birch what's the name of the boolean at line 30 in ConfigurationLoader? I just can't quite figure out this somewhat bogus logic xD
also why does the bottom method accept an Object when it only ever calls getClass(), and it gets provided a Class<?>
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by me.bristermitten.pdm.util.ClassLoaderReflection (file:/Z:/project/server/plugins/project-1.0-SNAPSHOT.jar) to method java.net.URLClassLoader.addURL(java.net.URL)
WARNING: Please consider reporting this to the maintainers of me.bristermitten.pdm.util.ClassLoaderReflection
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release```
Just a warning tho and hasnt broken anything
@prisma wave
ah okay
which gets updated when config.isSet(configOption.path()) is false right?
also why does the bottom method accept an
Objectwhen it only ever callsgetClass(), and it gets provided aClass<?>
also, this lol
@obtuse gale that warning is pretty much unavoidable until java 9+ becomes mainstream
i could add a workaround but it's not worth the effort tbh
good second point
I replaced it with final Class<?> clazz and replaced all occurences of o.getClass() with clazz in my version
bruh my reload changed classes keybinds isnt doing anything lol
I followed piggys tutorial on spigot, idk if that was outdated but I think ived used it before
show me
that one
also you realise you could just ask pig himself if you need help
Yo bois how could I create a custom block using a texturepack in my server? I know I can just change the texture of existing blocks but how do I actually create new blocks?
Weird thing ive never had to actually do
Whats an accurate way of measuring something per seconds
like how long something takes?
ah okay
yeah true
lol
niall component
also, what is ConfigType @heady birch ?
component.hoverEvent = HoverEvent(HoverEvent.Action.SHOW_ITEM, ItemStack(Material.DIAMOND_SWORD) that'd be simple
but no
this bitch
graphics.draw(new Rectangle2D.Double(x, y, 75, 30));
Wrong paste lol
lol
No just the kiteboard specific layout
so they're BASIC and ADVANCED then
wow I should read more of the wiki lol
in the enum
ya know, having that enum is nice and all, but go to line ~24 in ConfigGroup lol
this.type = ConfigType.ADVANCED
component.hoverEvent = HoverEvent(HoverEvent.Action.SHOW_ITEM, ItemStack(Material.DIAMOND_SWORD)that'd be simple
@remote goblet when u figure out how to do it let me copy ur code
It requires NMS i believe
mainly because im shit, but we ignore that part 
my hotswap still isnt doing anything lol
https://www.spigotmc.org/threads/tut-item-tooltips-with-the-chatcomponent-api.65964/ this is like the best thread on it
and it's literally like
I dont get that message saying like X classes reloaded
5 years old
yes the default group type is advanced
what are all these constants as well
dont know just thought it looked nicer 😫
Why does gradle have only groovy and kotlin as dsls when it's written in Java?
no idea what they are lol
config paths
@empty flint because both of those languages cut out boilerplate
@heady birch so like "setting" for example is the SETTINGS_PATH?
oh I've been there, I just haven't done anything with it yet except for name the packages
I really should be keeping track of what I've done and what I haven't lol
screw it, I'm doing the adapters next lol
@empty flint it's written in a combination of groovy and java, and what are the other options?
java and scala would be way too verbose
Rust
wait are these adapters what allow the plugin to run on multiple versions with all the latest features in a single codebase? (I'm guessing it does that) @heady birch
Yeah
nice
what are these void methods in Adapter? are they just for transforming the appearance of the board or something?
yeah looks like they just send modified packets
they do the actual packets
yeah I've got no chance with these then since I have no idea how packets work lol
we'll come back to these lol
Are you sure aj?
I mean yeah I think so
What changes did you make?
unless my gradle build is failing for some reason
I added a player.setHealth and a println
is that not enough or something lol
That should be fine



where's esophose when you need em