#dev-general

1 messages · Page 171 of 1

quiet depot
#

libs folder > maven local

#

maven local shouldn't exist change my mind (or should only exist as a cache)

hot hull
#

Libs folder, what?

quiet depot
#

storing your dependencies in a folder called libs frosty

#

you never seen projects that do that?

#

I see it all the time on gh

hot hull
#

Give me an example, I might've but can't remember

quiet depot
#

don't know of one off the top of my head

#

I usually see it when checking out odd projects

#

like through role requests for example

#

or just browsing spigot

#

problem with maven local is that it's only usable to you

#

you can't assume that everyone else also has the exact version of your dependency downloaded to their m2

#

with a libs folder, you can make sure everyone has the same jar

hot hull
#

Yea, so a libs folder would just be a seperate module/dir in your project containing them all or what?

quiet depot
#

yeah

hot hull
#

Interesting

quiet depot
#

have you really never seen people do it?

hot hull
#

I've not no

quiet depot
#

it's most common on projects that don't use build tools

#

especially eclipse projects (no reason for this in particular, I just find that most people who use ij also use a build tool, or simply store their deps elsewhere)

#

but gradle also has support for it

hot hull
#

"eclipse"

#

Can you see if you can remember any projects which do that, cause I'm intrigued now

quiet depot
#

I'll check if any of mine do

#

I have an example on the barn if you want to see a gradle example

hot hull
#

Will check when I get home, thanks

quiet depot
#

you still use maven?

#

because it's not possible with maven

#

at least not to the extent as it is with gradle, or even the eclipse/ij build tool

hot hull
#

I don't no lol, switched to gradle ages ago

heady birch
#

one command to make maven local usable

#

I just get users to install a jar into the local repo

quiet depot
#

you still have to provide that jar lol...

#

that's more steps than simply integrating your libs folder into the build tool

empty flint
#

libs folder > maven local
@quiet depot Yeah but I don't know how to properly include them so that the jar size doesn't explode

quiet depot
#

compileOnly

#

same way you include spigot

empty flint
#

hm what if you can't get to the jar?

hot hull
#

implementation

quiet depot
#

not sure what you mean by that

#

oh, do you mean if the jar isn't available at runtime?

#

then yeah, what frosty said

#

use implementation

#

make sure to use the shadowJar plugin too

heady birch
#

No gradle thanks 🙂

hot hull
#

Yes gradle.

quiet depot
#

niall doesn't like gradle because it couldn't perfectly convert his spring pom

#

god forbid manual effort on a conversion .-.

#

nah I don't blame niall, learning is effort

#

especially when maven works perfectly fine for him

hot hull
#

Only reason I get annoyed when using gradle is cuz I've got an outdated mcdev version so I have to update everything when making a gradle project

quiet depot
#

I don't use that plugin anymore

#

just causes too many issues

#

haven't used it for like a year

hot hull
#

For plugins which don't require modules and shit it's nice

prisma wave
#

Only saves a few minutes

#

I can pretty much remember the spigot dependency stuff off by heart now

steel heart
#

Yeah same

quiet depot
#

pff

hot hull
#

spigot dependency ew

quiet depot
#
apply from: "https://cdn.piggypiglet.me/gradle/spigot.gradle"

dependencies {
  spigot "1.16.2-R0.1"
}```
is where it's at (©️ - Sxtanna)
hot hull
#

If you don't know the paper one you're bad

steel heart
#

Piggy

#

Maybe remove -R.01

quiet depot
#

it's necessary

#

not all versions are suffixed with -R0.1

steel heart
#

Can’t remember last time a revision was made

#

Probably before 1.8.8

quiet depot
#

one of the 1.8 versions iirc

#

which are still used

#

so it is therefore necessary

steel heart
#

Which one?

quiet depot
#

idk

#

i'll check

#

oh

#

there's the pre versions aswell

#

i was wrong

#

it's always R0.1

#

but some simply don't have R0.1

steel heart
#

Ye

quiet depot
#

1.9 e.g

#

and as I said before, some are pre releases

steel heart
#

Ofc

quiet depot
#

i hate how they're all suffixed with SNAPSHOT

#

that's such a stupid convention

#

assuming it's even a convention, and not just spigot

steel heart
#

Feels kinda unnecessary to have it

quiet depot
#

it is unnecessary

prisma wave
#

Pretty sure it's just spigot

distant sun
#

I like that build.gradle

hot hull
obtuse gale
#

@gaming.extremes

prisma wave
#

So extreme

empty flint
#

how do I parse a placeholder using /papi parse?

#

I don't get how that works now

obtuse gale
#

Not per gui unfortunately. Per command. One command has 2 guis and the other has a variable number, depending on the config
whats the general GuiHandler for?

#

Like you had RankupGuiHandler and GuiHandler

empty flint
#

whats the general GuiHandler for?
@obtuse gale Handling the other two GuiHandlers of course.

obtuse gale
#

ah

#

right

empty flint
#

No it's for common stuff that both need

#

and yeah also for handling the other two, just so there is one single entry point when it comes to gui

obtuse gale
#

so then in the gui class what do we have? Like a setup method thats called onEnable and then a get method?

empty flint
#

cuz if I want to change the implementation of one specific gui handler, I don't have to change the method calls where they are used, just the GuiHandler class

obtuse gale
#

hm?

empty flint
#

so then in the gui class what do we have? Like a setup method thats called onEnable and then a get method?
@obtuse gale Some static stuff that I can initialize on startup gets created (inventory templates that get populated with playerspecific items etc...)

#

Can somebody help me with Papi?

#

I can't get the placeholders to work for some reason

#

[11:45:09 INFO]: [PlaceholderAPI] Successfully registered expansion: blockyranks

#

but using /papi parse me <placeholder> I just get the literal placeholder string back

high blade
#

Hello.
How do I get the time played by the player on the server?

prisma wave
#

bit of a vague question

#

spigot api?

#

a plugin?

obtuse gale
#

you can use the stats

high blade
#

spigot api?

obtuse gale
#

USe the stat

high blade
#

i try player.sendMessage(String.valueOf(player.getStatistic(Statistic.RECORD_PLAYED))); but this return always 0

obtuse gale
#

I think its TIME_PLAYED_TICKS or something

#

Its that

#

and you will have to multiply it by 20 cos its in ticks by defauklt

high blade
#

Statistic enum contains only TIME_SINCE_DEATH and SNEAK_TIME in spigot 1.12.2

obtuse gale
#

ah

old wyvern
high blade
#

Now I will try PLAY_ONE_TICK

obtuse gale
#

its PLAY_ONE_MINUTE, but the name is misleading, its actually in ticks

#

If Ive got a Enum that represents an item in my gui, and contains data for that item, for example item name, slot, and material, whats the best way to get the enum when they click it with the inv click event? Is it to get it by its slot with something like this? This seems kinda sketchy tho, but idkkotlin companion object{ fun getByInt(int: Int):GameType?{ values().forEach { if(it.guiSlot == int) return it } return null } }

prisma wave
#

mixing imperative and declarative code

#
return values().firstOrNull {  
  it.guiSlot == int
}```
#

