#dev-general
1 messages ยท Page 82 of 1
I'm on this version, any never or? 1.0.4
@onyx loom HEY! WHY YOU STEAL MY LINE!!!!
oop
Gaby shouldn't be too difficult
DAMNIT KYLE
Wait ur no Kyle
Still same south park ref lmao
Lmao "major updates"
- That's not true
- Amazong commit names
@signal tinsel that would require it to become an actual plugin
instead of it being a library you shade in
you have no idea what you are saying
if you can't explain it you don't know how it works
Just add the comments onto methods and the javadoc plugin generates it
@twin scarab A friend of mine does, without "issues"
So let me see if i understand, more big servers use paper, the bigger the server the worse is the performance, therefore paper has worse performance than spigot
That's some next level correlation here
Lmao
Anyhow as I was saying, eViDeNcE
xD
@topaz bay we're gonna have to wait a bit till he can do that :kek:
@hot hull ?
He got a mute
He already answered me?
@storm latch I'm using Kotlin
I'll figure it, ty though ;p
Hello, can i create like with PAPI? I mean by creating a plugin for cars using papi?
Ye
Well I mean it's possible
you want to make cars with PlaceholderAPI?
i'm not sure there is one
@ocean quartz
Found a bug with the cmd lib. The commands are not unregistered when the plugin gets unloaded.
You sure they are not unregistering and not just still showing on tab complete?
Because i could not find a way to remove it from tab complete once it was there
Yup they are not unregistering
Maybe the Listener is unregistered before PluginDisableEvent?
What is you using to unregister the plugin?
I noticed it while using bile auto drop load but seems to be the same when using plugman
I'll take a look at it
Though how is the plugin getting disabled?
If you're disabling it on enable because of dependency and stuff, i suggest doing the check before registering the commands
And if it's plugman then "ugh" xD
ew
And if it's plugman then "ugh" xDxD I cant restart everytime to test
I just let it autoreload on build with bile
Plus, many users use plugman anyway
Anyone using github actions?
@old wyvern Still doodoo
IT MEANS SHIT
doodoo means shit?
oui
What was that towards? using plugman?
oui
welp
Plugman sucks
The thing is plugman is fine in theory it's just very few plugins actually use onDisable properly
So you get chaos
xD true
Im guilty
bring in the guillotine
Off with his head
Off with all y'all's heads
Let them eat cake
@obtuse gale Fixed the array argument on version 1.1.5-BETA
The thing is plugman is fine in theory it's just very few plugins actually use onDisable properly
public void onDisable() {
onEnable();
}```
afaik this should stup the vandalism
Lets go one step further for the overflow ๐ฝ
public void onDisable() {
onEnable();
}
public void onEnable(){
onDisable();
}```
Brister AlttenAlten
@Override
public void onLoad() {
if(isEnabled()) {
onDisable();
} else {
onEnable();
}
}
@Override
public void onEnable() {
onDisable();
}
@Override
public void onDisable() {
onLoad();
}```
how's that
and yes I should change it
oh god xD
void destruction() {
try {
destruction();
} finally {
destruction();
}
}
```still one of my personal favourites
fair warning this might take a while if you run it
a while?
last time I tried it it took my JVM 12-ish minutes to crash I think
xD
what's really funny about it is that it can't be cancelled if you run it in some thread or sth
This takes me to recursive programming in school and how much i hated it
I mean... this is not a very useful example of recursion
This takes me to recursive programming in school and how much i hated it
What Niall? xD
And yeah i know was just saying it made me remember the school times
niall was trying to make a recursion joke, but failed
Lol
Oh xD
I really like recursion
It's often a lot more expressive than loops
and far simpler in many cases
I agree with you in that yeah
Though we had to do full exercises where everything needed to be recursive and it was awful
I had a 1 day workshop for that. The instructor just defined recursion and gave us problems
๐
well, the language I'm currently using doesn't even have loops to begin with
you get used to it
And half an hour later he conducted a competition on hackerrank for the same
We did it in C
๐
oh lord
Yup
that sucks I agree
We did it in CSame but I asked the dude If I can use Java and he said yes so welp xD
I thought that it'd be a good idea to choose algorithms and data structures for my final oral exam in a few days
So I suppose I'll have to get into some of the stuff in java again as well
@old wyvern I'm loving these NPEs from Silkspawners, cause the spawner isn't being broken by a player, iMaGiNe A pLuGiN aCtUaLlY hAvInG nUlL cHeCkS
who has nullchecks lol
i Do
noob
Not even sure how to even retrieve the type of the broken spawner once I handle the checks..
whats their current code
nUlLKolin Gang has joined the chat
Im surprised someone didnt bring that up this time tho
ok nvm
celebrated too soon
xD
The Saga continues...
lol
ooh theres more
lol
Hank you vor the rang
I have no idea xD
No but I seriously have no idea how to even go about handling this properly
It's calling SpawnerBreakEvent
But it's throwing an npe cause they don't know the concept of a null check
um
BlockBreakEvent isnt triggered for explosions
BlockExplodeEvent
No explosion ahndling
4head
wha?
I'm listening to blockexplodevent, it just so happens to be that when a spawner is broken by an explosion, it throws an npe
lol
From ss spawnerbreakevent
thats pog
imagine having null
@prisma wave
Not on pc anymore
ah rip
@lunar cypress lmao
I'll show you tommorrow
that's brilliant
yeah I love this meme template
it's so simple and dumb but really funny for some reason
It was the quarantine man, it fucked your humour
I'm afraid that is true
Go only has 1 type of pointer @prisma wave
those symbols represent the operation youre doing
Is the * like Kotlin's!
* is how you declare that it is a pointer and not just the type
Oh
& is how you create a pointer
Maybe, havent used it
I think it's the same
Yup
What I don't get is why you'd need to pass a pointer in this example https://img.bristermitten.me/00.11.16-2020.png
Why not just pass the value?
type Human struct {
Name string
}
func GetPointer() *Human { // returns a pointer to a human
return &Human {
Name: "Sxtanna"
}
}
Is it some low level string thing
oh
aka, get the value of the pointer
ah I see
& gets mem loc
- gets value at mem loc
yes
interesting
And the value at that pointer is assigned with the parse method
Oh that's kinda weird
So if I didn't call Parse() the pointer would point to nothing?
Yes
That seems odd
Seems perfectly logical to me?
Why wouldn't flag.String initialize it?
How does that seem logical to you?
Youre defining what the flag is
Yeah because it's not just 1 string
It has to be parsed
I see
That's actually pretty cool
So it's kind of like lazy initialisation
But cleverer
4head ive been meaning to ask you for a while, how do you get those special symboly things for not equals and stuff?
font ligatures
fira code
cascadia code has them too
What are you making?
Which is best? I'm guessing that's very subjective but still
fira code
I'd say JB mono
I use fira in the editor, and jetbrains mono for the ide
It's really personal preference
Ok, thanks guys
@frail glade was that to me?
Si
Im making many things right now
Aren't we all
If youre asking about the picture, thats golangmc
go is kinda confusing but at the same time clever
Idk
Meanwhile I've been sitting here looking at the same error for 10 minutes. I think it's time for bed or something.
I'm still not sure why flag.Int couldn't do the parsing then and there
Probably being very dumb but oh well
Question
Have you used a flag parsing lib in Java?
Because this is almost EXACTLY how every flag parsing library works
As in for a command line?
Huh?
Was doing with testing with ORM earlier and I sat there trying to fix this error for a solid 20 minutes and then I realized I was testing with Java and not Kotlin and it was requiring getters that I assumed had been generated.
what exactly is a "flag" in this case
program arguments
like -nogui for paper
This is from commons cli
I see
are you ok
Have you asked it politely to work?
Mhmm
One of my favourite things to do is eat foods that Im allergic to, just to be reminded of my mortality
I have no cursed at it yet.
that's... Very...
Maybe I just need Sxtanna to yell at me so I get my shit together.
existential
I don't think Sx has yelled at me yet
I mean, theres nothing like having your throat swell nearly shut
But allowing JUST enough air in
Okay sx
NOT TOO MUCH
ima need your help
Ori I'll help instead I'm the new sx
Don't you ever fucking disrespect me like that
repeatedly doing this is gonna arrow code like fuck
...
@remote goblet method references
Oh... eh nvm you use the current context
Why are you doing it like this?
Instead of using a composable builder?
Okay here's my theory, in my abstractd interface I add a function for the name of the backend and then I do some enum thingy mc jiggy and then from there I can get the backend for the interface
Are you feeling ok?
Why not like... just make a normal enum...
You get the enum constant that matches the name of whats in the config
guice injection of the database
Okay sx
i have some garbage EventWaiter class
ngl
https://hasteb.in/sosoziza.java how bad is it
ideally i need to make it so there's no arrow code
or as little arrow code as possible
then use a builder
how tho
Whered you get this?
what
Neither do i, its so bad
Its literally the same thing?
lmao
just one return difference
what is going on
https://github.com/JDA-Applications/JDA-Utilities waste your time to read through that
stupidity
Okay but I'm not using guice for it. So in this case wouldn't the enum just go inside the interface and then have a method to get the name and then match it to the config?
Why not use Matts?
it's not done?
and i made my own anyway
so kekW
i created the exact same thing with 23 less class files
I thought Matt's was in pre beta or something still
it is
ugh... annotations
Shouldn't this work because they are both implementing that interface?
Oh I have to make a new instance of it, duh.
Hey so Iโm not a developer, but I am instead looking for 1 or 2. Anyone?
Ah thank you ๐
Rip nvm that's not working since I require parameter stuff
@topaz bay I wanted to haunt you before I got in bed, enjoy
@ocean quartz This is clearly bullying
On Netflix?
It is kinda older.
2005
Are you going to go onto Project Korra next?
is it on netflix?
I'm not sure.
I figured you would.
Yup
Yeah
My show was on Netflix but it got removed 5 days ago.
I was so confused as to where it went at first.
I don't know if I've ever seen that.
WHAT!!!!
Please tell me you at least know the theme
Even if you dont know x files, you probably know the theme
There's a fly in my room. I'm upset.
There's no windows on the floor I'm on.
One chance
I have no idea because idk what you watch
THINK ABOUT IT
Oh nvm, fuck it.
Its game of thrones
Without the 8th season, cause fuck that season
I never watched that.
WHAT
I fucking love west world
I'm only on S1 tho
Oh yeah?
Well it was, until one of my hoes changed it to a Genji skin
I have a 4k bluray box set of westworld
Damn
What are your other 4
In no particular order, steven universe, game of thrones, american horror story, and once upon a time
Oh you know what, Im actually completely fine with that order
That order seems about right
but west world would be before once upon a time
I used to watch OUAT
I fucking love that show
why is sokka legit high in this episode
Is this on Netflix or something?
yes, its avatar
No
S2E11
OUAT
LOL
Good luck
Also, if you havent seen Sense8 thats another BOMB ass show you should watch
A huge shame they cancelled it
I saw a few
Its fucking iconic
It was interesting
Hehe
S1E1 here we go
OUAT?
Ya
yuuuuhhhhhh get into ittttt
Hmm guys, is Java web apps worth it? If so any idea where should I start?
By web apps do you mean like a PWA?
Seems like it could be worth a try
Progressive web app is a website that can work offline as well
With a few extra features
You can add it as an "app" on mobile and things
There's a framework for Java PWAs, vaadin iirc
that might be worth a try
Spotify is a PWA for example
So you can run it inside chrome as a standalone app rather than downloading a native binary
It's kinda like electron
O.o nice. Imma have a look at vaadin
^
How's everyone doing today
3 billion devices run java ๐
I swear that number haven't change in years
lemme just set up my website with this cool new feature called "applets"
๐
Just went for a run. Going to work on some stuff for EssX today.
Oh boy Denizens breaking my plugin for other people again wonderful start of the day
Why tf does it change NPC ids..
https://img.bristermitten.me/14.41.21-2020.png @topaz bay why doesn't this work
it doesn't run the thing
It went
?
=check @zealous wharf
Seems they don't have an account linked?
ffs
I'm confused rn
wait for him to reply phoenix
And you have to wait for paypal to process the payment..
It was supposed to be 24 hrs
It's paypal..
It's been 23 hours.
If they don't release it by the time I have dinner tonight, I'll contact them.
I can't refund money I never got.
Time to buy a lambo, make sure the bank is processing, and refund >:)
Lol. I wish.
So i need you guys' opinion on this. A plugin I've been comissioned to update uses MCCORE: https://github.com/Eniripsa96/MCCore, but like, the last commit was 2 years ago so I assume there will be bugs and a lot of issues with using it on 1.15.2. Is it worth trying to use it or do I just skip it and convert all the methods the plugin uses from it into a utils class by using the Javadocs to find out what they do?
@zealous wharf I think it just cleared.
You can run the command yourself in #bot-commands
=spigot check
You need to link first.
@errant geyser depends on 2 things:
how much is being used
how long conversion will take.
Try and use it in 1.15, adjust for any compile-time errors. If you get any runtime errors and it's not a large amount of code being used then I'd move away from it. The GitHub page looks awful so you're probably not missing much
alright cheers
Now I just have to upload it to the repo kekw
And they removed their pom/build file so now I gotta hope it all builds with just the Spigot dependency
:omegaYikes:
Thoughts on this?
To dynamically register commands
final CommandBuilder commandBuilder =
new CommandBuilder()
.setPrefix("?")
.setCommand("test")
.setExecutor((args, message) -> {
// Handling the command here
})
.setRequirement("#admin-up")
.setParamLimits(0, 2)
.autoDelete();
commandManager.register(commandBuilder.build());
Lovely
Thought about it because Gaby suggested I do a faq command like we have here, so let's say I do ?faq create newfaq, you can't make a new command with the annotations this way, but it'd be handy and easy with the builder
A command to create commands
alr why am i getting an unsolved reference error ๐ฆ
send code
i got the jdk and kotlin lib already 
its literally just
main
printIn
fun main() {
printIn("Hello world")
}
idfk
do i need to do that rn
i was just following the getting started tutorial on kotlin website
@onyx loom Don't start with kotlin
nah it shouldn't be necessary although it's a good idea
no u
@hot hull shush you
YEAH SHUSH
Frosty, at the end you'll be the only hater left
kotlin is easier to learn
You're dooming him..
on the contrary
see
๐
F java
ive googled it and people are saying that ive got mismatched versions or some shit
but ive just updated everything to the latest so idk
Hi
Ooof
Why I have this error
Make sure your java at 8
ye i am
My code
You're loading a dependency outside the onEnable method Magic
Method method = new Method();
public void onEnable(){
method.consoleMessageOn();
method.Files();
method.files_Exist();
}
public void onDisable(){
method.consoleMessageOff();
}
}```
Am I doing something wrong
public class Main extends JavaPlugin {
private Method method;
public void onEnable(){
method = new Method();
method.consoleMessageOn();
method.Files();
method.files_Exist();
}
public void onDisable(){
method.consoleMessageOff();
}
}
No point in putting the "method" inside the enable unless it is dependent on plugin
Eeeee, only god knows what the Method class is
method class reading that hurts
Go away
And those method names are hurting my eyes
reeeeeeeeeeee
KM, null checks? No such thing
๐ญ
@obtuse gale Plugin already initialized you most likely have another class extending JavaPlugin
@onyx loom you still having trouble?
yes ๐ฆ
private Method method = new Method();
public void onEnable(){
method.consoleMessageOn();
method.Files();
method.files_Exist();
}
public void onDisable(){
method.consoleMessageOff();
}
}```
Jesus
A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.
@onyx loom how did you make the project? New project > Kotlin > Kotlin / JVM?
indeed
@obtuse gale Exactly what I said, your Method class is also extending JavaPlugin, why?..
You might wanna learn a bit of Java before you keep going
Anyways that is not how that works
You need to pass down the instance of your Plugin with Dependency Injection
JetBrains Academy (free online course): https://www.jetbrains.com/academy/
Codeacademy (free online course): https://www.codecademy.com/learn/learn-java
University of Helsinki (free online course): https://java-programming.mooc.fi/
Basic Java Tutorials: https://docs.oracle.com/javase/tutorial/
If you want some free guides @obtuse gale
Introducing JetBrains Academy โ an educational platform for future developers. Master programming by building real applications step by step in an adaptive project-based learning environment integrated with IntelliJ IDEA Edu.
Utilize our Java tutorial to learn the basics of the popular language, including Java objects, in this introductory course.
Helsingin yliopiston kaikille avoin ja ilmainen ohjelmoinnin perusteet opettava verkkokurssi. Kurssilla perehdytรครคn nykyaikaisen ohjelmoinnin perusideoihin sekรค ohjelmoinnissa kรคytettรคvien tyรถvรคlineiden lisรคksi algoritmien laatimiseen. Kurssille osallistuminen ei vaadi ennakko...
@onyx loom go to file, project configuration, and send a screenshot of "Project"
project structure?
That's it
i feel like im missing something stupid
Annoyingly that looks fine
I can't vc rn
aww
But in like an hour
i wanted to hear that sexy voice ๐
In the meantime I'd try making a gradle project
Enable kotlin and put files in src/main/kotlin
Should work fine
Python isn't that bad
ye i needed to learn it in secondary school
Imagine your school offering computer science ๐ญ
wew
still getting the unsolved reference with gradle ๐
its all there as far as i know
Wtf is wrong with your pc lmao
ยฏ_(ใ)_/ยฏ
build.gradle?
i have the file there ye
I mean can you send it lol
Yep
sorry 
You got JDK installed right?
as soon as this starts working, i shouldnt annoy u for a while haha
ye ofc
i just tried updating it before coming in here
not really but ill give whatever it is a try
It's a build tool and dependency manager
We'll get to the actual semantics later
but anyway on the right there should be a gradle tab
if you click that, then your project name, then tasks, then it'll be something like "build"
yep
Double click build
and tell me if it works
because that'll narrow it down to being a problem with intellij if it does
still unsolved reference
ok plan b
Go terminal at the bottom
then type gradlew.bat build
if that works then intellij is being dumb
* What went wrong:
Execution failed for task ':compileKotlin'.
> Compilation error. See log for more details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
1 actionable task: 1 executed
well that's descriptive
IJ releaving you from your misery
๐ฌ
You should delete USER_HOME/.intellij-blah after you uninstall
it'll be a hidden folder remember
user home on windows is C:\users\username
i found a .gradle
thats all i got
In the parent folder of that
also a .m2 folder which is maven i think?
yeah that's maven
if there's nothing about intellij in users/Dylan then just reinstall
but sometimes things get leftover
groovy is another JVM language
It's what gradle is written in, you might as well enable it
It might well be
so fukin weird if this is the issue
I'm running out of ideas so it had better be
yeah I've literally never seen this happen before
Why is it that deluxechat is making two ranks on my IGN?
ffs
i create the kotlin file under src main kotlin right?
yes

