#dev-general
1 messages ยท Page 553 of 1
and it's better than groovy obviously
oh no, "constraints liberate, liberties constrain"
Almost any language I can think of is more free than Java
tbf the post was talking about something totally different but it was still an interesting point
I dunno, I guess being ramrodded into the Java model can be a good forceful mold to constrain a lot of individuals to produce semi-normal code
basically all mainly functional languages are more restrictive
yeah definitely
Well not in the same way
And that's not really what I meant, I'm talking more about the use cases for a language like Java
Or really an imperative or OOP language of any kind
i do think that "having to" write code in a certain way does make things easier
there's less to think about, and you get a more consistent codebase
so that's probably it
^
I mean you can enforce restrictions on any codebase
whereas in kotlin you can mix OO and functional and extension functions and everything together until you've got a mess
I feel like you can get a lot more done in a lot less time with Kotlin than with Java
Due to that paradigm mixing, it borrows from a lot of sources
There's a lot of things that feel really awkward being forced into Java's mold
yeah im not doubting that it's more productive but faster != better
I dunno, I mean this is why you have code reviews and linters
And contribution guidelines
To ensure a project doesn't get too out of hand
well what's the point of getting something done quickly if you're inevitably going to have to refactor the hell out of it?
I think the point is that you're always going to have to refactor the hell out of it
That's the essence of working in a large codebase
sure
Kotlin allows you to use a lot more nicety and get to the refactor stage a lot quicker
And maybe someday, emilyy's 5-paragraph essay will be complete ๐
This actually, I remember reading in an article something along the lines of "A paradigm brews from taking away certain factors from complete freedom" or something like that, basically restraining your possibilities and you have design patterns you have to work with
e.g. in assembly language you have all the freedom, all of it, you can do whatever; the moment you start adding abstractions and you prevent access and control over certain things you end up with higher level languages that abstract things away and you can't everything you could do before, yes the things you can do you may (and probably will) be able to execute easier, but not everything
Interesting
True, though I feel like that applies less to differences between like Kotlin and Java than it does Assembly and any higher level language
but yeah that does make sense
as far as I'm concerned kotlin and java have pretty different paradigms - java is typically pure OO whereas kotlin is a blend of everything
Yeah exactly, but that's a lot less of a difference than assembly to a higher level lang
they have similarities but kotlin's multi-paradigmn-ness is essentially saying "let's not take away any factors from complete freedom"
I think it allows you to do so much more than you can with Java, at least without awkward work arounds
meh
Java is like in the top 3 or top 2 languages any programmer thinks when you mention "OOP" lol
Coroutines are a great example
I do agree that forcing compliance can definitely be useful
coroutines are nice but they're not really much more than a library with a bit of syntax sugar
But I feel that the vice of Java is a little too tight
maybe
loom ๐ฅบ
all i know is that i've written 82 classes in the past few days and i've never really felt myself missing kotlin
Lmao
Just a heads up if anyoneโs looking into doing MahootSoโs Request He will Scam you ๐
Wow, I think you've evolved backwards lol
Any time I work on a Java project, I yearn for Kotlin's syntax and easy resolving of issues that plague Java
Maybe all the projects to improve Java will remedy this
And complain about your library closing closeables before doing the thing :PepeLa:
java 16 + vavr is all you need to be productive
But as it stands, all that boilerplate really hurts
that's the libraries fault not the language!!
nah
Heh
tell that to my university ๐ฅฒ
java 8, no build tools
records, proper encapsulation, etc, you don't really need much boilerplate
true records are magical
You're lucky you're using Java 8 lol
i think only like 3 or 4 classes have getters and setters
Some get to be on 7
and even then I yearn for Kotlin's glory
And its version trancendence is nothing to be scoffed at
If you're making a plugin for Minecraft 1.8 - 1.17, you sure as hell can't use any new java features
jabel ๐
Funnily enough 1.8.8 runs on Java 16 lmao
And how many server owners are using Java 16 ๐
b-but my custom made 1.7.10 cannon jar doesn't work!!
Yeah tell that to the fork of a fork of a fork of a fork of ...
46% hot damn
ok on a more serious note, what do you think about this pattern?
i have a config wrapper that looks something like this: ```java
public record LangConfig(
@SerializedName("party") PartyLang partyLang
) {
public static final Configuration<LangConfig> CONFIG = new Configuration<>(LangConfig.class, "lang.yml");
public record PartyLang(
@SerializedName("invite-sent") String inviteSent
) {}
}
and parts of the program will need to retrieve messages from the langconfig and pass them to LangService#sendMessage(Player, String)
i was thinking about making a method `LangService#sendMessage(Player, Function<LangConfig, String>)` to avoid having to pass around the LangConfig everywhere, so it only gets injected into LangService. thoughts?
yeah that's actually way better than I thought ngl
That's huge
and then you could do stuff like lang.sendMessage(player, config -> config.partyLang().inviteSent())
uh well I hate what you're doing with the parens and brackets
that's not important smh
but it sounds like you're trying to mix paradigms Kotlin-style!
nah
First-class functions? In Java?!
just trying to reduce coupling
my PartyService shouldn't depend on LangConfig just to be able to send a single message
it just gets the config from the function
LangService#sendMessage would encapsulate all of the logic of actually getting the language file and stuff
bruh
lmao
simon
Nice
how fitting
ok
well
since none of you have got anything useful to say i'll assume it's fine thank you ๐
BM I think you are working at much too high of a level for any of us to meaningfully contribute to your whimsical ideas
I mean you literally progressed so far you went backwards in the normal chain
i dont think it's a bad idea, just wondering if there are better ways lol
hey speaking of bad ideas
i was thinking of making a new deluxemenus configuration DSL for fun
Yes I have one
it started as a lisp because then I could make the interpreter for it and it would be fun
It's called BetterJails
i mean no
you know the average iq of a deluxemenus user
but im going for power over usability
then maybe a lisp is good
code as data, very concise and expressive
yea that's what i was kinda thinkin
hmm perhaps
https://github.com/edn-format/edn seems like edn could be nice
clojure yaml
Hi,
For a school project, I have to create an android application for Android 8.0 (SDK 26) or less. Proble, My application is on SDK 31 (started on 14 but maybe I increased the version without taking care). When I try to decrease the version, I got these kind of errors
https://pastebin.com/nk5N98yy
I tried to fix it by implementing "com.android.support:preference-v[version]" but it doesn't help.
Thanks in advance for your advices '-
Someone tell me I ainโt copying emily pfp
anyone here know the cause of an error like class org.kryptonmc.krypton.registry.ops.RegistryReadOps$readAndRegister$result$1 cannot be cast to class kotlin.jvm.functions.Function0 (org.kryptonmc.krypton.registry.ops.RegistryReadOps$readAndRegister$result$1 and kotlin.jvm.functions.Function0 are in unnamed module of loader 'app')?
Iโd be lying then
well, figured it out
I switched from using Supplier<E> to using () -> E, and forgot to change one of the returns to match that change
that does make sense
rule #1: don't mix Java and Kotlin functional types, you're probably gonna break something
lol
Anyone know of the pluging called "Terra"
Im trying to set it up and its not letting me.
wrong channel - ask in #general-plugins :))
Thanks!
np
Is it possible to make an automatic upload to github every 2 minutes or so?
sometimes you don't want to commit things
commits are supposed to be very intentional
or sometimes there are things you don't want to commit, like changes to config files or whatever
This is just for a javadoc
So I guess it won't be dangerous? The commits can just be named something like automatic update to docs
why not just make a service that redeploys the docs every time you commit a change
Or that
Can that be done within a gradle task?
Or can gradle run scripts?
wat
So like if I could run a .bat file with gradle, then that file could just upload the docs to github
Just wondering if I can run a .bat file with a gradle task
Don't know what either is, I think
are you not publishing the javadocs to pages?
They will be pushed to a private organisation on github
wha?
I want to push this to the repository
and how do you plan on hosting those html documents?
yes i know
just
use github pages
free hosting
you don't need another repository
Oh
and it integrates with CI (actions)
Does it go through the same organisations from standard github?
To make them private etc.
psst BM
how do I paste into Doom Emacs ๐
and it copies from my OS?
Oh snap it did!
ez
okay it was just being weird tyvm โค๏ธ
โค๏ธ
It requires github enterprises :// or making it public
why private โน๏ธ
It's for a server
and?
They want it private for some reason
If a user is set up as an organisation isn't it an enterprises user then?
no, enterprise is where you pay a lot of money, usually you also self host a version of github
Ugh then github pages does cost quite a bit to have hosted private
Host public 
๐
just use your oracle server as a web server lol
That would also make the site public, no?
if only there were access control methods to stop unauthorized individuals from viewing private websites ๐ฎ
Wait are there? Or are you being serious lol
bro obviously
you can put anything behind a password in nginx
also like any other website schema
Wait a private website? As in only you can access?
Localhost it and open the ports then select allowed ips
Hmm, I would prefer the password option with oracle if possible
Well, if it can be done without too much struggle
i mean yeah obviously it's possible
literally any CMS of any kind
even nginx itself has password requirements
Dunno what CMS is
Ktor ๐
uh there's one for rust I forget what it's called
Actix?
oh yeah that might be it
Super speedy
Diesel is good for ORM too
Korm ๐
emilly 2.0?
Myes
emilyy likes korm? lmao
Well gonna change soon, just a temp one while finding a bette one
i thought she liked cpp
ohhh
Cobol++ ?
that's it
Out of your mind!?
Conclureeeee
Hai
Conclureee uwu
MwMatt
I heard mavenCentral is a good replacement for jcenter, but what do I do with the repositories that doesnt exist in mavenCentral but they're in jcenter, or bintray. I think bintray in this case
Any good and decent login and register system "secure" with session, because im making a panel and i need one. If make one its would be really insecure.
Btw
jcenter and bintray are being taken down
If using spring, spring security
Im using plain code, Php
๐ฅธ
Oh right missed that one lol, why?
PHP and security don't go together lol
Xd
It shouldnt be really secure because its only for saving my license panel secure from other people
Not sure why exactly, probably just didnt wnt the hassle of maintaining it
What?
jcenter/bintray are already down
Wait, no
in 4 days or something they will be
anyway, they can be considered dead already
F
Not bloody likely
lmao
only 21 memes smh
man he really looks similar to the guy in the right side meme
I love TypeScript ๐
indentation() calls the function, indentation prints the entire function's code ๐
yoooooo
paper supports full rgb text on console???
if the terminal supports it that is lol
Yeah, since 1.16.5
I thought it would've downsampled or something
Meanwhile Spigot
Forgot what variables like int double long etc. is called?
Primar variables or something like that
primitives
Ah yeah ty
Numbers
the prime directive
prime ministers
Peoples, opinions so far?
I hate frontend
The design is cool, but idk how much time people are going to spend on a site where all the buttons say Lorem Ipsum
True good point
other than that though, its great
whilst the discord image on the corner is technically vertically aligned, I would drag it down a bit more, it feels (at least to me) it's a bit too high
There was an xss vuln in discord last year apparently with an embed or something
mmm keep the json
spices it up
agreed
Ofc
Anyone knows why discord pixelates my pfp
Tried Kotlin react again today, it's gotten much better, it now allows functional react ๐
Though still kinda unstable
val Home = fc<RProps> { h2 { +"Home" } }
fun main() {
switch {
route("/", component = Home)
}
}
Basically using functions as components instead of just classes
That wasn't a thing before
ah
Home ๐คจ
Was excited to try it again, but
route("/test", component = Test) // Doesn't work
route("/", component = Home) // Works
Basic routing wasn't working correctly
Try it in the reverse order matt
It's a react convention, components should always be PascalCase, even if variable
It was the other way around first, didn't work so I searched someone said to reverse, and didn't work either
Seems to be a bug with the current version
ah
The versioning is great right now ๐ฅฒ
1.0.0-pre.221-kotlin-1.5.21
๐ฅฒ
I'll be stuck with stupid TS for now ๐ฉ
Do you want to drop support for older Gradle versions? If so sure ;o
I forgot to test it ๐ฌ
oh wait what
welp
I only tested on gradle 7, so thats probably why I didnt run into any issues
Yeah, it updates shadow to 7 as well, which depends on gradle 7, so no matter what if we update it'll be gradle 7 only
I don't really mind but just to keep it in mind
I remember it not working with older shadow version after updating, but i could be wrong I'll test again
alrighty
lol i just put debugs on my code and the issue was that I didn't save the code ๐
rookie mistake. i, personally, for one, have never done that, ever, personally
Can someone help me? The Server was not working... It's always automatically shutdown
send startup log
=paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
do you know what java version you are using
Nope
I have to download Java 8?
are you hosting the server yourself or through a hosting company
Myself
run java --version and see what version you are using
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)```
Java 16?
java 8 for 1.8
ye i couldn't remember if it was 11 or not, but i guess not
I think you can use Java 11 if you disable use-something-transport in server prop but I had issues w some plugins
Yeah Java 8 for 1.8
or idk if it just fork I use support xd
oh xd
[11:49:44 INFO]: Disconnecting com.mojang.authlib.GameProfile@7124762d[id=0c2e0941-8a32-418d-9a80-5653769b98cd,name=SyntaxError01,properties={textures=[com.mojang.authlib.properties.Property@18315d8b]},legacy=false] (/0.0.0.0:0000): Took too long to log in
How to fix this? I cannot join
Get better internet
Bruh
Iโm not very good with licenses, with the Creative Commons Attribution Share Alike 4.0 International license am I able to fork the repo and reupload it on spigot? (It is abandoned and I want to continue it)
Is it possible to send packets via ProtocolLib inside a thread?
Ok, so I can but I have to put credits and a link to the original license
and indicate if changes were made
, yes
Ok
Hi, I try to create an Android application using java, with the objective to deploy an APK for Android 8.0.0 (API level 24) or lower.
As long I am in the API level 31, everything is fine. But if I try to put the API level 24, I got these messages in my IDE on almost every findViewById methods calls. Does anybody knows ?
Ambiguous method call. Both findViewById (int) in AppCompatActivity and findViewById (int) in Activity match
yo
Really a maze?
yes
It's got no entrance and exit
its not finished but it will select a start point somewhere at the top
and and end point at the bottom
the end point will have a portal
@ocean quartz I have been told that you know how to create custom gradle plugins and how to use the gradle api. Can you help me?
Also yeah rather just ask your question btw (:
my issue is that a load of functions that i am using have been deprecated in 7.1.1 and are going to be removed in 8.0
and I don't know what classes im supposed to replace them with
since the docs are very vague
And the function is?
One of them is the ConfigureUtil c;ass
and also conventions are deprecated. How do I get sourcesets? I am trying to create a sources jar task
Can you give some examples? This is still pretty vague
For the second one, I am trying to create a task that simply creates a sources jar. Currently i am doing this
task.from(p.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().getByName("main").getAllJava());
but getConvention and getSourceSets are deprecated (p is an instance of Project)
For the first one, I am using ConfigureUtil.configure to the data from a groovy closure (configured in build.gradle) into a java object
So basically, how do i create a custom closure in build.gradle and then get the data out of it?
And, how do I create a sources jar task?
I am writing this in java (not kotlin or groovy)
Never done it in Java, so never really used any of this
All I can tell is that the deprecated message just say to use extensions instead
ok
imagine writing a Gradle plugin in Java though
I say either write it in Groovy or write it in Kotlin
@old wyvern Alright seems like it's fine to merge the PR, I tested and doesn't seem to break old versions, that's because it still depends on the older Shadow, since I couldn't find the repo for 7.0.0
@jovial warren Its just im more familiar with java. Thought it would be easier...
but most of the time i ended up just looking at groovy/kotlin solutions and converting them to java
or find something similar in java
Writing gradle plugin in Clojure do be superior 
Spaces
spaces it is then
tabs
๐ฆ
Ctrl alt l
oh wait what
com.github.jengelman.gradle.plugins:shadow:7.0.0 doesn't seem to be a thing on the gradle portal, so the internal dependency is still using 6.1.0, though that shouldn't be an issue
can you have too much stuff in a switch ?
this was working
then I added witherskeleton
and it stopped
jesus christ
dude just store the enum of mob
you're just converting it for no reason
how
where are you using mobKill?
oh my god
lol
you should make the name of those i18n strings the name of the mod type
then you could collapse all of those lines into a single one
Is it possible to create a waterwalker like enchant, but instead of water it's lava and ice - obsidian or something?
String mobKill = HexUtil.chat(this.plugin.getDeathMessagesYml().getString("Killed_By_" + entity.getType()));
oh my god
please do what I just said
and don't capitalize the first letter of variable names
The capitalization makes it twice as worse
So replace all those lines
rename your strings to be Killed_By_<ENUM NAME>
then replace all of that switch and those definitions with that one line I just sent above
yea I don't really know how to replace all those things
with that one line
it's per mob message
literally exactly what I juts said
you can use the name of the enum to determine which string and get it programatically
Well you're in a quite a situation
String ThornsKill = HexUtil.chat(this.plugin.getDeathMessagesyml().getString("Killed_By_<ENUM NAME>"));
all you're doing is arbitrarily mapping the enum name to a different name
like that
uh no
Like this
or do ```java
getString("killed-by-" + mobType.getName().toLowerCase())
you would replace <ENUM NAME> with the enum name
Well he will have to re-do all of the config file as well
that is much easier and well worth it
find & replace ๐
I dont think he understands well what you're saying, specifically enums
this is the config
okay so see how you have a switch statement
and you are mapping to the values of entity.getType()
For your own sanity, use lowercase config options