or use a map

empty flint
#

Why is my papi Expansion class onRequest(...) method never getting invoked even though it's registered?

obtuse gale
#

is by slot the best way to do it? I cant think of another way but idk slot seems kinda iffy for some reason.,... idk why id think that tho lol

prisma wave
#

if you know that the items are placed in order you could just use the ordinal

#

eg values[clickedSlot]

obtuse gale
#

hm

#

they should be since the way I insert them is by looping the values

prisma wave
#

alternatively you could use a map

empty flint
#

Hold up, clip made Vault as well?

#

or just the hook for it?

prisma wave
#

just the hook I believe

hot hull
#

Gian left me on read GWsetmyxPeepoCry

empty flint
#

Is papi working for you guys normally?

hot hull
#

Yes

empty flint
#

Can you help me out with my expansion because it's not getting triggered and I don't know why

hot hull
#

Did you register it

empty flint
#

yes

#

[12:48:30 INFO]: [PlaceholderAPI] Successfully registered expansion: blockyranks

#

but then further down after loading the plugin it says:
[12:48:30 INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
[12:48:30 INFO]: No expansions were registered!

#

idk if that's relevant or not

#

piggy just said to remove the constructor but I don't see how that's supposed to do anything. Firstly the examples on the wiki have one and secondly how am I supposed to instanciate it then?!

#

and he just left after that

#

lol

#

pls help, I'm trying to figure this out for the last 2 hrs

versed ridge
#

Did you try without the constructor?

#

I mean, you might as well

empty flint
#

No I just said idk how to create an instance of it without a constructor...

versed ridge
#

The same way you do with the constructor

#

just without the parameters

#

Also, I didn't see the last part where you said that :P

empty flint
#

lemme try

#

I don't see how that would make a difference though

#

but I can try for sure

#

😩😩

#

Can somebody send me an example of their expansion implementation so I can cross-reference?

#

I really don't see why it doesn't work

hot hull
#

@empty flint Not home rn, hence why I just left

empty flint
#

@empty flint Not home rn, hence why I just left
@hot hull I meant Piggy just left

empty flint
#

and register

old wyvern
#

Borz, no arg constructor is added if no constructor is provided by you

#

Oh wait

#

are you trying to have one without external plugin or with? @empty flint

empty flint
#

I want to have the Expansion as a class inside my own Plugin.

hot hull
#

Oh

old wyvern
empty flint
#

Borz, no arg constructor is added if no constructor is provided by you
@old wyvern Removed the constructor. Not that it makes a difference since the Expansion class does nothing from within the constructor

old wyvern
#

Where did you call your constructor from earlier?

empty flint
#

and it has a constructor as well

old wyvern
#

Does constructor does not register it

#

It takes in your plugins instance in the example

#

Anyway

#

Where do you call the constructor of the expansio?

empty flint
#

@old wyvern in the onEnable(...) method:

old wyvern
#

Is that branch being executed?

empty flint
#

[13:40:48 INFO]: [PlaceholderAPI] Successfully registered expansion: blockyranks

#

pretty sure it is

old wyvern
#

But parsing isnt working?

#

have you tested with /parse command?

empty flint
#

yes

#

Neither onPlaceholderRequest nor onRequest are beign called

#

Any other ideas?

#

Or is there somewhere I can file a bugreport?

old wyvern
empty flint
#

am I supposed to use onRequest or onPlaceholderRequest?

#

I can't say this is definitely a papi bug

#

How mad do you think clip will be if I ping him?

#

to ask for help

old wyvern
#

Not sure. Id suggest you wait a bit possibly

#

Hes often in vc room 1

hot hull
#

I'll help u when I get home if you can wait an hour fingerguns

onyx loom
#

am I supposed to use onRequest or onPlaceholderRequest?
@empty flint onRequest

empty flint
#

I'll help u when I get home if you can wait an hour fingerguns
@hot hull I'll buy you a coffee if you can help me get it working

#

I don't mind waiting, I just hate having tried everything and not knowing what to do anymore so if you don't mind taking a gander I'd be very grateful

jovial warren
#

hey anyone got any idea if coroutines have an equivalent of something like CompletableFuture#then...

#

because ik it has async which returns a Deferred<T> but Deferred literally has none of those sort of methods in it

old wyvern
#

Coroutines are exactly that

#

everything after a call for a suspend function is passed to the continuation

jovial warren
#

ah okay

lunar cypress
#

Deferred has await() doesn't it

old wyvern
#

Yea

jovial warren
#

yeah, and that's what it was trying to do

hot hull
old wyvern
#

yea bard the point of coroutines in kotlin is to write the callback chains in a sequential fashion

jovial warren
#

but my method needs to return a future result (handle the asynchronous computation internally)

#

basically, it queries a specific REST API for results, and the original Java code I'm looking at uses CompletableFuture for asynchronous computation, but coroutines are much more lightweight, and better for use in Kotlin code since they clean things up, so I'm converting CompletableFuture to Deferred pretty much lol

#

and anything that returns CompletableFuture<Void> is just returning Job

old wyvern
#

You dont need to use deffered

#

Its used mostly when you need to compute parallelly in a coroutine

jovial warren
#

it's probably not very nice code as it is but hey, I didn't write most of it, I just copied existing code and ported it pretty much

old wyvern
#

The replacement for using then is just using suspend functions

jovial warren
#

having that be a suspend function? or what?

#

like making the user do the asynchronous handling instead of me

old wyvern
#

the ones you expect to take time should be a suspend func

lunar cypress
#

^

jovial warren
#

I mean, it shouldn't take long, it just won't be done instantly

lunar cypress
#

suspend function that returns the result

jovial warren
#

ah okay

#

and then make the user of this library handle async stuff?

old wyvern
#

wdym?

lunar cypress
#

well there is nothing left to handle when they use coroutines

jovial warren
#

because you can't execute suspending functions outside of a coroutine scope

old wyvern
#

Mhm

jovial warren
#

what I've currently got now is this: ```kotlin
fun getYoutubeSearchResult(query: String)
= RestClientScope.async { load(YOUTUBE_SEARCH_PREFIX + query)?.let { transformSearchResult(it) } }

#

should that be a suspending function then?

old wyvern
#

Depends on how you want the user to access it I guess. Not sure how its usually used in libraries but technically suspend functions would be more apt

#

I mean even Defferred#await() is a suspend func I think

#

yup

jovial warren
#

I was thinking they could use Job#invokeOnCompletion or something, as an equivalent to then...

old wyvern
#

ah

jovial warren
#

isn't that how CompletableFutures work anyway? they're made up of stages, and each then is executed after the previous stage has finished

old wyvern
#

No wait

jovial warren
#

though invokeOnCompletion can't be used the same way CompletionStages work

old wyvern
#

invokeOnCompletion seems to just have the error thrown inside a Job

jovial warren
#

this is so different

old wyvern
#

Yup, have them be suspend functions

jovial warren
#

that has it's downsides though but okay

old wyvern
#

I mean if you really dont want to have that, provide a suspend callback lambda maybe

jovial warren
#

yeah that might be a good idea

#

how can I do that?

prisma wave
#

bruh

jovial warren
#

at this point I'm thinking CompletableFutures might just be a better idea because this makes absolutely no sense at all to me

prisma wave
#

isn't this totally defeating the point of coroutines?

jovial warren
#

what is the actual point of coroutines?

prisma wave
#

a concurrency model

jovial warren
#

I just use them because I thought they were Kotlin's way of handling asynchronous computation

prisma wave
#

they're the most idiomatic way yes

empty flint
#

@hot hull I am gonna literally just copy your class and see if that works

prisma wave
#

but the point is that you avoid callbacks

empty flint
#

can you show me where you initialize it?

hot hull
#

Ein moment

old wyvern
#

but the point is that you avoid callbacks
^

jovial warren
#

@prisma wave so I shouldn't be using coroutines then if I need callbacks?

prisma wave
#

why do you need callbacks?

old wyvern
#

Why not just have the user handle it in a CoroutineScope?

jovial warren
#

¯_(ツ)_/¯

#

that sounds really annoying to me

hot hull
#

In my on enable @empty flint

new Placeholders(tokenManager).register();
old wyvern
#

why?

jovial warren
#

actually no you're right

prisma wave
#

what exactly is stopping you from just writing a suspending function

#

and calling it?

jovial warren
#

so is something like ```kotlin
suspend fun getYoutubeSearchResult(query: String) = withContext(RestClientScope.coroutineContext) {
load(YOUTUBE_SEARCH_PREFIX + query)?.let { transformSearchResult(it) }
}

#

you probably won't understand most of that but ¯_(ツ)_/¯

prisma wave
#

IO should probably be with the IO dispatcher

#

but yes

jovial warren
#

so I shouldn't be using my own scope for IO stuff then?

#

the only reason I'm using my own scope is so that it's easier to keep track of the thread, because they're named Lavakord-Rest-Client-Dispatcher

prisma wave
#

not an expert but probably not

#

the IO dispatcher is specifically optimized for IO

old wyvern
#

^

jovial warren
#

can I name threads with pre-made dispatchers?

#

or should I say, name the dispatcher

empty flint
#

@hot hull first interesting thing: the logs say [15:15:22] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: blockyranks even though the identifier is unchanged from your "tokens"

jovial warren
#

because I think it'd be easier to keep track of in logs if the dispatcher was named Lavakord-Rest-Client-Dispatcher rather than whatever tf the name of the IO dispatcher is

old wyvern
#

IO just uses the Common FJP I think

prisma wave
#

It literally makes no difference

#

at all

empty flint
#

And nope it doesn't work

#

@hot hull

#

idk what's happening but it's not getting passed to my plugin

hot hull
#

What version of papi are you using?

jovial warren
#

@prisma wave okay

hot hull
#

Because that was done on 2.10.6

prisma wave
#

@empty flint are you sure you're not using an old version of the jar or something?

hot hull
#

I think shit changed in the last few versons

empty flint
#

2.10.9

hot hull
#

versions*

empty flint
#

@empty flint are you sure you're not using an old version of the jar or something?
@prisma wave yes

#

@empty flint are you sure you're not using an old version of the jar or something?
@prisma wave I added some debug code to make sure

#

Could this be due to ChatControlPro not liking MC1.16.2?

#

Does Papi have any dependencies?

hot hull
#

It doesn't no

#

Lemme check something, se

#

c

prisma wave
#

i am speed

empty flint
#

that's a new one. sharing screenshots via dropbox...

obtuse gale
#

lol

#

Ive got dropbox downloaded and whenever i screenshot it auto makes a link

#

idk why, it only does it on my mac

empty flint
#

@obtuse gale try SHIFT+WIN+S, draw the rectangle and then just CTRL+V here in the chat

prisma wave
#

budget sharex

#

lol

obtuse gale
#

shift alt s aint doing anything lol

#

im on mac rn

#

i normally just windows key + s on my pc

empty flint
#

my bad

hot hull
#

Blocky, no reason it shouldn't work, double check that you're using the correct jar, cause that's the only feaseable issue

obtuse gale
#

i normally use command shift 5 to ss on mac, but thats what made the dropbox link lol

#

then it doesnt even copy it to my clipboard, it just saves it to my desktop

empty flint
#

shift alt s aint doing anything lol
@obtuse gale sorry I meant shift win s

#

but yeah

#

on mac

#

Blocky, no reason it shouldn't work, double check that you're using the correct jar, cause that's the only feaseable issue
@hot hull I swear I am

hot hull
#

Decompile and check

obtuse gale
#

anyone know why IJ is like incredibly laggy on mac lol?

hot hull
#

I'll try making a test plugin with an expansion on latest just to verify

obtuse gale
#

like it cant keep up with my typing its lagging so hard

old wyvern
#

yea it was weird on one of my friends mac as well once i think. It stopped showing any suggestions or something

obtuse gale
#

i mean yeah i can type way faster than it can suggest stuff

old wyvern
#

No like

#

It didnt suggest

#

Even if you waited a long time

obtuse gale
#

o

old wyvern
#

I think it was fixed after a reinstall

#

Not sure

obtuse gale
#

bruh

prisma wave
#

hur dur mac bad

obtuse gale
#

I found this

#

But its like

#

only a couple months younger than me i think

jovial warren
#

any way to force coroutines to execute in order btw? or do they just do that if they're on the same dispatcher

old wyvern
#

Wha?

#

Can you explain what you are trying to refer to by "in order"?

#

Its not supposed to be parallel unless you use async or something

jovial warren
#

I need them to finish in the order that they were started

old wyvern
#

I dont think I understand what you mean

#

Are they different Jobs?

jovial warren
#

it's a suspend fun

#

so maybe it's up to the user

old wyvern
#

everything inside the suspend fun will be executed in order

jovial warren
#

yes, you have misunderstood what I mean

#

I know that

old wyvern
#

Ok can you explain what you meant a bit more?

jovial warren
#

basically, I'll try to explain it like this: Lavaplayer has this thing called an OrderedExecutor, basically an executor service, with with an internal blocking queue of futures, which ensures that each future is started in order of when it was put in the queue

#

now, I want that, but for coroutines essentially

#

if that makes any sense at all

obtuse gale
#

bruh

prisma wave
#

Channels perhaps

obtuse gale
#

intellijs stopped auto-importing, and when i manually click import it takes a solid 5 seconds to import

jovial warren
#

channels? aren't they usually used for communication between coroutines?

#

though they are basically blocking queues for coroutines so that could work yeah

old wyvern
#

Bard, all childrens of a Job are executed in the proper order

jovial warren
#

what?

old wyvern
#

So if they use the suspend functions in the same job, it will execute it in the proper order

obtuse gale
#

if i uninstall intellij will it delete the project files?

old wyvern
#

if i uninstall intellij will it delete the project files?
No

jovial warren
#

@old wyvern what if they are different jobs?

old wyvern
#

Then order is not assured

jovial warren
#

can I make a scope to handle that?

empty flint
#

@hot hull I was mistaken with the identifier thing but there is no mistake, I am registering this Placeholders class:
https://paste.helpch.at/ezodolefos.java which couldn't be simpler.
The console output is:

[15:29:32] [Server thread/INFO]: [BlockyRanks] | DEBUG | Registered Placeholders successfully                             | ORIGIN: Placeholders in method register at line 19
...
[15:29:33] [Server thread/INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...

Can you check if on your server the PlaceholderAPI is initializing the registration before you register your plugin placeholders?
I think this could be the reason...

old wyvern
#

Not fully sure what you want the result to be at this point tbh

hot hull
#

Blocky, try delaying the registration of yours, lemme open console and I'll check real quick

empty flint
#

I forgot how to delay execution on spigot

hot hull
#
[17:43:10 INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
[17:43:10 INFO]: [PlaceholderAPI] Successfully registered expansion: vault
[17:43:11 INFO]: [PlaceholderAPI] %javascript_example% has been loaded!
[17:43:11 INFO]: [PlaceholderAPI] Successfully registered expansion: javascript
#

Make a runnable with runTaskLater

#

You're softdepending papi right?

empty flint
#
api-version: 1.13
name: BlockyRanks
main: me.blocky.ranks.BlockyRanks
version: 1.6.1
softdepend: [Jobs, mcMMO, VotingPlugin, Multiverse-Core, PlaceholderAPI]
depend: [Vault]
#

is that the correct Softdepend name?

hot hull
#

yup

empty flint
#

Then why isn't it loading after Papi?

#

What gives?

#

Do you think we can get clip to check this channel without pinging him?

#

So he can maybe shed some light on the situation

#

Because I really don't like the runTaskLater approach

obtuse gale
#

bruh

#

its literally not...

empty flint
#

idk why but those dropbox sceenshots are the funniest shit to me rn

prisma wave
#

Shared with Dropbox

obtuse gale
#

bruh idk how to fix this

#

im just tryna uinstall ij lol

onyx loom
obtuse gale
#

is one through jetbrains toolbox ad one through without jetbrains toolbox?

#

I had that at one point

onyx loom
#

mustve been

#

im tryna find the second one but cant find it anywhere in my files

#

i cant even find toolbox location

obtuse gale
#

just open the shortcut up

#

go to open file location

onyx loom
#

oh right yeah

#

god damn why u so smart

obtuse gale
#

you gotta have at least 400iq to know how to open file locations

onyx loom
#

yeah ones through toolbox

hot hull
#

@empty flint Try doing the delayed registration and see if it works

empty flint
#

why the frick i got 2 intellijs
@onyx loom Are you paying for both?

prisma wave
#

found the jetbrains employee

onyx loom
#

no lol

#

github student pack

empty flint
#

@empty flint Try doing the delayed registration and see if it works
@hot hull Nope still doesn't work 🙃

#

Am I going crazy right now?

hot hull
#

Yes

empty flint
#

disgusting discord

#

this was the result of that last command

hot hull
#

%identifier_placeholder%

onyx loom
#

thats not a papi placeholder

#

yea

hot hull
#

Are you telling me that's what you've been parsing this whole time..

onyx loom
#

🤣

empty flint
#

what the fuck is this then on the papi github?

#

%string%

hot hull
#

Am I blind or?

onyx loom
#

where is %string%

empty flint
onyx loom
#

yeah

empty flint
#

it's right there in the string

onyx loom
#

thats the player expansion

hot hull
#

%<expansion indentifier>_<expansion placeholder>%

empty flint
#

hold up

hot hull
#

Show me your placeholder class Blocky

empty flint
#

Ayyyyyyy I'm proper mentally handicapped it seems.

onyx loom
empty flint
#

I did not know that was the placeholder syntax

#

I thought it was just %string%

hot hull
#

Now you know fingerguns

empty flint
#

welp

#

ty

#

xD

hot hull
#

:p

empty flint
#

bruh imagine I had pinged clip for this shit

hot hull
#

kek

onyx loom
#

how does one change the material icons at the side

obtuse gale
#

good question

old wyvern
#

I use atom material icons

obtuse gale
#

how would one go about editing those? Cos I use them as well but I wanna change some up

#

also is that responsible for the package icon?

old wyvern
#

Add a custom file association?

#

also is that responsible for the package icon?
Yes

obtuse gale
#

does kotlin have a try-with-resources thing?

#

I tried just doing try(val x = Thing()) but it didnt work

old wyvern
#

.use

obtuse gale
#

where

old wyvern
obtuse gale
#

ah

onyx loom
#

Add a custom file association?
@old wyvern how does my small brain do that

hot hull
#

By adding a custom file association

onyx loom
#

😐

obtuse gale
#

If I run a discord bot in intellij where does Paths.get() start looking for the file?

#

i presumed resources but I guess not

#

if So how can i make it get sometihng from the resources folder

ocean quartz
#

Anyone knows why the fuck PacketPlayOutTitle as subtitle doesn't show anything unless title is sent as well?

hot hull
#

Because

#

Hella dumb, just set the title as a space

#

@quiet depot Question about the libs thingy, how do I put the desired lib into it?

prisma wave
#

@obtuse gale ClassLoader#getResource

ocean quartz
#

So, subtitles get queued and wait for a title what

empty flint
#

Does anybody know a good UML class diagram tool?

#

One that doesn't look like it's from the 90/00s

prisma wave
#

IJ has one

empty flint
#

oh really?

#

Where? How?

prisma wave
#

I think so

#

It can make a class graph with one anyway

empty flint
#

can it go the other way as well?

#

I wanna design the UML by hand

#

as a plan/reference when doing the code

prisma wave
#

not sure but I imagine so

ocean quartz
#

So i guess i need to send a null title packet for it to work .-.

jovial warren
#
private fun countPlayingPlayers() = lavalink?.getLinks()?.filter {
    val player = it.player ?: return@filter false
    socket == it.getNode(false) && player.playingTrack != null && !player.isPaused
}?.count() ?: 0
```how horrible is this code lol
#

is that even readable?

empty flint
#

is that even readable?
@jovial warren takes a while but yeah

jovial warren
#

lol

prisma wave
#

getters

#

gross

jovial warren
#

there's nothing at all I can do there

#

don't ask why, but getLinks() returns links.values, not links

prisma wave
#

is it your code?

jovial warren
#

and links is a ConcurrentHashMap<String, T>

#

and yes it is, but it's kinda converted code

prisma wave
#

😠

jovial warren
#

wanna see the original?

#

(even though it's on my GH, that's my fork, it's not my code and it's not my project lol)

empty flint
#

what's Javalink?

prisma wave
#

not acceptable

jovial warren
#

Lavalink is "a standalone audio sending node based on Lavaplayer", to quote the README

#

basically, it's used for sending audio to Discord

#

and I'm writing my own implementation of it's API because why not lol

#

@prisma wave come up with a better solution lol

prisma wave
#

property without backing field

jovial warren
#

what?

#

you mean like this? ```kotlin
internal val links: ConcurrentHashMap<String, T>
get() = links.values

prisma wave
#

no

#

i mean like ```kotlin
val linkValues: Collection<T>
get() = links.values

hot hull
#

Also @quiet depot I am honestly dissapointed

private static TerraformGeneratorPlugin i;
jovial warren
#

ah okay one of those @prisma wave , yeah I've been doing that in a few places already

prisma wave
#

getters are not allowed

#

under any circumstances

jovial warren
#

also you got any recommendations for good Kotlin WebSocket libraries btw?

prisma wave
#

ktor

jovial warren
#

because at the moment I'm using Java-WebSocket, but it seems a bit too Java

#

I mean clients lol

#

I could use OkHttp since it's written in Kotlin and so has loads of extensions and other useful tools

#

(and I'm already using Retrofit for making HTTP requests)

obtuse gale
#

if I override a method from java in kotlin it let me makes the parameters non-nullable

#

what happens if they are null, since im overriding the method from java, and they arent marked as Non Nullab

jovial warren
#

if they are null and you set them as non-null then you'll get a KotlinNullPointerException

obtuse gale
#

right

prisma wave
#

^ it generates null checks for each parameter

jovial warren
#

I think

obtuse gale
#

but why doesnt IJ warn me about that

#

ah

jovial warren
#

^ it generates null checks for each parameter
does it?

prisma wave
#

probably because it's a platform type

#

yes

jovial warren
#

wow

prisma wave
#

Intrinsics.checkParameterIsNotNull or something

hot hull
#

Am I dumb or?

    @EventHandler
    public void onSpawnerExplode(final BlockExplodeEvent event) {
        final List<Block> exploded = event.blockList();

        System.out.println("Triggered event");
    }

It's registered, however it doesn't get called, am I going insane or am I just being dumb, this should trigger when a tnt explodes blocks right?

distant sun
#

yes you are

obtuse gale
#

It should trigger on any explosion

#

like creeper and stuff

hot hull
#

Well yes, but it doesn't

obtuse gale
#

Ummm

hot hull
#

Anyhow, that's a problem for another day, I'm going to sleep

obtuse gale
#

ok let me try this

astral quiver
#

try it with Bukkript

onyx loom
#

sleep?????????

ocean quartz
#

Frosty need his beauty sleep

astral quiver
#

I'm working in on monitor, and in discord in another, this is allowed?

#

Bukkit calls works on Android ? thonking

ocean quartz
#

No, we all know that the second monitor is for procrastinating while watching youtube videos

astral quiver
#

You know my secret !

hot hull
#

Frosty need his beauty sleep
@ocean quartz yessir

obtuse gale
#

Yes WTF that thing don't get triggered lol

astral quiver
#

Decompile time!

jovial warren
#

@ocean quartz that's so true as well haha

onyx loom
#

No, we all know that the second monitor is for procrastinating while watching youtube videos
@ocean quartz i do that with one monitor, whats the difference thonking

subtle scroll
#

where do i get support

ocean quartz
#

The difference is that you can pretend to be coding if you have 2 fingerguns

onyx loom
#

o

ocean quartz
onyx loom
#

i guess i should setup my second monitor then 🙃

subtle scroll
ocean quartz
#

Be patient

hot hull
#

bruh spigot is gay

onyx loom
#

go sleep

hot hull
#

Now that does sound good

normal talon
#

elapsed spigot good

oak raft
#

paper spigot good

ocean quartz
#

Oof never call paper, paper spigot, in the paper discord

old wyvern
#

Whats up with that?

oak raft
#

oh yeah, those guys get pissed easy

ocean quartz
#

It's PaperMC, they hate being called paper spigot

oak raft
#

when I was talking about using 1.8 previously they were all on me lol

prisma wave
#

i meaannn

#

that's reasonable

#

1.8 bad

old wyvern
#

It's PaperMC, they hate being called paper spigot
I mean its a fork of spigot either way

oak raft
#

1.8 BEST version

old wyvern
#

1.8 BEST version
Debatable

ocean quartz
oak raft
#

know ur versions mitten

prisma wave
#

objectively wrong

oak raft
#

dw

#

when I make remencespigot it'll be possible to do that in 1.8

old wyvern
#

when I make remencespigot it'll be possible to do that in 1.8
You remaking the client m8?

oak raft
#

not the client

#

the game

old wyvern
#

Then how the hell are you gonna add rgb support lmao

oak raft
#

with java

old wyvern
#

I assume you are trolling at this point

oak raft
#

ye

#

remencespigot will never come 😦

hot hull
#

I have awoken

onyx loom
#

wakey wakey rise and shine

prisma wave
#

:(

hot hull
#

So I've just remembered how all the cool kids obfuscate their plugins

jovial warren
#

1.8 is neither bad nor good, it's very useful if you want a server that's gonna use the least RAM where it doesn't matter at all what blocks you have access to, and also for KitPvP servers, because 1.9+ PvP is shit

hot hull
#

Just use kotlin, ez claps

prisma wave
#

Also

#

1.8 PvP is boring as hell

#

Change my mind

onyx loom
#

i think u mean clojure frosty

prisma wave
#

tbf all minecraft PvP is kinda boring

jovial warren
#

So I've just remembered how all the cool kids obfuscate their plugins
@hot hull lol

onyx loom
#

^

#

mc pvp bad

hot hull
#

KM, unless you have a twist to the gamemode it's hella boring

prisma wave
#

yea

#

it's just click fast

onyx loom
#

or click really slow

hot hull
#

And Bardy, bruh ain't nobody know what shit is when you decompile a kotlin plugin :p

prisma wave
#

decompiled kotlin isn't that bad

#

Decompiled clojure is a sight to behold

old wyvern
#

Its much more readable than obfuscated code

jovial warren
#

@hot hull more like all the kids who don't want people reverse engineering their shitty plugins because they think they deserve to earn money for their "hard work and effort" (there are some exceptions before you go off on one at me lol)

old wyvern
#

Decompiled clojure is a sight to behold
@prisma wave Holy god of

prisma wave
#

private static final Var dl_et = new Var()

hot hull
#

That text in () stopped a crusade

jovial warren
#

lol

#

that's why I put it there

hot hull
#

But yea everything should be OS

#

I have 20 projects closed source, but that's besides the point

old wyvern
#

I mean honestly thats up to them

jovial warren
#

like there are some people who have actually put in hard work and do deserve something back from that, but most of these plugins on the market these days are shit lol

#

I have 20 projects closed source, but that's besides the point
@hot hull hypocrite

onyx loom
#

world where everything is os: 😎
world where nothing is os: 😦

#

cba to find the actual pic

hot hull
#

Bruh it's commissions, I can't just OS that shit, otherwise I would

prisma wave
#

world where everything is clojur: 😎
world where nothing is clojure: 😦
@onyx loom

jovial warren
#

I mean, I'm a massive supporter of open-source in general, so I'm very biased, but yeah, I agree with you

prisma wave
#

yeah, I agree with you
@jovial warren

#

Wow

#

2 people supporting clojure

#

I love it

onyx loom
#

just os the commissions no balls

jovial warren
#

fuck you

prisma wave
#

:))

jovial warren
#

@prisma wave you know that wasn't to you idot

#

lol

hot hull
#

Kali, inb4 I upload my entire projects folder smh

prisma wave
#

I know nothing of the sort

onyx loom
#

doit

old wyvern
#

idot

jovial warren
#

@old wyvern that was done on purpose lol

old wyvern
#

That was done on purpose as well

#

😎

jovial warren
#

why is context so much harder over text than IRL lol

prisma wave
#

Every programmer born after 1992 cant paranthesies. All they know is npe, make js framework, be hipster and cry

hot hull
#

Ah yes the ultimate swear word, you idots

#

@prisma wave but you were born after 1992

old wyvern
#

How dare you call us an idot

onyx loom
#

NPE

hot hull
#

Also ^

prisma wave
#

@hot hull that paragraph is an autobiography

hot hull
#

Fuck is thag

#

Thag*

#

That*

#

Fuck

prisma wave
#

Thag*

onyx loom
#

🌝

old wyvern
#

I mean NPEs are more of an issue of the person handing it so 🤷‍♂️

prisma wave
#

aka every programmer born after 1992

old wyvern
#

I vote for defaults

hot hull
#

I vote for nukes

onyx loom
#

NUKES

hot hull
#

We need another meteor

old wyvern
#

@prisma wave this is similar to what I was suggesting except this returns null for ref types

prisma wave
#

What language is that?

old wyvern
#

c#

prisma wave
#

Interesting

ocean quartz
somber tulip
#

❤️

hot hull
empty flint
#

Can't do this in 1.8 fingerguns
@ocean quartz why not?

ocean quartz
#

Doesn't support hex colors

hot hull
#

Because 1.8 don't suppprt hex

#

Well only 1.16 does

#

Which is sad

empty flint
#

ah

ocean quartz
#

Everything else works though

static zealot
#

wait hex on 1.12 ?

hot hull
#

Matt, if I were to use gradient on a lower version, would it shit itself?

#

No blitz..

static zealot
#

that's what I thought 😦

ocean quartz
#

It would show white

hot hull
#

MF-Client when™️

ocean quartz
#

never

hot hull
#

Sad

ocean quartz
#

Hex will work on lower versions though

static zealot
#

how?

hot hull
#

By translating to the closest approx color

static zealot
#

ah Ic

#

I thought actual hex will work xD

hot hull
static zealot
#

:))