uh wat
wait.
And when i tell people to use -l and they do -1
tf
Bruh what is wrong with your pc
Lmao
Worked fine on windows for me
Back in the day
Hm
let's try something
if you back into the intellij terminal
and run javac src/main/java/wew.java what does that give?
it might need to be backslashes on windows idk
Anyone who writes free plugins
idk looks like it was here https://img.bristermitten.me/21.37.38-2020.png
cus i went into the project structure and the SDK drop down had the kotlin sdk in there this time
whereas in my old IJ, it wasnt there
altho, the project was still using the same jdk tho
hm
it's actually supposed to be the JDK i think
which is weird
i hate programming
๐
at least it works now lmao
probably would've noticed that on pc
nice nice
you gonna start with plugins or just basic things?
basics is the way to go
smart
will spend a couple months makes just makin some simple shit ig
i doubt it'll take that long
once you know the basic stuff you can probably start with plugins
i have a pdf file of programs that i made in visual basic, so will just try to recreate them first in kotlin
sounds like a good plan
Write minecraft as your first project
fun minecraft {
minecraft()
}
truly a god tier programmer
indeed
i'm catching up to you ๐
indeed

Is this more efficient
consoleMessages.set(1, "(Mute v1) Going offline. Goodbye");
System.out.println(consoleMessages.get(0));
System.out.println(consoleMessages.get(1));```
Then creating multiple strings value
Like how?
that's not really how it works
ArrayList will actually use slightly more memory because object headers
I don't understand why you'd need to put them in a list then get from the list, sounds like just adding more to do nothing
And i don't know what you meant by
Then creating multiple strings value
I know that but it is more efficient
in what way?
Isn't it?
"efficient" could mean anything
it's not faster, and it's not more memory efficient
what else is there?
You gave us one example, give use the other one and we'll tell which one is better
readLine()?
๐
but they're quite long lines
peasants
pfff
Ayyy that's a start
Now to actually implement it correctly now that I know it works xD
lol
\n?
ye
just finished my sesh for today. so far kotlin has gave me a fat boner
exactly
guys need help
well let me tell you what i did
i was configuring my skywars
and i went to my folders and decompressed an old backup
but it replaced all my config
i loose all
is there a command to make a rollback in files time ?
mute.add(player.getUniqueId().toString());
player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&bYou are muted"));
config.set("player" + "." + "UUID", player.getUniqueId().toString());
saveConfig();
return true;
}
if (command.getName().equalsIgnoreCase("unmute") && mute.contains(player.getUniqueId().toString())){
player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&bYou are unmuted"));
mute.remove(player.getUniqueId().toString());
saveResource("config.yml", true);
return true;
}```
How do I like
Remove a player uuid from the config
\r
lol
wtf
as I sent that message discord updated this channel with 100 new messages
just finished my sesh for today. so far kotlin has gave me a fat boner
@onyx loom java can do better ;)
objectively false
it's not in the least bit true
No one uses Java right, and that's the problem
i'm not sure you can use it right
I had a discussion with someone recently who said that mutable objects in Java are not the default and that you can use it as a functional language
as an example they mentioned newer standard library apis that are mostly immutable
like java.time
in what way does that mean it's the default lmao
idk. I was quite confused as well
that person is an idiot
@pale shell supposedly things are immutable by default in java which is absolutely untrue
What is a class but a curried function?
I still don't quite get that one
Classes (and by extension, inheritance hierarchies) and curried functions are really not that different. They exist to encapsulate some state or behavior within a context.
It was a civil discussion and no offence was taken, lol
but it's still rather far fetched
to say the least
what I don't understand
is how they actually know what curried functions are and yet they somehow got it completely wrong
well
I think they try to super impose something on the languages they're forced to use lol
To my question
Why not use a language that embraces those concepts naturally, i.e. a functional one?
They answered
Because, sadly, that's not what I get paid to use ๐ฆ
poor guy
ok, I have more interesting programming language takes
This one was under a thread about concurrency models, especially coroutines and how they work in different languages, with some focus on go
ooh go
Go does things that have been done before but with new terminology for marketing purposes. I really can't stand Go.
This. I also hate that there are so many languages taking bad ideas from it, the identifier : type = value; thing is especially annoying.
I mean the first one is a fair opinion, I guess, but the second one is somewhat funny to me
Like, there are so many things to consider in this context and you pick this?
identifier : type = value; they hate the idea of specifying a type?
No they don't, that's the thing
what do they hate about that
That's a very minor detail, imo. Doesn't make a difference to type identifier = value in terms of language features.
It's arguably less readable but my main gripe is the colon, it doesn't need to be there at all. The same goes for things like -> in functions, just random symbols floating about for fluffy aesthetic reasons. This is not what programming is about.
ugh
one of those people
i bet they only use C and Haskell or something and think they're superior
literally every programming language uses symbols
they're not "aesthetic" if they convey meaning
exactly
by their argument the curly bracket is useless because it could be just replaced with indentation
they go on to say that func f() int {} is clearly more readable than func f() -> int {}
Which I don't even agree with lol
they do