what the point of hard coding every mob type?
Just do like:
YourMessageManager#getKillMessage
Params: EntityType
so that you won't have to do Killed_By_ENDERMAN
"killed-by-${type.name.lowercase()}" ๐
๐
You can edit your config to be something like that:
killed-by:
zombie: ...
creeper: ...
...
and do like:
getString("kill-message." + mobType.getName());
๐ฎ 
lol u and max_wainer big brain
too much information
i mean you're just moving it into a method lol
ye
and I don't understand it anymore
that's it
String mobKill = HexUtil.chat(this.plugin.getDeathMessagesYml().getString("Killed_By_" + entity.getType()));
where do you put this
Instead of your massive switch statement
I think you need to learn more about OOP first
Cannot resolve method 'getDeathMessagesYml' in 'WonderChat'
And I oop
i dunno i just glanced at it
getDeathMessagesyml
unless you added Messagesyml as a word
so much for consistency yikes
With that many of them you should probably use an extension function
if (projectile.getType() == EntityType.SPLASH_POTION && tirador instanceof org.bukkit.entity.Witch && damageCause == EntityDamageEvent.DamageCause.MAGIC)/* Witch throws splash potion*/ {
e.setDeathMessage(WitchKill.replace("%player_name%", player.getName()));
} else if (projectile.getType() == EntityType.ARROW && tirador instanceof Skeleton) {
e.setDeathMessage(SkeletonBow.replace("%player_name%", player.getName()));
} else if (projectile.getType() == EntityType.FIREBALL && tirador.getType() == EntityType.GHAST)/* Ghost fireball*/ {
e.setDeathMessage(GhastKill.replace("%player_name%", player.getName()));
} else if (projectile.getType() == EntityType.SMALL_FIREBALL && tirador.getType() == EntityType.BLAZE)/* Blaze Fireball*/ {
e.setDeathMessage(BlazeBallKill.replace("%player_name%", player.getName()));
} else if (projectile.getType() == EntityType.WITHER_SKULL && tirador.getType() == EntityType.WITHER)/* Wither throws his head*/ {
e.setDeathMessage(WitherKill.replace("%player_name%", player.getName()));
O
what do I do about this ?
Not to be rude or anything, but you need to watch some more tutorials on plugin coding and object oriented programming as well
๐ฅฒ
Some of it
nO
constants are LIKE_THIS
No.
this is basic use of a programming language to solve a talk programatically
well in c# constants are LikeThis ๐
Lmao, do you want or learn or devolve, that's what plugin tutorials do to you
devolve?
Why not "cONSANT"?
Constants are always written in the code, never as a variable.
๐
i hate c# naming conventions so much
i got used to it though
I don't understand anymore
i just hate it
man this guy could really benefit from pattern matching instanceof too
Reverse evolution
someone just rewrite this guy's entire plugin
oh
Reverse Ratatouille?
I would if I had time
Yes
Ratatรถing
so Should I remove all my strings or what
yes
you already have the name of the entity
just use that to index your config strings
No one likes C#'s conventions
๐ i setup Rider to use java brace newline convention thingys
The ones that say they do, are liars
yo what in the fuck
how is that somehow worse than allman
xD
jesus christ by who
Arrow at it's finest
๐คฃ
Recommended by who?
if (projectile.getType() == EntityType.ARROW) {
e.setDeathMessage(PvPBow.replace("%player_name%", player.getName()).replace("%killer_name%", killer.getName()));```
What do I do about these things then ?
ยฏ_(ใ)_/ยฏ
Shot them dead
String arrowKill = blalalala.getString("Killed_By_Arrow"))'
well you wouldn't have a separate string for each kill anymore
you'd only have one and that would be whichever one you got from the config
Nice
please give me an example
} else if (projectile.getType() == EntityType.WITHER_SKULL && tirador.getType() == EntityType.WITHER)/* Wither throws his head*/ {
e.setDeathMessage(mobKill.replace("%player_name%", player.getName()));
is this correct ?
.
so then you can just do like java e.setDeathMessage(mobKill.replace("%player_name%", player.getName()).replace("%killer_name%", killer.getName()));
Oh shit webstorm is on 2021.2 ๐ฎ
ooh
๐ค
thats nice
i still prefer the 2020 though ๐
2019 best
it's certainly better than 2021.1
lol
rip i didn't code back then 
๐ฎ
woah those were sick actually
I like the modern one more
So long ago ๐ฆ
IJ 2021.2 is very nice too
also are utimate and community ones different? iirc the 2020.latest were different - ultimate had some purple in it
Yes
This still doesn't prop out the message
splash art 
community
definitely ultimate
ultimate, by a small margin
but i also hate 2021.1
both are ugly
lol
What is up my fellow humans
Pain
Suffering
reminds me of that one person that keeps saying something like "What's up simps"
good good
Peaches would never call us simps
lol
Beautiful
oh yeah that's the good stuff
@cinder flare THEY MADE IT UGLY AGAIN
WHAT
IT LOOKED SO GOOD BEFORE
Vscode java devs where you at 
IKR
said litrally no one ever
Still trying to set up the environment
Is that still EAP?
Yeah
matt do you have jetbrains rider installed
Nay
I tried java on vscode but it just doesn't feel good as IJ
Well vscode isn't an IDE
visual studio or rider?
wtf is that even a question
the only people using visual studio are people that have microsoft's gun down their throat
i literally don't know a single person who uses normal visual studio
vsc is okay tho
you do realize there's a difference between visual studio and visual studio code right
yes
Rider is new
what class? C/C++?
C#?
https://i.imgur.com/X0drVB8.png this is Visual Studio, right?
C#
i am so sorry for your loss
Still used vscode at home though
oh vsc isn't bad at all
i was watching a unity beginner tutorial and they used an interesting theme:
for me, vsc just doesn't really have a place
embed didn't work โน๏ธ
i'm either using all-out IntelliJ or similar, or I'm using vim/emacs
i guess discord didn't like me posting light mode version of vs
Idk, it's good for js/ts/py
WebStorm/PyCharm
Rider was fully released in 2019/2020 iirc, ofc you won't have many using it
or like, vim/emacs lol
oh
so rider > vs?

Shift + ZZ
by a long shot
๐ ok
Dkim, what do you prefer IJ or VS?
I've never used VS before
keep it that way
^^^
visual studio = ๐๏ธ
For C we could only use nano + gcc or npp via ftp 
Geany ๐คก
my uni doesn't give a crap
the prof uses notepad++ for pete sake
but you better believe I'm using CLion and IJ
Because, they are all ass
The only class we could use a normal IDE was data structures
Thats IJ
actually, quite the opposite
We used Geany for C in school, what a nightmare
it's very bad to give noobies an IDE since it just does a million things for them and they don't actually learn anything
And Netbeans for Java ๐คก
Netbeans ๐ฉ
lmao wut
that's why my intro to java class used notepad++ for most people, since they had never programmed before and they needed to suffer through dealing with exceptions and everything by looking at the javac output lol
wdym "wut", it really is
if your IDE autocompletes everything for you, you won't understand what it's doing
They told us to use netbeans for php, I couldn't bear it
Had to download phpstorm
As someone who had to suffer through three into to java classes, I can definitely say I am not wrong
I mean you are
We started coding on paper before moving to PC for a similar reason
one in high school, then two in uni
required courses in uni
see that's a little extreme
autocomplete doesnt mean u dont understand what its doing
it's way harder to figure out what you did wrong
Compile-time langs without a error checking before compilation 
have you looked at any beginner programmers
they definitely do not know what's going on
obviously
And their IDE doing things for them does not help
it helps you memorize and understand the code instead of letting ur ide generate it for you
back in my day i had to punch holes in cards and feed them into a machine, took 180 hours to run a hello world
lol
Lmao
xD
then when u drop the cards u wana kys
dunno what I did but it got fixed https://paste.helpch.at/alenowiqim.js
Well, funny story
In my university back like 4 or 5 years ago, they had to write code on paper for C#
oh my dear god why
somebody rewrite this guy's code please
UUhm I didn't know how to do your thing
unless ur using code piolet the most your ide will generate for you is auto suggesting a few syntax keywords
and the message was still the default one
getters, setters, constructors, entire class files?
๐คจ iirc eclipse will generate the main method, intellij can generate getters/setters, constructors, encapsulation, etc
it's a problem when the test is literally about making those things yourself
ye what noob is going to know about oop, they will start with functions and basic variables
hmm but those nature deaths don't popup anymore
when the test is about OOP
BlueJ ftw ๐
Really wish I was on my pc rn to help you out bud
I love this code
its amazing
๐ณ
ah it all makes sense
He could also ask in the support channel instead
I think so too
.
or just go back to the youtube tutorials lmao
youtube tutorials are what caused that code
Not all of them are bad
no they're all bad
yeah i have yet to see a single good one
Yo @prisma wave
ayyy I want more BM videos
I mean, to learn the basics
But when it comes to refactoring and writing clean and readable code, then, I guess, not a place to learn
Learning the basics wrong won't help you much
helpchatโข๏ธ is the place to learn
helpchat just says ?learn-java ๐
u removed the other thing
i removed a faq a while ago
I think you removed asktoask
there's only so much we can help with when you don't understand what a variable is
A what?
no isn't that just ?help?
I know what variable is
No
but I dont understnad what to do with one freaking line
developer denโข๏ธ ๐
i wasn't referring to you lmao
your problem is just a little higher-level than that
Well, basically you're using 40 lines for a thing that requires 1 or 2
^
yea I know
But I don't know how to fix that
It was already answered
oh
You dont need the switch there, you get the entity name or type from e.getEntity().getType() or smt, when you plop it into a variable to get the message you need from config
okey then, step 1 is removing the switch
.
with that line he just replied to
yea
then remove all those strings
Now I have this
but then this thing won't get Killed_By_ZombieVillager
because it isn't Zombie_Villager ?
Well, you can edit the returned value
entity.getType().name() or .toString() . replace ("_", "")
Edit your config so it's all lowercase
Or do what I said earlier
String mobKill = HexUtil.chat(this.plugin.getDeathMessagesyml().getString("Killed_By_" + entity.getType().name()));
e.setDeathMessage(mobKill.replace("%player_name%", player.getName()));
killed-by:
zombie: ...
creeper: ...
Yes
You would need to change your getString as well then
Do as you wish, but I'm just giving you a simpler way to do it
this would be Killed_By_ZOMBIE
If it returns capital letters, you can do tolowercase or smt
then it'd be Killed_By_zombie ๐
Because your config doesn't match the string
Most likely
Well, if I'll have the energy, I'll be back on my computer in abt 4 or 5 hours
DM me if you will still need help
๐ฉ
so I changed all those mobs to upper cases
Can I do the same with the natural deaths like lava etc
yes
getting a message from that config should be a single line
no matter which cause
Killed_By_WITCH: '&e%player_name% &fHas been killed by &eWitch'
Killed_By_WITHER: '&e%player_name% &fHas been killed by &eWither'
Killed_By_WITHER_SKELETON: '&e%player_name% &fHas been killed by &eWither'
Killed_By_WOLF: '&e%player_name% &fHas been killed by &eWolf'
Killed_By_ZOGLIN: '&e%player_name% &fHas been killed by &eZoglin'
Killed_By_ZOMBIE: '&e%player_name% &fHas been killed by &eZombie'
Killed_By_ZOMBIE_VILLAGER: '&e%player_name% &fHas been killed by &eZombie Villager'
this should work ?
String natureKill = HexUtil.chat(this.plugin.getDeathMessagesyml().getString("Killed_By_" + damageCause));
e.setDeathMessage(natureKill.replace("%player_name%", player.getName()));
or this
Well, you should first know what "damageCause" is
it's LAVA etcc
Time to learn about debugging
if (damageCause == EntityDamageEvent.DamageCause.ENTITY_ATTACK) {
String mobKill = HexUtil.chat(this.plugin.getDeathMessagesyml().getString("Killed_By_" + entity.getType().name()));
e.setDeathMessage(mobKill.replace("%player_name%", player.getName()));
yea that fixed that issue
storing UUIDs is like the most annoying thing every
500 Bukkit.getPlayer() != null checks
but
no alternative
weak identity concurrent hash map (;
๐ฅด
Cute dog, conclure <3
this is why Guava exists lol


Do you guys think itโs okay to abstract certain elements in an API into your API so the user doesnโt have to directly use the hidden API and use yours
In other words, create an interface for existing API that is being used in your API and then allow the behavior of whatever class is implementing that interface to be similar to the api class whatever you are using
Idk if you guys understood that lol
sure
That is the point of OOP after all
Encapsulation and layers of abstraction
True
mhm
if you make something significantly easier to use, I would say that is definitely worth abstracting
yugi had to ruin it
๐
public
@prisma wave btw bm can you get the wiki thing to parse the url encodings properly?
Like for space = %20 and < = %30 (i think)
I was using it to see if embeds could be exploited in a few places ๐ฅฒ
๐
Uuhm people, i was learning java via solo learn but that doesn't really help me with mc coding
Any other tips
Dunoo
Did you take the entire Java course on SoloLearn?
How?
Yes
Yes
the issue with sololearn (and a lot of other courses) is that it doesn't really review what you learned, and the quizzes are usually simple, and once you finish the quiz you don't really go back to it.. then forgetting it..
Who wants to document my code? ๐
pay me
Review what you learned?
Wym
Also itโs kinda your own responsibility to repeat what youโve just learned to put it in the long term memory
A course canโt do that for you
I recommend pluralsight if you wanna give it a try, but you would only get a 1 month trial
Question, are github packages shit compatible with kotlin?
Yea why not
Alright
Its kinda shit tho
i use it and it works fine
You need to authenticate to use any libraries
Last time I tried to setup a package it wasnt accepting the javadocs
You also have to auth for it, don't you?
yea
F
Yeah that's what I thought.
๐ฅฒ
Man I dislike the format of gradle and kt docs
:))
You will need to ask on the slack for pretty much anything more than declaring extensions or something
Which format? ;o
How docs are structured, gradle in special
Oh
I love kdocs though, I hate that Java requires param, return, etc
Do we have an answer about why is the groovy integration si poorly done?
Everything compiles, but the ide shows errors every fucking where
Sounds like gradle
Cuz jetbrains makes the kts version so they can't let groovy be good kek
Fuck that lol
well, true, but courses can occasionally give a review quiz and then recommend courses based on the answers on the quiz
ยฏ_(ใ)_/ยฏ