#

it should be js, html, css, kotlin, java , c#, c++

#

also python

prisma wave
#

C

#

cl

#

clo

onyx loom
#

bad

static zealot
#

KotlinClojureScalaGroovy

prisma wave
#

jur

empty flint
#

By translating to the closest approx color
@hot hull if the gradient has 2 colors only, that would result in it being split in the middle, not looking like a gradient at all

ocean quartz
empty flint
#

can your gradients have multiple colors, @ocean quartz ?

ocean quartz
#

Yeah unlimited

hot hull
empty flint
#

well... Int.MAX_VALUE but close enough

hot hull
#

String.MAX_VALUE

empty flint
#

Now what would that be?

prisma wave
#

2

hot hull
#

69 fingerguns

empty flint
#

On 32 bit systems a String with the size of 4GB

#

Is the answer to "How often do planes crash?" - "X times a year." or "Just once."?

onyx loom
#

OMG @hot hull

static zealot
#

xD

#

:))))(((())((()))(()

prisma wave
#

make a clojure joke

#

i dare you

#

come on

onyx loom
#

cant

#

itll killl me

empty flint
#

@prisma wave Clojure eyes and imagine it were an actually usable language.

static zealot
#

Clojure? More like: Dumb! Hahahahaha

lunar cypress
#

Gotem

static zealot
#

Jesus I'm a SAVAGE

prisma wave
#

oh damn

#

rich hickey reported dead after that burn

onyx loom
#

😬

prisma wave
#

@empty flint as someone who has used it I can confirm that it is usable

lunar cypress
#

It certainly is

empty flint
#

Yeah I wouldn't know, I just wanted to throw shade with a mediocre pun

#

Because you dared Blitzzz to do it

hot hull
#

Clojure? Nah more like I'm lonely

#

Oh wait GWsetmyxPeepoCry

empty flint
#

@hot hull You got us

#

Might might not always be an improvement

#

but sometimes it can be

lunar cypress
#

Clojure? More like NOjure amirite!!

empty flint
#

when's the next timed coding challenge thingy?

static zealot
#

last week

old wyvern
#

next timed coding challengeCoding game?

empty flint
#

Yeah I forgot what it was called

old wyvern
#

I mean, clash of code?

empty flint
#

Yes!

#

that's the one

old wyvern
#

If a few people are up im in for one

onyx loom
#

lets go

static zealot
#

do what?

onyx loom
#

clash of code

empty flint
#

like right now?

#

I'm down

static zealot
#

what's that? Like Clash Of Clans but you send the troops using command lines?

onyx loom
#

players get the same challenge that they have to code

old wyvern
#

is coding game loading for you kali?

onyx loom
#

whoever gets it in the fastest time / shorted chars wins

old wyvern
#

Im just getting a white screen

#

nvm fixed

static zealot
#

oh ok and what is this based on? just minecraft/spigot? or is it random things?

old wyvern
#

Im pretty sure you were in one with us blitz

onyx loom
#

random things

#

theyre not too hard

onyx loom
#

but i usually come last because i suck 🌚

lunar cypress
#

Simple input/output algorithms

onyx loom
#

who joining

static zealot
#

Yugi you are delusional xD

onyx loom
#

@prisma wave

old wyvern
#

Nah man I swear I saw you in the lobby once

onyx loom
#

@empty flint

old wyvern
#

@empty flint you in>

#

?

prisma wave
#

i'm busy losing games

#

give me a bit

static zealot
#

I'm in

onyx loom
#

playing overwatch ew

static zealot
#

you have 44 seconds KotlinClojureScalaGroovy Mitten

#

xD

#

I wrote all that by hand btw

#

I'm a god

prisma wave
#

😦

static zealot
#

what we got to do? this UI is kinda trash

#

xD

#

or I'm just dumb

onyx loom
old wyvern
#

Left side shows the question

empty flint
#

I'm in

static zealot
#

nah dude I'm out

lunar cypress
#

The "minimum number"?

old wyvern
#

Minimum number of bits john

static zealot
#

no idea what that language is but its not Romanian

#

don't understand it

old wyvern
#

Like 2 = 10 so 2

#

4 = 100 so 3

static zealot
#

do I have to improve the code they gave me or what?

prisma wave
#

you have to finish it

old wyvern
#

You have to write something to convert the input to the specified output

#

||Integer.toBinaryString(X).length()|| in this case.

static zealot
#

For each number to process, the minimum number of bits required to code it. Do I literally have to print an answer?

prisma wave
#

yes

static zealot
#

dude inglesh is not my language so nah

#

I'm out xD

old wyvern
#

ah fair enough

#

ciao

empty flint
#

Where do I see the input?

#

for each testcase

old wyvern
#

The question on the left

#

Or you can use the error stream to output it if you are stuck I guess

static zealot
#

welp yeah I rly don't get what I have to do xD

old wyvern
#

You have to get the minimum number of bits that are required to represent the number in binary

static zealot
#

like which number? i? and output it for each number?

#

anyways I left

old wyvern
#

Which language are you using?

#

In java they declared it for you as X

static zealot
#

kotlin but yeah it was X just don't bother anymore lol xD I left

empty flint
#

Wait do I have to print an output for each number?

static zealot
#

yeah I think so

old wyvern
#

Yes borz

slender zephyr
#

Hey, Do you have a jar / maven to use the deluxechat api, because I need to use the api but I didn't buy the plugin?

prisma wave
#

alrighty im joining

steel heart
#

Code Clash?

prisma wave
#

ye

old wyvern
#

Current one has 3 mins left

steel heart
#

Frick

old wyvern
#

waiting for borz

steel heart
#

Next one then

old wyvern
#

blitz left

empty flint
#

wait

old wyvern
#

yea borz?

prisma wave
#

ok

empty flint
#

Now I get how the println() answering works

#

ok

#

let's go next

old wyvern
#

ok everyone si done

onyx loom
#

@steel heart

#

what the frick

old wyvern
#

Lmao @onyx loom

lunar cypress
#

I have never seen kali submit a serious result

old wyvern
#

true

#

actually he did last round

prisma wave
#

lmao

#

im in debugging hell rn

old wyvern
#

yea it specifies to ||round up||

onyx loom
#

I have never seen kali submit a serious result
@lunar cypress i try my best 😦

#

most of the time

prisma wave
#

honestly cba

#

40% will do

empty flint
#

Man

prisma wave
#

FUCK

#

forgot about ceil

empty flint
#

I was struggling with that Math.ceil

prisma wave
#

i couldnt remember how to round up

#

kill me

old wyvern
#

ah rip

empty flint
#

i couldnt remember how to round up
@prisma wave Me either ^^

#

That's why mine took so long

ocean quartz
empty flint
#

Had the code in one of my plugins already xD

prisma wave
#

pretty clean

old wyvern
onyx loom
#

nice matt

#

i like the stat thing

old wyvern
#

starting

empty flint
#

Matt what's ipsk?

ocean quartz
#

Basically a small version of a really old username ipsyko

lunar cypress
#

you can join late now

#

nice

prisma wave
#

nice

old wyvern
#

really?

lunar cypress
#

but I don't get a time relief

old wyvern
#

nice

lunar cypress
#

smh

old wyvern
#

ah

ocean quartz
#

Oh yeah, that's cool

prisma wave
#

the functional solutions are actually clean af

empty flint
#

I couldn't for the life of me figure out how to cast a long to an int

#

oh, Integer.valueOf has a radix as well

#

fml

prisma wave
#

lol rip

empty flint
#

last one for me now

prisma wave
#

I think it's clojure time

ocean quartz
#

In Kotlin is just Long#toInt

#

Also if you are in Java use Ints#tryParse over Integer#valueOf

old wyvern
#

matt you in?

lunar cypress
#

Ints.tryParse is guava

ocean quartz
#

Nah sorry my brain is already too fried

#

Yeah but i am assuming he's using spigot so it's there already

onyx loom
#

uhhh what do we do here?

empty flint
#

I have no idea what to do, div by 2 then 3 then 5 then 3 again?

old wyvern
#

||No. of digits matter||

onyx loom
#

ah ty

prisma wave
#

no way

#

holy

old wyvern
#

xD

empty flint
#

oh lol

prisma wave
#

I completed one in clojure!!!

old wyvern
#

gg

prisma wave
#

😎

lunar cypress
#

still trying to figure it out

prisma wave
#

officially an expert at the language now

empty flint
#

alright

#

)))))) @prisma wave are you not ashamed of this kind of language?

