#dev-general
1 messages ยท Page 158 of 1
Damn KM
isn't it great?
sec restarting IJ
making brackets rainbow 
You disgust me with that white theme Johnny
the clojure is hot tho
Which font do you use again BM? I forgot the name
Jetbrains Mono
๐ฎ
Is that the same Sx used? I think i used the same as him hmm
Yeah pretty sure it is
It was most bold i think
it's the default intellij one
But it's not actualy rainbow tho :((
I used to use Jetbrains Mono Medium
Also only 5 colors, sad
pretty sure you can add more
This is a great guide to being productive
Spend half your time making your IDE rainbow
if it looks pretty then it must be productive
how do i get rainbow intellij
then uhhh
Bet this is just for XP
Hmm font seems the same but it was definitely more bold
it is
I literally think of xp before I send messages
Someone should make a plugin to make everything rainbow
Im about 300xp away from #4 so I'm trying to write very long and elaborate sentences
it is
I'm like 300xp away from posting imges
@hot hull that small example was a single exception since most of the time I'm using very long sentences ๐
hot
thank you for pointing it out though, you made a very compelling point and I can see that you are attentive enough to notice my brief moment of hypocrisy
making a full rainbow plugin shouldn't be too hard
now give me xp
https://img.bristermitten.me/idea64_f1077QxFPn.png hot
bm is that atom one dark (with rainbow brackets or whatever)
I am unable to can
That string color is hidious tho
@surreal quarry yes! that is the theme made by GitHub for their Atom Editor (built with electron) that has come to be known as "Atom One Dark"
I use it in conjunction with / alongside the IntelliJ IDEA plugin known as "Rainbow Brackets" for a very pretty (in my opinion because of course this is all subjective) look in my coding workspace
@ocean quartz oh yeah Fira is pretty similar to JB mono
You can extend your phrases by typing in letters the exact same way as you would if you type a full essay.
If it looks great, it must work great 
Doesn't seem to have the retina option anymore
Just write really long sentences into your clipboard and then proceed to spam the following key shortcuts: CTRL + C; CTRL + V
Java bad, Rust bad, C++ bad, ruby bad, python bad, JavaScript bad, Haskell bad, Fortran bad, PHP bad, assembly bad, Odin absolute horseshit, C bad, Go bad, V bad, Dart bad, Swift bad, Objective-C bad, XML bad, Groovy bad, Scala bad, Clojure bad, Lisp bad, COBOL bad, html bad, typescript bad, yaml bad, coffeescript bad, skript bad, C# bad, skript bad
kotlin good
that's gotta do it
right?
Can an interface have an init block in Kotlin?
no
Clojure bad
wait
Clojure bad
sheesh
clojure bad
im surprised
Got it back to retina nice
that makes no sense, it's an interface
Kotlin bad VBScript good
it can't have a constructor
a tragic loss
257 xp away
You mean: Oh my! A tragedy just came upon me. I am two hundred fifty seven experience points away from reaching redemption in the form of a new level rank
@surreal quarry it was an outdated copypasta that does not reflect my current views
that makes no sense, it's an interface
@prisma wave Maybe you got an idea of how to do this then:
Jaims it was an outdated copypasta that does not reflect my current views
excuses excuses
You mean: Oh my! A tragedy just came upon me. I am two hundred fifty seven experience points away from reaching redemption in the form of a new level rank
I do! Just to show how much I mean that, I'll copy exactly what you said!
Oh my! A tragedy just came upon me. I am two hundred fifty seven experience points away from reaching redemption in the form of a new level rank
Valid excuses
times change
People change, people change
blocky i assure you he has an idea. he would love to give you a very long and detailed explanation of it too
interface Rank : Identifiable {
val name: String
init {
ranks[name] = this
}
companion object : Unique<IMPL_Rank, String> {
private val ranks = mapOf<String, Rank>()
override fun get(id: String): IMPL_Rank? {
}
}
}
the init block here is invalid
You're not the guy I used to know.
https://static.macmillan.com/static/holt/famous-people/
My book, Famous People, is out now!
Oh my! A huge tragedy just came upon me. I am one hundred and seventy experience points away from reaching redemption in the new form of a new level rank which provides me with permission to send images on other text channels such as this current one.
interface Rank : Identifiable {
val name: String
init {
ranks[name] = this
}
companion object : Unique<IMPL_Rank, String> {
private val ranks = mapOf<String, Rank>()
override fun get(id: String): IMPL_Rank? {
}
}
}
@empty flint I see your problem, and just to make sure that I've fully understood it I'm going to quote it
๐
Oh excuse me the companion object should be:
companion object : Unique<Rank, String> {
private val ranks = mapOf<String, Rank>()
override fun get(id: String): Rank? {
}
}
Oh excuse me the companion object should be:
companion object : Unique<Rank, String> {
private val ranks = mapOf<String, Rank>()override fun get(id: String): Rank? { } }
@empty flint easy mistake to make. as far as I know there's no way of putting a constructor in an interface (it doesn't really make sense anyway)
@empty flint I see your problem, and just to make sure that I've fully understood it I'm going to quote it
@prisma wave So I want the interface's companion object to keep track of each object that is created
@lunar cypress Damn that brought me back a few years, I remember his Potion Seller video
best recommendation would be to use an abstract class instead of an interface
yes
they do have the language feature in the kotlin language that's known as an "init block" because it uses the keyword init along with a section of code known as a "block" enclosed in curly brackets
:)
Damn potions now stack to 16 ๐ฎ
finally
Oh my! A huge tragedy just came upon me. I am one hundred and sixty six experience points away from reaching redemption in the new form of a new level rank which provides me with permission to send images on other text channels such as this current one.
Takes forever to get xp
Do code blocks count for xp?
Oh my! A huge tragedy just came upon me. I am one hundred and sixty six experience points away from reaching redemption in the new form of a new level rank which provides me with permission to send images on other text channels such as this current one.
@quiet sierra
Takes forever to get xp
@quiet sierra
Do code blocks count for xp?
@quiet sierra
I'm sorry to say that I don't know! But I've noticed that the closer you get to something significant, it always takes longer to gain xp, which frankly I find to be very distressing and upsetting
yay for 3 pings
Barry is open source
no he isn't?
Pretty sure he is
rly?
He isn't
oof the github repo just has some json files
I'm a unique Discord bot created especially for HelpChat.
I was created and I'm maintained by @pallid gale with support from the Admin team.
I'm created in Javascript using Discord.JS
At this stage I'm closed source due being a mess and some secret internals. However you can contribute to my links/version knowledge here.
there we go
so it is closed hehe
65 xp away from #4
Give me xp daddy
this is getting really quite infuriating now! I'm gonna write one final indignant paragraph just to show how frustrated I am!
I am getting Leaking 'this' in constructor of non-final class Rank warning in IntelliJ when assigning a value to this in the init block. Is there a better way to do this?
abstract class Rank : Identifiable {
abstract val name: String
init {
if(ranks.containsKey(name)) {
throw IllegalArgumentException("A rank with name $name already exists!")
}
ranks[name] = this
}
companion object : Unique<Rank, String> {
private val ranks = mutableMapOf<String, Rank>()
override fun get(id: String): Rank? {
return ranks[id]
}
}
}
ranks[name] = this is the culprit
How does this look? The class name
kinda feel like it doesn't fit
@hot hull Your cyan was too bright
Ooh i found one i like
What do you mean inconsistency there? Like red with blue, purple and green?
well the sort of Teal for types but then blue for a constructor
True, let me try making the constructor slightly teal too
Though it's normally even worse, since constructor was blue and type yellow
where can i change those colors?
Code style
nice
@empty flint Still want it?
Also question boys, final @NotNull Type or @NotNull final Type? 
gotta love default color stuff:
http://images.virtusdevelops.eu/shareX/e3jprowl.png
@NotNull final
@empty flint Still want it?
@ocean quartz Yes
Give it to me baby
Ah-ha! Ah-ha!
Give it to me baby
Ah-ha! Ah-ha!
Might anyone have any idea where I've gone wrong?
main: https://paste.helpch.at/juwukawodi.java
Error: https://paste.helpch.at/vapekabamu.pl
ty
file structure:
Packages Mackenzie ๐ญ
you're welcome frosty
And "Main" ๐ญ
since org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 2
Not trying to be mean Mackenzie but what the hell is this? (Main.instance = this).createFiles();
@ocean quartz This will answer your question (read comments) https://paste.helpch.at/iluwepabut.shell
Also @hot hull ^ that's the config.yml
that's a work of art is what that is
bungee.yml: https://paste.helpch.at/fayaxacagu.http
hm the config is valid anyhow
yes
Can you have spaces without a "" ?
@hot hull yes
Only thing that would actually stand out for the input error
I tried without the fancy characters, and it still had the same error
Also why Mackenzie :((
public static Main instance;
public static Configuration cg;
blame bmsg
The what now?
@lavish notch did you make sure to save your file with utf-8 encoding?
ยฏ_(ใ)_/ยฏ
sexy
its quite bright
Save the config.yml file with utf-8 encoding and try again
Would be nicer with a better font ;p
how do you change colors and font in IIJ?
How do I save it with utf-8 encoding in intellij?
No_Permission: '&4&lHelpOp &cยป &fYou do not have permission!' has the utf-8 char ยป
@static zealot Settings > Editor, then you have color scheme and font
any recos?
Comic Sans best font
Fira Code Medium is the best
How do I save it with utf-8 encoding in intellij?
@lavish notch Google it, idk by heart.
I'm legit not seeing a difference Matt
ty matt
I use SublimeText 3 to edit my yml
What do you mean Frosty?
Do I have to restart IJ?
Does this throw a cast exception if the cast fails?
attributes[name] as Attribute<T>? or does it return null because Attribute<T>?
Do I have to use attributes[name] as? Attribute<T>? ?
@hot hull Oh you might be editing the wrong place, there is two places with font, editor and colorscheme font
@empty flint it will ClassCastException
a bit easier to read isnt so bright
http://images.virtusdevelops.eu/shareX/lzk09jmc.png
Ah I see, Color Scheme one is taking over for some reason
Hell yeah, whoever guesses it get's an aplaud
?
(The font)
no
idk
ok I'm dumb can't even find the settings in IIJ xD
File > Settings
@prisma wave Is there a way to get the type parameter name from an unknown?
Attribute<*>?
like print the class that * actually has
I know ๐ฆ
oh man I'm so bad with color schemes
Quick question boys, how do you set a target jar name with gradle? (As in what the built jar is called)
You building with shadowJar?
Yessir
And what do I use for version?
wym
nvm
when you by mistake shade in spigot
how does one shade spigot by accident 
By being a 4head
cuz dependency hell
@prisma wave how do I invoke the super's secondary constructor from the child's secondary constructor?
oh isnt it meant to be
spigot-api?
It isnt building like before, before I had the free ultimate trial on Intellij but now it wont build
and whats the error?
giving us a build script doesnt really help if we dont know what the issue is
the issue is also in the paste
o
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_261 contains a valid JDK installation.
do u have the jdk installed and is set on the project?
first is on click second is on click of isnt it?
on click isn't a thing
interact event triggers for left and right hands separately
its PlayerInteractEvent
ye
but when you like click on block its interact stuff right but it still triggers twice
What are you on about cod
well I switched from 1.8 to 1.16
interesting
I'm messing around with some stuff for my new server
Represents an event that is called when a player interacts with an object or air, potentially fired once for each hand. The hand can be determined using getHand().
you will find the 1.16 api to be far superior
it gives same item both times.
and not PlayerInventory#getItemInMainHand
for me.
xD
idk why it gives same item both times if its for 2 different hands??
@empty flint its like
class something(private val example: Example) {
constructor(whatever: Whatever) : this(whatever)
}```
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_261 contains a valid JDK installation.
How do i import new jdk @onyx loom
aikars command framework?
Ye
I use luckos
Link
matt rn: 
Nah lol
Matt don care
Can Anyone please help me with my issue
https://discordapp.com/channels/164280494874165248/695431668944732270/743887675177828372
wrong channel
I installed the JDK
oh right yea
dude I have a freaking jdk installed
use the JDK, not the JRE in ur project
That's an option
you have to specify as well
howww
project settings probs
file > project settings
isn't it project structure
You might have to specify it to gradle otherwise or smtng
yeah
Yeah its there
can you send that again but like not so blurry and zoomed out lol
its a screenshot tho xd
nvm i opened the link an can sorta see it there
probably 14
since thats your most up to date one
jre1.8.0_261
check if you have same version
or edit project jdk
you can specify path and everything
java -version java version "1.8.0_261" Java(TM) SE Runtime Environment (build 1.8.0_261-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode)
uh
I fixed it
so basically I had 1.8.251
as A jdk
and somehow my 261 got removed
so I downloaded it again and now it works fine
ew
val spawner = event.blockReplacedState as CreatureSpawner > CreatureSpawner spawner = (CreatureSpawner) event.getBlockReplacedState();
kotlin good
what is CraftBlockState
the implementation of BlockState
But how would I get CreatureSpawner then
how can i do
Bukkit#getOnlinePlayers#streamtocollectionofnames?
List<String> collect = Bukkit.getOnlinePlayers().stream().map(HumanEntity::getName).collect(Collectors.toList());
What then
omg i forgot toList at end.
and i was like
why da fak its not working
return Bukkit.getOnlinePlayers().stream().map{ player -> player.name}.toList()
why=
return Bukkit.getOnlinePlayers().stream().map{ player -> player.name}.toList()
@dusky drum .map { HumanEntity::getName } instead?
then the .collect part is redundant in kotlin afaik
doesnt intellij have an option to convert it to kotlin
ah
idk im stupid lol
yes
okay
Bukkit.getOnlinePlayers().map { it.name }```
what ta frik is it :?
Default variable name for lambda
IT
TISTO
Tiho
Potato
I need a good movie to watch
No
Part 1 of a presentation by Rich Hickey to the NYC Java Study Group. A gentle introduction to Clojure, part 1 focuses on reader syntax, core data structures, code-as-data, evaluation, special operators, functions, macros and sequences. No prior exposure to Lisp is presumed.
๐
oh god
is creating my own perm plugin a good or bad idea?
just use LuckPerms
pretty much bad idea if you ask me since you already have good options for free
that ^
only me? but listening to star wars music while attempting to code is very comfortable and convenient
oww
lol
yes yes
gotta love that
your picture remembers me about that sunguuuuuda member "pupper"
wth
yep
oh lol
why though
ask support i guess
controversial
ye
Hi ! I would like to know how to get a list of the first configurationsection key, like knight and recruit, but not their content. It needs to be done automatically, so i don't put their name inside my code.
recruit:
display: "&f[&aRECRUIT&f]"
starting-level: 1
maximum-level: 10
knight:
display: "&7[&3KNIGHT&7]"
required-class-level: 10
starting-level: 1
maximum-level: 20
FileConfiguration#getKeys(false)
or ^^
Seems like that was at top level ๐คท
i wasnt sure :3
yeah doesn't fileconfiguration inherits configurationsection or smtng anyways
idk
they have one interface in common iirc
woooo
thanks guys /o/
imagine using Listeners
?
wtf is this
a forked version of luckos antiboilerplate
or I mean I did fork it cuz dependencies was fucked up
hem
its alg now :p
gasper you're in kotlin, you can use extension functions for events
^
ล P?
@EventHandler
fun EventClass.onEvent() {
}```
eh
eh i'll stay like i am

running test server on shitti xeon vps with 2.3Ghz clocks
loll
well mine would too
yeah ig
i used to have Dedi machine (i7 6700, 64gb ram) running Pterodactyl panel
I still use my wifi
?
i guess that'd be it
or u could use ASF's listener module rather than Lucko's thing Conclure 
pretty hot
yeah how does that look
kotsu good
but we should make so ppl dont have to put their plugin instance all the time
True
well
else very neat
is that possible?
I have no classes that extend plugin tho 
imagine not using spiglin smh
whats that
some class needs to be plugin?
kotsu yeah but look at this https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/plugin/java/JavaPlugin.html#getProvidingPlugin(java.lang.Class)
declaration: package: org.bukkit.plugin.java, class: JavaPlugin
read the description
oh well if that'd work with java purely I'd probably try it out. not so experienced in kotlin rn
I have no classes that extend JavaPlugin tho Conclure
yes but someone will probably use it in their plugin?
how do you then enable the plugiN?
its not a plugin?
oh
I love that when I look up "lucko antiboilerplate" it gives me results about terrorism and google safe search complains lmao
no but the thing is like this. we just get a plugin reference from JavaPlugin.getProvidingPlugin and lets say you have a java plugin which you extend the javaplugin class. now you also shade in the lib to the plugin. the plugin will be like a host for each class it is loading.
I need to test that
so idm
haha
johnny oh its actually called helper
kotsu I think matt got rid of all the Plugin parameters and switched it to the providing thing
What so I can just have a blank "main" class that I don't actually use except for this kinda stuff, and it'll actually become the shading plugin's plugin instance?
no
but we can have a Utils class
nice one
with a static getter with the name like getHostingPlugin and that would call JavaPlugin.getProvidingPlugin(Utils.class)
Oh so like ASF.initialise(this) and use it as a sort of injector for obtaining a JavaPlugin instance?
and we wouldn't need any injection with the javaplugin
yeah johnny I mean I like it although I think there is a bug with some of the dependencies
btw if you guys know more spigot utils, libraries and tools please give my man @light leaf a hand and contribute to https://github.com/paul2708/spigot-plugin-resources
Add MF, MF-GUI, IAL, ASF here? ๐
add TaskChain, Commodore, Brigadier
lol

do feel free to make prs
i have no idea why this happens:
http://images.virtusdevelops.eu/shareX/6mniwqhr.gif
even tho i set block type to air in listener and i drop 1 seed, it still drops vanilla seed tho.
mabyeee tomorrow, I'll find my waayyyy to contribute
this guy gets a star
PDM MLM intensifies
@lunar cypress what would I categorize projects that essentially has stuff for commands, scheduling and all that stuff?
big utility collection
May fit into the framework category after adjusting the description and/or name
feel free to rearrange stuff
sure
Oh nice my command framework is there
gotta love this:
http://images.virtusdevelops.eu/shareX/2i90vkfx.png
org.bukkit.plugin.InvalidPluginException: Abnormal plugin type now this is a new one xD
and already figured it out xD
Who tf makes an abstract plugin
@prisma wave Can you think of a way to make this a one-liner?
var modified = "test string"
pairs.forEach { (f, s) -> modified.replace(f, s) }
return modified
dk why haven't worked on this project since last week and I kinda forgot
@empty flint not really in any way that won't significantly hinder the readability
although that code won't actually work
since replace() returns a new string
Would this work?
fun String.replace(vararg pairs: Pair<String, String>): String {
var modified = this
pairs.forEach { (f, s) -> modified = modified.replace(f, s) }
return modified
}
oh no I can't reassign this
How about now, @prisma wave
yeah still not really
I think you need a new variable
trying to make it a 1 liner would just make it an unreadable mess
or nah?
might work
replacements.fold(this) { result, (match, replacement) -> result.replace(match, replacement) }
Something like this
๐
trying to make it a 1 liner would just make it an unreadable mess
@prisma wave I don't need it readable, I need it compact
famous last words
I missed the free xp
@prisma wave
woah
๐ฎ
oh em gee
Introduce KotlinNothingValueException and throw it instead of NPE on expressions of type Nothing kotlin stay winning with the 0 NPEs 
huge
Added another 150Kb oh boy

I guess it's still really new
Yup 6 hours
Cause there's no post yet on the website for it nor is there an update in IJ yet.
Hopefully in the official update notes they will do a TL;DR of the changes.
yeah it looks good but a bit verbose
Happy they added the functional interfaces
This is more of a generic software architecture question but I'd like to know what the best way to implement this scenario would be:
If I have a class Person and a class Car, a Person can drive many cars and a car can be driven by many drivers. So persons can share the same car instance.
If I wanted to delete a car instance (for example if a person sells a car), every other driver of that car should get notified of that car's deletion, right.
Should I keep a list of Persons that use a car in the car class and before removing any static record of the car tell each person object to remove the car from their lists? How is such a circular dependency usually resolved?
Can a Person drive many cars at once?
@empty flint not necessarily
if the object becomes null you can handle it lazily whenever you need to
there's no point in doing calculations for stuff you don't even know if you'll need to access
You'd have a list of cars in your person object
when the car disappears the car object in that list (or set) will be null
you know that null means that value got removed
based on how many nulls there are, you know how many cars were removed, etc
Can a Person drive many cars at once?
@quiet sierra Well obviously not at the same time but they can own multiple cars or whatever
when the car disappears the car object in that list (or set) will be null
@unreal briar How do you make the object itself null for every other object that uses it?
Its possible to implement that yeah
Say if personA has a set of cars in a list: (car1, car2, car3)
personB is their spouse and doesn't like to drive car2 so their list looks like this (car1, car3)
car1, car2, car3 are 3 instances, so personA's car1 is also personB's car1 instance of Car. Car keeps track of all created cars statically via the companion object.
Now personA sells car3. personA can make its list looks like this (car1, car2, null) but personB's list will still look like (car1, car3) and the static list of all cars in the Car companion object will also look like (car1, car2, car3)
Why does that seem like a school project
The backend for that is doable
But you should do it yourself
I'm 25, school was a long time ago. I know it's doable. I'm asking HOW to do it the right way.
Why does that seem like a school project
@quiet sierra Because I simplified it so I didn't have to paste the 5 different classes this is actually relevant to in my project. Don't be so condescending...
blocky I mean
when a car switched driver, just get the older driver and remove the car from his list
Maybe have a variable inside Car that points to the driver Person
And a Person[] or a List<Person> that are the passengers
not a normal array
when a car switched driver, just get the older driver and remove the car from his list
@steel heart Not applicable. Imagine them both doing something with the car at the same time. Like one is cleaning it, the other is checking the tyre pressure or something.
Some sort of collection
Should I keep a list of Persons that use a car in the car class and before removing any static record of the car tell each person object to remove the car from their lists?
So this is a yes on my initial approach?
blocky so you want multiple owners at once?
@steel heart yes
you either have a set in your car or somesort of multimap and handle everything through one class
Another approach would be to have personA and personB only keep the serial number for their car. If they want to access a car instance, it has to happen via the serial number. if Car.get(serialNum) results in a null value, then the car has been deleted and they can delete the serial number.
Could be a hashcode ๐ค
Could be a hashcode ๐ค
@quiet sierra Doesn't have to be. in my case just a string id.
well I mean what is this for ?
@steel heart A parameter implementation that is shared between two classes where each class gets their own value for the same parameter and all the values are kept sorted at all times according to a priority list where the priority is determined by the class the value originated from.
So if one class decides to delete its parameter value and no other class uses that value, there is no need to keep an instance of the value-wrapper that points to a null value.
thus the fuckery begins
I think I will go with the id approach, I like that...
does anyone know how to delete a world using the multiverse api?
What would be the best way to implement custom messages/languages? My current system's file is way too big and messy, I need something that's really efficient as well because I have tons of messages in my plugin. Also need a way to customize menu items from the config.
md5 paste ??
still
I use enums right now but it seems like such a pain to write an enum and the config file, I would rather not use enums
well you have to write the paths or the strings somewhere
couldn't I load it in a hashmap as a key?
from the embedded file
I have over 200 messages rn ;-;
What would be the best way to implement custom messages/languages? My current system's file is way too big and messy, I need something that's really efficient as well because I have tons of messages in my plugin. Also need a way to customize menu items from the config.
@kindred crystal Resource Bundles. IntelliJ supports them in a very readable manner and you basically use them like the Enum that @steel heart has defined but it handles all the stuff internally. All you need is a locale to tell it which translations to use.
archy if you want, although seems unnecessary to me
imo enums are just fine for messages ๐คท
I'm gonna look into what @empty flint said because I kinda want to support multiple languages at the same time for different players
After a good amount of head banging, color finally carries over no matter how the format changes
Can I simplify these 2 methods into one?
fun autoRankup(value: Boolean?) = autoRankup.set(context, value)
fun autoRankup() = autoRankup.get(context)
yes
set a default for value
value: Boolean? = null
then like your method body will be something like
when (value) {
null -> autoRankup.get(context)
else -> autoRankup.set(context, value)
}```
what about if statement xd
๐
then like your method body will be something like
when (value) { null -> autoRankup.get(context) else -> autoRankup.set(context, value) }```
@surreal quarry Ah but then I cannot set the value to null which I need to be able to do...
Otherwise I would have to create another method to remove the value, which doesn't help me reduce the methods...
yea probably not then
Does anybody know of a sortedMap with a custom comaprator?
Where can I find a class used to create kotlin 
Looked on github but there's too many files ๐
Where can I find a class used to create kotlin
@distant sun How do you mean "used to create kotlin"? Convert Java to Kotlin or what?
Awesome my parser also colors actions correctly now!
nice, perfect screenshot, only cut a bit of it, gj me
niceee
neat
how would i loop through a List<String>?
for(String thing : list){
}
how would i create the list<string>?
I have an error and im tying to figure out what it is so im just double checking how to do these
List<String> list = new ArrayList<>();
ok ill try this now
Make sure you import both
UpperCamelCase
TIL PortalCreateEvent#getBlocks doesn't include the bottom obsidian blocks 
one of gian's things
How do you delete a resource on spigot again?
report it to staff
Ah yes, that dumb thing
it makes perfect sense
can't have snowflake developers deleting their widely used resource after they get a "fuck you" from a smooth brain kid
That seems like an edge case, but then again we're on about spigot sooo
yo how would I get to a level where I can code most level of plugins meaning like essentials orlike minions, or like custom enchants, skyblock, and plugins of such level without causing any lag in the shortest time. I also had a talk with some devs on me showing them a dev who won facebook hackercup (2nd place) and asking if he would be better than most devs. They all said it's more expeirence thing rather than skill what do you guys think?
I'm trying to generate a new world that's a certain size and guaranteed to have certain structures, example, stronghold and village. I just can't find anything on how to do this
Also what do you mean by Snowflake developer @quiet depot ?
expeirence thing rather than skill
@viscid charm they're not mutually exclusive, unless for some reason, you're incapable of learning from your experience. Once you get to a certain point skill wise, you can make absolutely anything (in that language), regardless of whether you've worked with the specific api, field, or whatever before. Takes quite a while though, lots of dedication
A very sensitive person. Someone who is easily hurt or offended by the statements or actions of others. This has nothing to do with politics. Snowflakes can be liberal or conservative. Whether it is a compliment or an insult is a matter of opinion and depends on the context.
Basically like a snowflake which melts under pressure is what I always thought Snowflake meant
yeah nah
but some people think snowflakes think they are special because a snowflake is never teh same
a snowflake is extremely sensitive, melts at the touch
at least I assume, i've never seen a real snowflake lol
so if your super thick skin your never a snowflake?
so by saying a person is a snowflake, it's saying they're the weakest possible form of a human
mentally*
Weakest in terms of what tho? Like being lazy or
isnt it just like, someone says ur codes bad and you get offended by it
yes, they could be considered snowflakes
and if you say that, they wont code you anything even if you pay them good
@quiet depot how long you think it will take me learn it so I can technically make anything with easy/no help in short time without looking shit up? (How long does it take for most people?)
^^^^
Medium sized plugins is what I meant
you still might find something that you'll have to look up
actually I think I was mistaken in my original statement
technically you could get to that level in a relatively short amount of time
the key difference is quality of code
^^
you could easily get to the point of creating anything, within a few months
hmm one of my devs when he gets the time to code me a plugin, he sometimes does it live in front of me, he doesn't look anything up tho. They are not huge plugins but its not like right click heal item
Within Few months? hmm I see
What about like NO Lag but Dogshit Quality code is that possible?
ah i just remembered still have to find good sql storage solution, now i just send remove/insert statements for each block broken/placed so if someone breaks 1 block 10000 times its gonna send 10000 statements (i update data every 5 mins). so im not sure if sending 10k statements is good.
im not realy the best with logic stuff
Is not
Did someone say snow 
yes
@quiet depot can I ever become better then some of my devs who have been coding for 5 years?
yes
Cus they will obviously keep coding, so wouldnt they always be better/
some people never attempt to improve
I've encountered quite a few of them
some are even oblivious
fun addCrop(crop: CropData, location: CropLocation){
if(crops[location.toString()] == null){
updated.add(UpdateData(crop, location, false))
crops[location.toString()] = crop
}
}
fun removeCrop(location: CropLocation){
val crop = crops[location.toString()]
if(crop != null) {
updated.add(UpdateData(crop, location, true))
crops.remove(location.toString())
}
}
basicly then i go thru list of updated and make sql statement for each updated entry.
You code outside MC ^?
ye
oh wat do u code?
Is not
@old wyvern y not?
I'm trying to generate a new world that's a certain size and guaranteed to have certain structures, example, stronghold and village. I just can't find anything on how to do this
#development justdoom
10000 statements together
o
didn't know u were replying to gasper
XDDD
i could make like check or something so it deleted previus entires or something, bu i have no idea how
my brain just doesnt have power to think how to.
oh wat do u code?
@viscid charm i dabble in lots of genres
games, web, desktop, server, api
server & api are probs my favourite
interesting
@quiet depot do you do it as a job or hobby ?
Quick question does System.out <- what is the dot doing?
Is it just searching 1 class, then the dot searchs for a class inside that class?
I do it as both
System is a class, out is a field (holding an instance of PrintStream iirc)
^
@viscid charm
But i mean like what does the . <- mean
the dot itself what does it mean
does the dot mean like GO inside?
. Means to access a property inside the thing on the left
just properties, not everything in a class is retained at runtime
properties = fields, methods, subclasses
class inside class?
yes
yea thats a subclass i think
they're actually called inner classes in java iirc
probably should've used that terminology before
Those are different
This beginner Java tutorial describes fundamentals of programming in the Java programming language
nested it is!
java page says nested
Superclass and subclass refers to a hierarchy
^
class level variables
hello(String hi)
that's a parameter (still a variable, but not a field)
isnt that a method?
i love how minecraft names air in caves CAVE_AIR
well hello is a method, but the bit inside the paranthesis is a parameter
what owuld be example of field then?
public final class HelloWorld {
private static final String MESSAGE = "Hello World!";
}```
this is a field
what is field?
it's also a constant
thats a method tho right?
ISNT MESSAGE Name of the varirable?
fields are class level variables
wat does it mean by class level?
java has different scopes (levels)
for example:
public final class HelloWorld {
private static final String MESSAGE = "Hello World!";
public static void main(String[] args) {
final String MESSAGE = "Hello Local World!";
System.out.println(MESSAGE);
}
}```
see there's two variables there, both called MESSAGE
the first is a class level variable (a field)
yea
the second is merely a variable inside the method
the variable declared in the method is the local scope
it only exists inside that method
yea
but it will always pick local one
it would, in that case
yes i managed to drop from 10k statements to just 2 statements finally!!!!!!!!!!
unless you specify (super)
no
If I wanted to replace everything thats not inbetween two : : with nothing, would I use regex for that or?
right?
no
to reference the top MESSAGE in that case, you'd do
System.out.println(HelloWorld.MESSAGE);```
?
we're not outside of a class
you can't exit a class in java, everything is bound to them
public final class HelloWorld {
private static final String MESSAGE = "Hello World!";
public static void main(String[] args) {
final String MESSAGE = "Hello Local World!";
System.out.println(HelloWorld .MESSAGE); <- Your calling the class above the main one.
}
}```
Ok wahts a method then btw?
method = function
I thoguht it was method I juts forgot its not a class and a method
o
in java, methods and functions are differentiated by the static keyword
if it has static infront of it, it's a function
Method is like GENERAL? Function is more specific?
Oh
so its correct to call methods function but not the other way around
What's difference between static and non static tho?
static means the property is not bound to an instance of that class
Ok, so pretend "instances", have ids
i'll explain what an instance is in a sec
everytime you contruct an instance of a class, it has a unique id
instances are constructed via the new keyword in java
so, propose this:
OH yea so new is an instance right?
public final class CoolObject {
private final String test;
public CoolObject(String test) {
this.test = test;
}
}```
whats the instance in taht ^?
you can then construct an instance of CoolObject, via new CoolObject("a string");
you now have an instance of the CoolObject class, which stores a string
in this case, the string is "a string"
the id of this object, is 1
how do u know its 1?
we now construct the same object again, with another string
u make that up or is that how it works?
Can I invert a regex selection?
cos ive got this :\w+: and I wanna replace everythinig that isnt selected with ""
now, one more
new CoolObject("a string");
what do you think the id of this object is?
@viscid charm
1
yep
its the same shit
they contain the same string, but they're different instances
and therefore, have different ids
that's one of the key principles you need to know
even though their content is "the same", they're different
so now, with that in mind
I can explain methods
methods, interact with the instance itself
for example, like this:
public final class CoolObject {
private String test;
public CoolObject(String test) {
this.test = test;
}
public void setTest(String test) {
this.test = test;
}
}```
so, propose we do
CoolObject obj = new CoolObject("test");, and it's id is 1, then obj.setTest("test2");
wait doesnt eveery method need a return type?