prisma wave
#

better than java

empty flint
#

true

#

wet toast is better than java as well

#

doesn't mean its good

prisma wave
#

🙄

old wyvern
#

bm, ns = namespace but what does :genclass do?

prisma wave
#

it's the same amount of parens as kotlin would use

onyx loom
#

I DID IT

prisma wave
#

except cleaner

onyx loom
#

BE PROUD

prisma wave
#

nice

old wyvern
#

gj

onyx loom
#

oh shit im so stupid

prisma wave
#

@old wyvern it's for defining the .class that should be compiled

onyx loom
#

.length is a thing oops

prisma wave
#

idk if it's necessary or not

old wyvern
#

ah

lunar cypress
#

it's not, but coc requires it

old wyvern
#

I see

prisma wave
#

classic

lunar cypress
#

if you want to call it like a normal java main class you need it

onyx loom
#
val chars = n.toString().toCharArray()
var digits = 0
chars.forEach { digits++ }```
kek
lunar cypress
#

ok I'm gonna look at the spoiler now

empty flint
prisma wave
#

@onyx loom gross

onyx loom
#

SHUSH

#

i did it

#

be happy

prisma wave
#

20 lines of kotlin vs 12 of clojure

onyx loom
#

😦

prisma wave
#

there is a clear winner

#

as usual

old wyvern
#

🙃

onyx loom
prisma wave
#

oh god

lunar cypress
#

it crashed

#

lol

prisma wave
#

i'd rather die than try and do this functionally

#

lol

ocean quartz
#

@empty flint I don't see why anyone would want to extend it

empty flint
#

@empty flint I don't see why anyone would want to extend it
@ocean quartz I would want to in order to add some other stuff I would need. Now I have to have it be a member and manage it instead of a parent class that just does the stuff it does in the background plus some other things

#

I don't see why you would restrict it to being final

lunar cypress
#

this question gave me flashbacks to when I wrote poker in clojure

prisma wave
#

uh oh

#

honestly cba

#

66% is better than 0

ocean quartz
#

@empty flint I guess, i can make it non final in a second

empty flint
#

I need help naming a class

lunar cypress
#

that's always fun

empty flint
#

I have a frontend and a backend and then this class, let's call it a bridge for now

#

the frontend and the backend both only see the bridge, they don't know that the other one exists

#

what do I call this bridge class?

onyx loom
#

Bridge

empty flint
#

FrontendBackendComBridge?

#

Bridge
@onyx loom fingerguns

lunar cypress
#

what kind of front and backend

empty flint
#

But not descriptive enough

onyx loom
#

get niall the expert

#

hes an absolute unit when it comes to naming classes fingerguns

empty flint
#

what kind of front and backend
@lunar cypress I mean I call them "front-" and "backend" but they are just a group of classes where the frontend handles commands and inventories and the backend handles the data storage and stuff

lunar cypress
#

and what does the bridge do

#

I assume they both know each other directly

empty flint
#

@lunar cypress The frontend might request something like the number of players using the plugin from the bridge. The bridge then tells the backend to fetch that information and forwards it to the frontend.

lunar cypress
#

and why so complicated

empty flint
#

The bridge gets a message from the bridge, does what it's told and then waits for the next message

lunar cypress
#

why not just a regular api

empty flint
#

and why so complicated
@lunar cypress Because I want it to a) be expandable and b) be usable on bungee and spigot

#

on bungee the backend would only be on the main bungee hub and on spigot it would be on the server itself

#

it's not supposed to make a difference to the frontend

lunar cypress
#

And what exactly is the issue with an API then

#

just have multiple implementations of it

empty flint
#

Well it is an API basically, only one internal to the plugin and thus not an API anymore

jovial warren
earnest narwhal
#

XD

#

@jovial warren you forgot to cover the footer

jovial warren
#

oh shit lol

prisma wave
#

smh