#dev-general

1 messages · Page 175 of 1

dusky drum
#

?

onyx loom
#

?solid

compact perchBOT
dusky drum
#

no idea

onyx loom
#

i think it says something about liskov in that link

dusky drum
#

i have no idea what ya talking

distant sun
#

List<> instead of ArrayList<>

onyx loom
#

its about using the most abstract version of an object possible unless needed

#

if thats the correct explanation

#

but yeah gaby ^

ocean quartz
#

Liskov, basically your contract should be with the interface
If you guys will suggest something at least explain why

obtuse gale
#

could it be kotlin and/or PDM screwing my hotswapping over?

distant sun
#

^

#

I mean, it's frosty, cant expect much 🤷

onyx loom
#

probably pdm aj kek

#

that thing broke af

prisma wave
#

now hold on just a minute

hot hull
#

Matt, assuming he did the right thing a line above, was expecting he already knew that

prisma wave
#

let's not jump to conclusions

ocean quartz
#

Definitely PDM i can see that being a problem with hot swapping

onyx loom
#

🤣

obtuse gale
#

lets jump to conclusions

#

pdm broke

#

will try without

prisma wave
#

Hotswapping with kotlin is a little bit janky sometimes

#

there's a dcevm plugin for it

onyx loom
#

hold on a minute

prisma wave
#

that you have to manually install

onyx loom
#

lets not jump to conclusions bm

obtuse gale
#

hm?

prisma wave
#

im not

dusky drum
#

i mean that List<> doesn't fix my issue.

prisma wave
#

i am speaking from experience

onyx loom
#

then dont say its kotlin xd

obtuse gale
#

whats the plugin

hot hull
#

So this is my current project structure, however IJ is not letting me create packages as you normally would in a dir thonking (Am I being dumb or?)

prisma wave
#

it probably is

#

@obtuse gale just google kotlin dcevm plugin idk

onyx loom
#

aj do u mean shadowjar?

obtuse gale
#

ah yes

#

someone will totally give it to you

ocean quartz
#

@dusky drum Check Nicole's gradient code

obtuse gale
#

yep totally

empty flint
#

So this is my current project structure, however IJ is not letting me create packages as you normally would in a dir thonking (Am I being dumb or?)
@hot hull You need to mark the directory as a source directory

dusky drum
#

@ocean quartz is it public?

onyx loom
#

how about pay $1 urself and get nitro for 3 months using xbox game pass

ocean quartz
#

@dusky drum Yeah

dusky drum
#

wat from when?

hot hull
#

Oh damn thanks Blocky

ocean quartz
#

RoseGarden

empty flint
#

Oh damn thanks Blocky
@hot hull fingerguns

obtuse gale
#

@obtuse gale DEN GIMMEEEEEEEEEE
GWchadThonkery

dusky drum
#

i mean i use yours hexutil matt, but for some reason text doesnt work i did debugging and i get all the text in console just when it gets on hologram theres like cutoff

obtuse gale
#

lemme guess you want that as well?

prisma wave
#

a wild comedian appeared

obtuse gale
#

@prisma wave This is all I could find when looking that up

#

idk if thats even relevant

prisma wave
#

oh nvm

hot hull
prisma wave
#

maybe it's not necessary anymore

obtuse gale
#

hmm

#

so its pdm

dusky drum
prisma wave
#

unlikely

ocean quartz
#

@dusky drum Oh on hologram, yeah i know why, we had that problem on Holovid
Spigot has a limit of 36 characters for entity names, you'll need NMS to bypass it

obtuse gale
#

ill try without

prisma wave
#

are you compiling the classes with IJ?

hot hull
#

Gasper, ves od koga je to ss? :p

dusky drum
#

premlez?

hot hull
#

22

dusky drum
#

??

hot hull
#

the weeb boi krusic

onyx loom
#

the weeb

dusky drum
#

eh

obtuse gale
#

are you compiling the classes with IJ?
what

hot hull
#

Can you not ping me? Thanks.

obtuse gale
#

oo external emojis work now i forgot

prisma wave
#

eg ctrl + f9 or whatever it is @obtuse gale

static zealot
#

@obtuse gale please move to #off-topic and also no pinging please

dusky drum
empty flint
#

Does build tools have an API where I could, from within kotlin, find out what the latest version of mc is?

obtuse gale
#

im changing shit, running gradle jar, pressing my keybind to reload classes i think lol

#

and i tried pressing the hammer button

#

which did nothing

ocean quartz
#

I'm pretty sure it's still limited, it's quite buggy with the api

dusky drum
#

ugh

#

i mean i make placeholder

#

so

#

i dont see a problem there

#

will do more debugging

ocean quartz
#

The problem is that colors on spigot looks like §x§0§0§0§0§0§0H§x§0§0§0§0§0§0i 2 letters and 18 characters

dusky drum
#

ye but how does the rainbow work then

ocean quartz
#

Oh it does? o.O

dusky drum
#

just my gradient doesnt want to work

#

like it just cuts off.

onyx loom
#

@hot hull can u link me to ur hex color extension function pls k thx

obtuse gale
#

how do I change the shadowjars output location? With regular gradle jar i did this jar.destinationDir(file("$rootDir/server/plugins")) i just dk how to do it for shadowJAr

dusky drum
#

Kaliber HexUtils from Matt are op :3

hot hull
#

Kali, FJ util class

#

And what Gasper said

dusky drum
#

and eso has good ones to

ocean quartz
#

Oh okay not sure then
Though i use a modified version of Nicole's HexUtils, idk where you find that class but it shouldn't exist anymore xD

dusky drum
#

xd

#

i still dont get why my text dissapears.

#

is it due to hex stuff?

onyx loom
#

thanks for the copy and paste frosty fingerguns

hot hull
#

I need to change the hex pattern

#

huh?

Could not find method compileOnly() for arguments [net.md-5:bungeecord-api:1.16-R0.2-SNAPSHOT] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

repositories {
    maven { url = "https://oss.sonatype.org/content/repositories/snapshots" }
}

dependencies {
    compileOnly "net.md-5:bungeecord-api:1.16-R0.2-SNAPSHOT"
}
dusky drum
#

update gradle hehe

hot hull
#

Using 6.5.1 so that shouldn't be an issue

dusky drum
#

hmm

hot hull
#

@quiet depot suggestions?

dusky drum
#

okay so found an issue apparently HD cant handle hex....

#

if you use default colors not the hex text size is infinity but as soon as you use hex it just breaks

hot hull
#

HD doodoo

dusky drum
#

still cuts off.

ocean quartz
#

Blame it all on spigot when ever shit doesn't work and you don't understand

quiet depot
#

try 1.16-R0.4-SNAPSHOT @hot hull

hot hull
#

Same thing

quiet depot
#

and use this

#

https://oss.sonatype.org/content/repositories/public

#

public repo instead of snapshots

hot hull
#

Still nada

jovial warren
#

@heady birch can you show me what the createAnimation (or whatever it's called, the method that needs implementation in every animation) is in MarqueeAnimation? I wanna know if this code that I'm looking at right now is just poor decompilation or the actual code you wrote lol

hot hull
#

Lemme see if I have any other bungee plugins

quiet depot
#

try using paper's repo

#

they might mirror it

#

on that note, just see if any dependencies are working

#

paste your entire build.gradle also

hot hull
#

That's the entire build.gradle for that module

#

I'll paste the global one in a sec

quiet depot
#

ok

ocean quartz
#

Instead of sonatype do mavenCentral() maybe? ;o

quiet depot
#

nah snapshots aren't on central

hot hull
#

bungee doesn't use SNAPSHOT for versioning

#

Fuck is this bs

ocean quartz
#

Oh okay

quiet depot
#

yes it does

#

oh

#

it uses both

#

yeah matt that's why md uses sonatype

#

cuz snapshots

#

although I don't know why he doesn't just use his own repo

#

or ya know, make proper releases on central

hot hull
#

Okay ye this doesn't work either

ocean quartz
#

I know right, he already pushes spigot to his own, why not bungee

quiet depot
#

what doesn't work frosty?

hot hull
#

So I use this in another bungee plugin, and it works

repositories {
    mavenCentral()
    maven {
        name = 'sonatype-oss-repo'
        url = 'https://oss.sonatype.org/content/groups/public/'
    }
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    compile 'net.md-5:bungeecord-api:1.16-R0.3'
}

Tried the same on this one, but it doesn't, guessing it's due to the modules?

jovial warren
#

@quiet depot usually you just use maven-public and it gives you both, but bungee and spigot are still using a really old version of Nexus

obtuse gale
#

bruh how tf do i change shadowjars output directory lol

#

cant find it on google anywhere

empty flint
#

I'd need a String like "1.16.2" or something

quiet depot
#

@jovial warren erm you realise bungee is literally hosted on sonatype

#

the people who develop nexus

#

I find it hard to believe that their public instance of their own software, is outdated

jovial warren
#

oh yeah it's on central

quiet depot
#

o bungee is on central too?

jovial warren
#

yeah ofc it is lol

quiet depot
#

@obtuse gale

shadowJar {
  destinationDirectory = file("$rootDir/server/plugins")
}```
#

just like the jar task

quiet depot
#

i see

jovial warren
#

only has latest though, but only specials uses old versions of the bungee API

hot hull
#

Okay so there's a few thing funky, firstly this is my build.gradle for the entire project
https://paste.helpch.at/ivuzupedif.bash (kotlin not being recognized in any of the modules so I'm assuming I'm missing something)

jovial warren
#

why are you still using 1.3.72 smh

hot hull
#

Exactly the thing I said earlier, I cba checking for updates

jovial warren
#

nah just change the version to 1.4

#

it's fully backwards compat

prisma wave
#

well not fully

hot hull
#

Doesn't matter right now

prisma wave
#

some stuff has been deprecated / removed

jovial warren
#

yeah but nobody used the old stuff, am I right lol

obtuse gale
#

ok we blamed PDM too soon

#

its not pdm 😦

onyx loom
#

omg pdm works?

prisma wave
#

what did I tell you

#

but no

onyx loom
#

i never said anything 🌚

jovial warren
#

did 1.4 actually break PDM lol

prisma wave
#

you had to go and blame me

obtuse gale
#

REEE so whats my problem lol

prisma wave
#

kind of

ocean quartz
#

I remove what i said and deeply apologize to PDM

prisma wave
#

updating to 1.4 meant that every plugin using pdm shaded the kotlin stdlib

#

but that's fixed now

#

so

#

ez

hot hull
#

So, am I missing anything?

obtuse gale
#

but that's fixed now
why fix that

#

everyone using pdm should have the stdlib

#

🙃

hot hull
#

Also another thing, my source roots keep getting "unregistered"

prisma wave
#

😳

quiet depot
#

frosty

#

or just the group?

jovial warren
#

oh god I just saw what I've got to port over next in my KiteBoard deobfuscation project lol

hot hull
#

package Piggy

quiet depot
#

good

jovial warren
#

yeah that's the group id

#

and the package

ocean quartz
#

That's the group id not the package

quiet depot
#

smh frosty

jovial warren
#

lol

quiet depot
#

i've told you off for this before

hot hull
#

bruh since when, I could've swore it legit relocated it properly -.-

jovial warren
#

me.mattstudios.mf is the package

ocean quartz
#

Yeah the packages will have mf something

quiet depot
#

matt use consistent groupids/packages smh

jovial warren
#

^

#

package should be groupid.artifactid

quiet depot
#

that's not a convention

#

but it's a nice thing to do

hot hull
#

Can y'all stop pointing out the useless shit right now

onyx loom
#

no

jovial warren
#

denied

onyx loom
#

thats what we do best 🌝

quiet depot
#

yeah anyway frosty

#

your problem is that you didn't follow papi 3 at all

ocean quartz
#

Only reason why it has utils in the group id is because of the dude that accepted my maven central application .-.

obtuse gale
#

ree hotswap no work cryingblob

quiet depot
#

most of this shit needs to be wrapped in the subprojects block

#

the reason it's not working rn is because the kotlin plugin isn't available to ur subprojects

#

because it aint being applied to them

jovial warren
#

^

quiet depot
#

and the kotlin plugin is what provides compileOnly

ocean quartz
#

I had it as mf i think and the guy was like "i made it utils so it allows more things to be posted"

quiet depot
#

do a name change then

#

mcf

jovial warren
#
plugins {
    kotlin("jvm") version "1.4.0"
}
```in your parent, ```kotlin
plugins {
    kotlin("jvm")
}
```in your children (that sounds so wrong I know but in this context it makes sense lol)
#

(also that's superior Kotlin DSL xD, for Groovy replace kotlin("jvm") with id 'org.jetbrains.kotlin.jvm')

quiet depot
#

is kotlin a keyword in the plugins block in the groovy dsl?

#

ah

#

lame

prisma wave
#

it's a function for shorthand

onyx loom
#

im still on 1.3.72 🙃

empty flint
#

Do you guys know how to use the apache commons repos in kotlin?

quiet depot
#

what do you need from commons?

empty flint
#

I am getting a java.lang.NoClassDefFoundError: org/apache/commons/cli/Options

jovial warren
#

okay @heady birch I'm starting to become seriously concerned: https://bin.bardy.me/xt48qPwu.cs (some of it is poorly decompiled I know, but decompilers aren't that bad, and that's PulseAnimation btw if you're wondering, for reference)

hot hull
#

Okay fixed all this shit, seems to work now, lemme try the bungee shit now

empty flint
#

compileOnly 'commons-cli:commons-cli:1.4'

jovial warren
#

you sure that's the right dependency?

empty flint
#

yes

hot hull
#

Okay that works now, but it still keeps unregistering my root directories??

jovial warren
#

unregistering?

hot hull
#

I mark a directory as a root source, but it keeps removing that

quiet depot
#

if it's removing it, then it's not meant to be a source

jovial warren
#

^

#

I didn't think you're even supposed to have to mark directories as root sources manually

empty flint
#

I mark a directory as a root source, but it keeps removing that
@hot hull are you marking "main" as a source root? You need a subdirectory like src/main/java or src/main/kotlin

quiet depot
#

sometimes you have to

#

generated sources for example

#

they just never work by default 😦

jovial warren
#

src/main/kotlin should be your sources directory

hot hull
#

Figured everything out now

empty flint
#

how do I package the jar file such that the main function is a top level function and not inside a class?

compact perchBOT
#
✳️ Global Multiplier Expired!

The global multiplier has ran out and has been reset!

empty flint
#

I am having problems with the manifest

onyx loom
#

rip

#

whens the next multi coming through fingerguns

#

we got a lot to get through today reversed_fingerguns

empty flint
#

So how do I package apache commons cli library into my jar with gradle?

prisma wave
#

shadowJar

empty flint
#

oh

obtuse gale
#

idk what to do about my hotswapping thing

#

Am I doing everything right lol?

hot hull
#

Looks like I haven't figured everything out yet fingerguns

empty flint
#

Hm I've seen the Class::method notation a couple of times but I don't understand when it can be used.

#

I thought it was a replacement for lambda expressions

jovial warren
#

that's a method reference

empty flint
#

but this doesn't seem to work matchResult -> matchResult.value -> MatchResult::value

jovial warren
#

not exactly how method references work

#

also value isn't a method

empty flint
#

How do they work?

#

also value isn't a method
@jovial warren it's derived from getValue() afaik

jovial warren
#

you need to reference a method that takes a parameter of the type that of the lambda thingy

empty flint
#

AAh

#

So this can't be simplified?
.map { matchResult -> matchResult.value }

jovial warren
#

like this: java myLambdaThingy -> myMethod(myLambdaThingy) becomes ```java
MyClass::myMethod

empty flint
#

got it

#

thanks!

jovial warren
#

@empty flint I swear matchResult is redundant there and can just be replaced with it

empty flint
#

ah right

#

my bad

#

the java way is still strong with me

jovial warren
#

(it is the default name for a lambda argument when there is only a single argument)

empty flint
#

sorry for the dumb questions

jovial warren
#

nah it's good

#

you'll get used to it

#

also I hope you're not calling map from Stream<> there

empty flint
#
    val matches = regex.findAll(IOUtils.toString(URL("https://hub.spigotmc.org/versions/"), StandardCharsets.UTF_8))
        .map { it.value }
        .toSet()
jovial warren
#

phew lol

empty flint
#

also I hope you're not calling map from Stream<> there
@jovial warren why not tho?

jovial warren
#

because you don't need to use stream like that in Kotlin

empty flint
#

right

jovial warren
#

anything Stream has, Iterable also has as an extension function

#

and in fact, without stream(), you can do more thingys

empty flint
#

like what?

jovial warren
#

like chunked, which will chunk a list in to chunks

hot hull
jovial warren
#

or fold, which will fold a list in to a single element

#

@hot hull sorry?

#

setCancelled?

obtuse gale
#

frcsty ur missing out on those one liner methods :((

jovial warren
#

why tf do you have getters and setters there smh

hot hull
#

Bardy, in an event context for cancel shit it's cleaner imo

jovial warren
#

lemme clean it up for you

hot hull
#

No

jovial warren
#

getters and setters are denied in Kotlin

#

@prisma wave tell him please

hot hull
#

smh, keeping the ones for cancelled, I'll yeet the message one -.-

jovial warren
#

also yeet the handler list one

hot hull
#

It's needed lol

obtuse gale
#

    private val handlerList = HandlerList()

    override fun getHandlers() = this.handlerList
    
    fun getHandlerList() = this.handlerList``` sx reckoned that was harder to read but i like it lol
jovial warren
#

no it isn't

#

getHandlers() is needed

hot hull
#

getHandlerList is also needed

jovial warren
#

then why's it not override

hot hull
#

spigot is a whore and requires it

#

Because it's not an override method

jovial warren
#

well then why's it needed?

hot hull
#

It just requires it for some fockin reason

jovial warren
#

you realise you're wrong right

#

no abstract getHandlerList there

hot hull
#

Bardy, make a new project, extend an event, don't include the getHandlerList method, and run the plugin

#

And you'll see

prisma wave
#

@hot hull disgusting

#

but also you're right

#

you need a static getHandlerList function

hot hull
jovial warren
#
class FrozenJoinEvent(
    var default: String?,
    var player: Player
) : Event(), Cancellable {

    var isCancelled = false

    private val handlers = HandlerList()

    override fun getHandlers() = handlers

    companion object {

        private val handlers = HandlerList()

        @JvmStatic
        fun getHandlerList() = handlers
    }
}
```that should do
prisma wave
#

you don't need the cancelled getters and setters

#

and yeah the handlerlist should be static

jovial warren
#

which means it needs to be in the companion object, meaning handlers also has to be in the companion object because objects can't reference instance fields

prisma wave
#

@hot hull you should implement Cancellable too

jovial warren
#

yeah just copy mine lol

#

mine:

  • Implements Cancellable? ✅
  • Has all the required methods for Event? ✅
  • Doesn't have any non-required useless disgusting getters and setters? ✅
hot hull
#

bruh Cancellable requires setCancelled -.-

jovial warren
#

Spigot is so annoying lol

lunar cypress
#

because you don't need to use stream like that in Kotlin
@jovial warren But you should use sequences, Kotlin's equivalent to streams for effeciency
or fold, which will fold a list in to a single element
same as Stream reduce

jovial warren
#

ah okay

hot hull
#

Also, how would one document shit in kotlin? or is documentation non existant fingerguns

prisma wave
#

Kdocs

jovial warren
#

documentation uses KDocs

#

which uses Markdown rather than HTML

#

so all the shit you're used to like writing <p>, <h1>, etc.? gone

#

{@code Class} and {@link Class}? replaced with [Class]

prisma wave
#

sequences should only be used for chained operations that don't require random access

#

not really worth it otherwise

jovial warren
#

Kotlin is already rapid fast as it is anyway, isn't it?

prisma wave
#

i mean

#

it's as fast as java

#

with some small overhead sometimes

jovial warren
#

¯_(ツ)_/¯

lunar cypress
#

sequences should only be used for chained operations that don't require random access
@prisma wave when do you ever need random access in sequence transformation

hot hull
#

Another slightly related question, so I have an event (the above one) which I fire normally when a player joins, then have a seperate listener which listens to my event, should I now have another event called a MessageResponse or some shit, which gives info on what format/motd/all the excess shit was applied to the user?

prisma wave
#

well exactly

jovial warren
#

not an event I'd say

hot hull
#

Suggestions bardy?

lunar cypress
#

also most Iterable extensions just return Iterables as well so you don't get random access there either

jovial warren
#

🤔

hot hull
#

my brain ain't large enough for this fingerguns

jovial warren
#

neither is mine

prisma wave
#

List.filter and things return Lists

lunar cypress
#

still it is absolutely worth it to use sequences when you do multiple transformations

jovial warren
#

is it though

prisma wave
#

yeah it is

lunar cypress
#

reduces both memory and time complexity from O(xn) to O(n) where x is the amount of transformations

jovial warren
#

nice

hot hull
#

So anyone big brain enough to give me suggestions on this?

old wyvern
#

Wouldnt x be a constant in most cases unless you for some reason loop the function or something?

prisma wave
#

yeah it is a constant

#

so in terms of complexity it wouldn't matter, but it would still be a speed diff

old wyvern
#

So that would mean both are O(n)

#

Mhm

hot hull
#

nvm

lunar cypress
#

So that would mean both are O(n)
@old wyvern still significant

old wyvern
#

Mhm

lunar cypress
#

and whether it is a constant or not depends on how you look at it

old wyvern
#

As I said

#

Normal use case

lunar cypress
#

one scales with the amount of transformations, the other does not

old wyvern
#

That doesnt affect time complexity

#

It depends on whether the amount of instructions change depending on input

lunar cypress
#

which can be the case

old wyvern
#

Even tho sequences do lesser amount than streams, in case of time complexity both represent the same

lunar cypress
#

even disregarding complexity theory the practical overhead you have in one situation gives you no benefit whatsoever

old wyvern
#

Yea

hot hull
#

Does WorldGuard have an api?

ocean quartz
#

I think so

hot hull
#

Ah okay found it, doesn't seem to be mentioned on it's page

frail glade
#

Yurr

jovial warren
#

also btw @hot hull , looks like if you just put the handlerList value in the event's companion object and annotate that with @JvmStatic, that seems to do the trick

#

instead of having to make an ugly getter for it, which is done internally by Kotlin

hot hull
#

cool

jovial warren
#

I found that out by looking at events in VoteParty

#
class FrozenJoinEvent(
    var default: String?,
    var player: Player
) : Event(), Cancellable {

    private var isCancelled = false

    override fun isCancelled() = isCancelled

    override fun setCancelled(cancelled: Boolean) {
        isCancelled = cancelled;
    }

    override fun getHandlers() = handlerList

    companion object {

        @JvmStatic
        val handlerList = HanderList()
    }
}
```should do the trick
hot hull
jovial warren
#

haha

#

yeah the WorldGuard API is very limited in the sense of events

hot hull
#

Not sure if it's worth making my own event

jovial warren
#

making your own WG event?

hot hull
#

Region switch event

jovial warren
#

how are you gonna call it?

old wyvern
#

Isnt there a worldguard extension for that?

hot hull
#

for events?

old wyvern
#

I assume it includes the events too?

winter wren
#

can someone help me with luckperms?

old wyvern
#

Not sure

hot hull
#

I'll check

winter wren
#

Can someone help me with luckperms the prefixses dont show lol

prisma wave
old wyvern
hot hull
#

Sheesh

jovial warren
#

but then that means you need an extra dependency

hot hull
#

Yea, still gonna make my own

jovial warren
#

wouldn't be surprised if you needed to do some funky reflection shit to make it work lol

hot hull
#

Not gonna bother with lower versions for the extra shit

#

The base plugin will work 1.7-1.16, just the extra shit might not, and I honestly don't care :p

jovial warren
#

if you don't use NMS for the extra stuff then it'll work because of Spigot's compatibility layer

old wyvern
#

onCrossBoundary

jovial warren
#

also @hot hull wtf is that README lol

#

from the commits it looks like that's @quiet depot 's doing

hot hull
#

Shut up, it's beautiful

onyx loom
#

^

jovial warren
#

it's awful

onyx loom
#

its great 😍

jovial warren
#

funny, but awful

ocean quartz
#

Which read me?

jovial warren
#

FrozenJoin README

ocean quartz
#

It's beautiful 🥺

empty flint
#

How do you print to System.err stream without usind System.err?

#

printErr or something similar?

hot hull
#

(I still need to comment the RegionListener shit)

empty flint
#

What's that for? Freezing players when they join?

hot hull
#

What a comedian

jovial warren
#

cough no code in common yet cough

#

also if you're making a multi-module project then check out Koin

#

(it's a Kotlin DI library, it'll make your life 10x easier, trust me)

hot hull
#

Yea I've got a quick question how do I actually access shit through the modules?

jovial warren
#

I'd suggest using dependency injection for that, like I said

prisma wave
#

wdym accessing shit

#

Oh

jovial warren
#

when I get Punishments 1.0-SNAPSHOT rolled out (working on it now so shouldn't be too long lol), you can use that as an example 🙂

hot hull
#

accessing a class in my spigot module from the common module, cause normally I can't

prisma wave
#

Make both the other modules depend on the common mobile

ocean quartz
#

Think of each module as a different gradle dependency, you add it as a dependency and get stuff from it

prisma wave
#

implementation project(':common')

hot hull
#

I see

jovial warren
#

actually ya know what, I'm gonna stream it in VC lol

#

because why not lol

hot hull
#

1 class in common now Bardy, I hope you're satisfied fingerguns

jovial warren
#

lol

empty flint
#

this is java code:

var bytes = ByteArray(1024)
    while((bytes = inputStream.read(bytes, 0, bytes.size) != -1) {
          
    }

How do I kotlin-ify the assignment in the while?

prisma wave
#

You don't

#

assignment isn't an expression but also that's not idiomatic usage

#

InputStream.readAllBytes() exists

hot hull
empty flint
#

I know but it halts the execution too long. I want to make a progress bar in the console while it's downloading the file

#

Can I cast an input stream to a byte array input stream?

prisma wave
#

no

#

Not necessarily

jovial warren
#

@hot hull I'd make a Listener interface in your common (or something similar), make all listeners implement it, then wrap the bukkit/bungee listeners in their respective implementations and use reflection to register them

#

if that makes any sense lol

hot hull
#

reflection tho GWvertiPeepoSadMan

prisma wave
#

@hot hull vague function names, mutability that could be avoided

hot hull
#

Yea already fixed the mutability

prisma wave
#

Unnecessary type specification

hot hull
#

vague function names tho, wut?

prisma wave
#

isWorldGuard() : Unit

#

Doesn't represent what the function is actually doing

hot hull
#

registerWorldGuard()
better?

prisma wave
#

I guess

#

Seems like the listeners could be objects

jovial warren
#

^

hot hull
#

Only PlayerListener can be for now, the rest aren't done and won't be able to be

prisma wave
#

Also doesn't WorldGuard.getInstance return the plugin?

hot hull
#

Indeed it does

prisma wave
#

So you could just use the worldGuard variable

hot hull
#

However, would that not lead to an npe if it were not installed?

prisma wave
#

No

#

You return if it's null

hot hull
#

(Since type apparently can't be null)

#

Yea says WorldGuard will never be null

prisma wave
#

in the first null check?

hot hull
#

mhm

prisma wave
#

Ss?

hot hull
#

Okay yea ignore my dumbass

prisma wave
#

🙄

#

Also

#

It's Registerable instead of Registrable

hot hull
#

For that I blame IJ

prisma wave
#

I don't

empty flint
#
        var sum = 0
        var byteLength = stream.read(it)
        while(byteLength != -1) {
          sum += byteLength
          println("$sum of $totalBytes bytes downloaded...")
          outputStream.write(it, 0, byteLength)
          byteLength = stream.read(it)
        }

How about this, Mitten?

#

can I simplify such a while loop?

prisma wave
#

:/

#

imperative code in kotlin is pretty messy imo

#

also

#

weird variable names

#

in fact

#

what's even going on here?

#

byteLength = stream.read(it)
sum += byteLength

#

that's also going to extremely spam the console

hot hull
empty flint
#

clean as shit

#

hot damn

#

that's also going to extremely spam the console
@prisma wave That was just temporary before I set up the progress bar. I wanted to make sure it worked

#

byteLength = stream.read(it)
sum += byteLength
@prisma wave I got rid of the sum, that was just for testing. the byteLength is the number of bytes read from the stream into 'it' (the buffer)

#

imperative code in kotlin is pretty messy imo
@prisma wave I know but idk how to make it declarative

#
    url.openStream().use {stream ->
      var pBar = ProgressBar("Progress:", totalBytes)
      ByteArray(1024).also {
        do {
          val bytesReadCount = stream.read(it)
          pBar.stepBy(bytesReadCount.toLong())
          outputStream.write(it, 0, bytesReadCount)
        } while(bytesReadCount != -1)
      }
    }

wdy think?

faint bobcat
#

hey guys, those who use kotlin, is it me or do i always get a strange feeling whenever i write kotlin code? i feel like it's so high-level that i can't control everything (unlike java for example, more verbose but satisfies my control-freak feelings)?

#

like i'm obsessed with kotlin's coroutines but i still feel like that knot in my stomach

empty flint
#

@faint bobcat I guess that's the point of declarative coding like kotlin tries to encourage. You give up control for readability.

ocean quartz
#

I don't think i ever felt like i could control more code in Java than in Kotlin, it's more the other way around imo
For example internal access modifier and things like that, that Kotlin provides

prisma wave
#

Kotlin is no higher level than Java

empty flint
#

Hm I can't use Kotlin's use { } with AutoCloseable...

prisma wave
#

It just has more support for declarative code

empty flint
#

Bummer

#

oh wait

#

I should be able to

#

why won't it compile then

prisma wave
#

Code & error?

empty flint
#

but this says AutoClosable

prisma wave
#

It might be because you've imported the one for Closable instead

empty flint
#

Ah right, I need both

#

crap

#

How do I import both?

#

Or can't I?

#

And the import doesn't show in the imports section at the top of the file

hot hull
#

@ocean quartz Any way to make command permissions customizable?

empty flint
#

Import alias doesn't help either

hot hull
#

(Using the annotations, otherwise imma just handle it myself)

ocean quartz
#

What do you mean by customizable? ;o

hot hull
#

Well I mean customizable by the end user, as in being able to be assigned from a file

ocean quartz
#

Oh, hmm i don't think so
Can't think of any way to make that possible

distant sun
#

@ocean quartz same thing you do for messages and completion maybe?

faint bobcat
#

getCommand("...").setPermission()?

hot hull
#

No worries then, I'll handle it myself

#

Have you fixed aliases by any chance? 😏

ocean quartz
#

With like ids?
Is it worth it though?

#

I am currently rewriting it

#

So any suggestions i am up for it

distant sun
#

nah

#

there's a very few cases where you would like the permission to be edited by the end user

hot hull
#

Yea, not worth it fingerguns

empty flint
#

Damn allmann looks ugly in some cases...

ocean quartz
#

oh no

empty flint
#

Hey I'm still using it tho

ocean quartz
#

There is some fanatic lovers of it here

hot hull
#

Did you say crusade time?

ocean quartz
#

I have a problem with allman on a few cases, where i think it's quite ugly

distant sun
#

Everytime*

lunar cypress
#

I think it's always ugly and I find it funny that so many people here use it

distant sun
#

^

ocean quartz
#

Like

async()
{
            
}

Over

async {
            
}
lunar cypress
#

Like where did you get this from? Have you all been doing c# before?

ocean quartz
#

Idk i'm assuming most got it from Sx

distant sun
#

^

ocean quartz
#

Like in K&R you are reading from left to right you find a bracket and you know it starts a block
In allman the block starts in the line under, it's odd

onyx loom
#

if were starting a circlejerk friendly debate for which is better, can we have a multi spin first 🌝

ocean quartz
#

Yass

#

Did you get your second one already?

onyx loom
#

na

ocean quartz
#

I have two pending as well

onyx loom
#

ig we gotta wait for glare

prisma wave
#

in K&R it's not clear where a block starts and ends

#

in allman it is

#

therefore good

ocean quartz
#

Personally think it's the other way around

onyx loom
#

^

prisma wave
#

the braces aren't aligned

#

so you have to read up manually to find where the block starts

onyx loom
#

when ur reading left to right, then u gotta look on the next line to find where the block starts

#

but i find it easier to find where the block ends in allman tbh

#

because of the alignment

prisma wave
#

in k&r you have to read the entire line to find where the block starts

#

in allman it's explicit

onyx loom
#

if were starting a circlejerk friendly debate for which is better, can we have a multi spin first 🌝
@onyx loom 🌝

ocean quartz
#

Yeah i wanna wait for multi to start debating as well xD

prisma wave
#

shut up moon

#

i hate you

onyx loom
#

🌝

#

.

jovial warren
#

@prisma wave apparently you mentioned a while back that getOfflinePlayer will query the Mojang API to find the player if they've never logged in before, however, I've looked through CraftBukkit code and can't find where it does this

#

any ideas where the code that does this is?

lunar cypress
#

I think it queries as soon as you access the name or something, not when you call that method

#

Iirc

jovial warren
#

wat

#

I mean if it actually does that, it'll be really handy for my project since it means that I don't have to query the mojang API myself

prisma wave
#

you don't

#

idk where it does it

#

but it says in the docs that it will

prisma wave
#

nah

#

it's in getOfflinePlayer somewhere probs

old wyvern
#

but it says in the docs that it will
Doesnt it say that it just wont be null?

prisma wave
#

it says something about a blocking web request iirc

old wyvern
#

Oh

jovial warren
#

that's deprecated though

#

because apparently "names aren't unique past a single session any more"

empty flint
#

how do I create a gif like Matt did for his gradient progress updates here

onyx loom
#

sharex?

#

gyazo

#

etc

empty flint
#
    output.also {
      ProgressBar.wrap(
        url.openStream(),
        ProgressBarBuilder()
            .setTaskName("Progress: ")
            .setInitialMax(totalBytes)
            .setUpdateIntervalMillis(50)
            .showSpeed()
            .setUnit("KB", 1024)
            .setStyle(ProgressBarStyle.COLORFUL_UNICODE_BLOCK)
            .setConsumer(CustomProgressBarConsumer())
      ).use {
        output.writeBytes(it.readAllBytes())
      }
    }

clean...

ocean quartz
#

I used sharex yeah

onyx loom
#

sharex good

#

gyazo bad

remote goblet
#

I gotta use sharex

empty flint
#

I used Gyazoo and hated it

#

Gonna try Sharex

jovial warren
#

ShareX is nice but it doesn't have Linux support so I use Flameshot

steel heart
#

Temviewer

jovial warren
#

wat

onyx loom
steel heart
jovial warren
#

you're mental lol

steel heart
#

Yep I do follow that Indian guy on yt as well

jovial warren
#

wat

steel heart
#

Also I like Eclipse

jovial warren
#

yep, crazy

onyx loom
#

eclipse do be 🔥

jovial warren
#

lol

#

@heady birch I hope you see my previous message about PulseAnimation and the message before that before I go to bed lol

#

because I really don't think this code is right

#
switch(variable.hashCode()) {
    case 104256825:
       // do thingys
}
```basically what the code that I'm looking at right now looks like just a lot worse
#

this has to be poor decompilation

prisma wave
#

afaik that's what string literals in switches compile to

jovial warren
#

string literals?

onyx loom
#

yea they do bm

jovial warren
#

what do you mean by string literals?

prisma wave
#

"blah"

onyx loom
#

in a switch it can only be "gfkdoj"

jovial warren
#

ah okay

onyx loom
#

or enums etc

jovial warren
#

so just strings then

onyx loom
#

basically yea

#

think of it as a BTEC when expression 🌚

jovial warren
#

lol

#

yeah I know what a switch is, I just didn't recognise the term "string literal"

#
case 104256825: {
    if (lowerCase.equals("multi")) {
        n = 0;
        break;
    }
    break;
}
```yeah you two are right
prisma wave
#

to elaborate switch statements can only use compile time constants

#

which literals are

jovial warren
#

ah okay

#

whereas when statements can use anything 😎

#

why are switches so trash btw?

onyx loom
#

because java 🌚

prisma wave
#

i mean

#

they're no different to any other switch statement

jovial warren
#

I've got more code for you to examine btw

#

but it's a bit bigger than last time so bin it is

#

first of all, what is Label_2081?

#

I mean, I can figure out what the rest of it is pretty easily because I have context, but it's still very messy

prisma wave
#

labels

jovial warren
#

what is a label?

#

well, what is it in Java?

#

I didn't know Java had labels

prisma wave
#

the same as it is in kotlin

jovial warren
#

are they something that the compiler writes in or what?

prisma wave
#

sometimes

#

using them is kind of an anti-pattern

jovial warren
#

why?

prisma wave
#

makes messy code

#

same in kotlin

#

if you need them, you're doing something wrong

jovial warren
#

wow

#

I use them in Octo because I have a foreach inside of a foreach and I need to distinguish which one to return to lol

prisma wave
#

messy

jovial warren
#

I mean, that's not even the worst part of it lol

#

it's just overally horrible

#

look at that function

jovial warren
#

@prisma wave okay this is bad decompilation right: ```java
list.add(normalColor + text.substring(0, max) + startColor + text.substring(Math.min(Math.max(max, 0), max), Math.min(n, text.length())) + middleColor + text.substring(n, Math.min(Math.max(i - 1, 0), text.length())) + endColor + text.substring(Math.max(Math.min(i - 1, text.length()), 0), Math.min(i, text.length())) + normalColor + text.substring(Math.min(i, text.length())));

#

I hope so lol

#

(that's a single line, also the named variables you see in there are the result of me deobfuscating them lol)

empty flint
#

is it just me or does BuildTools require Java8 specifically and won't build with Java11?

jovial warren
#

it requires Java 7 or Java 8

#

it will not build on any version before or after that

empty flint
#

Bummer

jovial warren
#

yeah I know

empty flint
#

I'm trying to automate the process

#

but my java is Java 11

jovial warren
#

but hey, that's md_5 laziness for ya

#

instead of making BuildTools compatible with Java 11, he just makes it not work with Java 11

empty flint
#

So now I gotta figure out how to find a Java8 executable on a system

#

shit

#

And this is where Java becomes OS dependent

#

lol

jovial warren
#

Java isn't OS-dependent...?

#

actually yeah ik what you mean

#

e.g. my Java 8 executable is located in /usr/lib/jvm/java-8-openjdk/bin/java

#

but even different JDKs may be located in different places

#

like OpenJDK, Oracle JDK (normal JDK), etc.

#

@empty flint simple fact is: you don't

#

you either migrate your project to Java 8, or modify BuildTools to work with Java 11

#

also why do you want to automate the BuildTools process?

empty flint
#

no the thing is I have to start a new java process to execute the BuildTools jar, right?

#

I can essentially only do that reliably using the command line.

#

If JAVA_HOME is set to another JDK, then java -jar will not execute as Java8...

#

I would have to call the process using the full path to the java executable

#

but I think I'll just say fuck it

jovial warren
#

no way to figure out where people's Java 8 is

#

if they even have Java 8 installed

empty flint
#

on windows I can

#

you can look it up in the registry

#

I found a program for it

jovial warren
#

but what about on Mac? or Linux?

#

if you say "fuck Linux" you can get out

empty flint
#

but I want this to work on Mac and Linux as well and at least the first one I can't test for sure becaue I have no Mac

#

The second one would be a hassle for me, I'd have to set up a complete linux dist just to test this

jovial warren
#

I'm using a Linux system so if you give it to me I can try and run it on here

empty flint
#

so I think I'll just say fuck it, if the java process isn't J8 then I'll have the user set the path to their java executable in the parameters

jovial warren
#

(I use Linux because Windows sucks for development lol)

empty flint
#

(I use Linux because Windows sucks for development lol)
@jovial warren I mean I've been doing fine with it

jovial warren
#

yeah but you haven't needed to use command-line yet

empty flint
#

And I grew up on Windows. The difference is minimal if you don't want to really dive deep into the OS

#

yeah but you haven't needed to use command-line yet
@jovial warren I use it regularly

jovial warren
#

I grew up on Windows as well, but I learnt how to use Arch Linux

#

And I grew up on Windows. The difference is minimal if you don't want to really dive deep into the OS
second point is debatable

empty flint
#

The new windows PowerShell is quite alright

jovial warren
#

yeah PowerShell isn't bad

#

you haven't tried installing Gradle yet either

empty flint
#

Well in terms of usability. As a standard user you can do pretty much everything except Windows has tons more support and online help because it's just more widely distributed and an actual company's revenue depends on their customer service

#

you haven't tried installing Gradle yet either
@jovial warren Installed it multiple times actually

#

Not a problem

jovial warren
#

manually?

empty flint
#

well yeah

jovial warren
#

so you have to:

  • Download the ZIP
  • Make the directory
  • Put the files in the directory
  • Add it to path
#

I have to: run the command sudo pacman -S gradle, put in my password, press enter, and done

#

a package manager is something that all operating systems have, and for Windows, it's still in development

#

also does Windows have the versatility of a Linux system? e.g. can you change literally anything in Windows? no you can't

#

e.g. you can't install whatever file manager you want, you're stuck with File Explorer, you can't install whatever DE/WM you want, you're stuck with Explorer, you're forced to use all the Windows built-in proprietary stuff

#

and sometimes it's pretty trash

#

Linux being better than Windows for developers is just a fact

empty flint
#

I'm not denying it is

jovial warren
#

you just want evidence, or are curious about why

#

or are just saying why you use Windows

empty flint
#

I'm just saying the difference is minimal if you don't dive deep into the OS itself. For Java/Kotlin Development in IntelliJ it makes 0 difference essentailly

jovial warren
#

yeah true

empty flint
#

Doesn't matter why I use windows, it's just convenience

jovial warren
#

yeah fair enough

empty flint
#

Too lazy to learn the intricacies of linux and what to do when things go awry

#

just stuff I learnt about windows through years of breaking it and repairing it

#

I'm using a Linux system so if you give it to me I can try and run it on here
@jovial warren I will take you up on that offer, let me just finish it up and I'll let you test it on linux 🙂

jovial warren
#

alright 👍

empty flint
#

ayyyy

#

Downloading and running build tools from within IntelliJ

jovial warren
#

what are you using buildtools for btw?

#

it should be NMS and only NMS (depending on spigot or craftbukkit)

#

you can find spigot-api in the Spigot Maven repo

empty flint
#

where would you get the spigot jar to run your own server locally?

#

How do you test the code?

jovial warren
#

oh I just download it from getbukkit lol

empty flint
#

eh well

jovial warren
#

a website that's somehow still going

errant geyser
#

I used to, but guys, I don't recommend it

empty flint
#

it should be NMS and only NMS (depending on spigot or craftbukkit)
@jovial warren Also, I am using all NMS versions since 1.12.2 in one of my plugins

#

I used to, but guys, I don't recommend it
@errant geyser recommend what?

errant geyser
#

I'm friends with a mod on their discord, they have a lot of shady stuff going on, at one point they tampered with the jars.

#

GetBukkit

jovial warren
#

lol

empty flint
#

tampered with the jars?

#

In what way?

#

I mean that's why you always check the checksum

errant geyser
#

The hashes and file sizes were different

#

I never bothered to check what it actually was

empty flint
#

hmmm

errant geyser
#

Not saying they still do that, cos last I checked they don't, but at one point it was happening

empty flint
#

Doesn't matter to me anyhow

#

never used it

#

BuildTools ftw

#

@jovial warren The real reason I'm doing this is so I can set up an environment in IntelliJ where I want to test a plugin and it automates the whole thing. If a server exists, I use it, if it doesn't, I download and create it and THEN I use it.

#

Testing for different versions is a pain...

errant geyser
#

I kinda wanna write an IJ plugin to automate that, ngl

empty flint
#

Wanna work together on that?

errant geyser
#

You ever made one before?

empty flint
#

I got half the server download and build down

#

You ever made one before?
@errant geyser I never made something before I eventually made it

errant geyser
#

Damn, thats pretty cool. Ive set up a plugin project before but never actually made it into something.

#

Sure, if u wanna work together, why not. Its midnight for me, so ima get some sleep for now

#

👋

empty flint
#

yeah 1am here as well

#

we can discuss it tomorrow 🙂

errant geyser
#

Sure

empty flint
#

just tested, buildtools downloaded, spigot downloaded and built. now just need to run spigot

#

This'll be fun 😄

#

Good Night guys!

jovial warren
#

good night

jovial warren
#

also, @ocean quartz , surprise

#

really not sure if this one's gonna get PR'd because there's potentially breaking changes with my new exceptions but eh, I think it's a good idea

prisma wave
#

Small commits > 1 big commit

jovial warren
#

Yeah true

#

I'm not good at splitting commits up lol

ocean quartz
#

Yeah won't accept since doing a rewrite
Also i had a reason to not have multiple exceptions, makes it smaller and basically one exception with explanatory text did the same job

quiet depot
#

^ this is the exact reason why I discourage prs on wip projects, or even close source them (e.g. papi 3)

#

it sucks to put effort into a pr, and have it ignored because the dev is doing a rewrite

jovial warren
#

¯\_(ツ)_/¯

#

Eh, doesn't bother me all that much, was a bit rushed tbh

#

I am curious on how you plan to abstract with JDA in the rewrite though

#

Actually, I am curious on how you plan to abstract at all, since the user will want access to every method in each thingy

prisma wave
#

Magic

jovial warren
#

Nah I'm just curious so I can steal it cough sorry what

#

xD

#

@quiet depot in my case, I didn't put much effort in to it and I wasn't all that bothered about it either, but your point is still a good one

soft remnant
#

Hi, it's my first time using an extension called "JavaScript" from placeholderapi, and I was wondering if you can do something like this

#
var count = PlaceholderAPI.static.setPlaceholders(bungeecord, "%bungee_Survival%");
var count2 = PlaceholderAPI.static.setPlaceholders(bungeecord, "%bungee_Lobby_001%");

function globalCount(){
    return count + count2;
}

globalCount();
#

I received this error, I guess I need to add or add some kind of "dependency" or something to the script.

[PAPI] [Javascript-Expansion] An error occurred while executing the script 'example':

#

I clarify, that I do not know much about JavaScript.

#

What I would like to do is that I have 3 BedWars Lobby's and I am making a menu, and in that menu I am showing the players connected in that mode, and I would like JavaScript to add the players of the 3 lobby's

hot hull
#

You can just use the math expansion for that, and that won't work

soft remnant
#

oh

hot hull
#
var survival = "%bungee_Survival%";
var lobby = "%bungee_Lobby_001%";

function globalCount() 
{
  return survival + lobby
}
globalCount();
regal gale
#

Not a fan of
{
}

#

👀

hot hull
#

Good thing noone asked angry_fingerguns

regal gale
#

I usually do it like this lol

#
var survival = "%bungee_Survival%"
var lobby = "%bungee_Lobby_001%"

survival + lobby```
#

Still works, but meh

hot hull
#

Doubt he's using your js expansion

soft remnant
#

xd

soft remnant
#

thx @hot hull n.n

#

sorry for ping xd

hot hull
#

Just use
%math_{bungee_survival}+{bungee_Lobby001}[precision:0]%

soft remnant
#
var bedwars001 = "%bungee_BedWars_001%";
var bedwars002 = "%bungee_BedWars_002%";

function globalCount() {
    var total = parseInt(bedwars001) + parseInt(bedwars002);
    return parseInt(bedwars001) + parseInt(bedwars002);
}

globalCount();
#

I had to do this, because as you told me before it concatenated me instead of "add"

regal gale
#

You could just remove the total variable line 🤷

soft remnant
#

xd

#

wait

regal gale
#

Or you could just use math expansion like Frcsty said many times earlier

soft remnant
#

the variable, is because I'm looking for a way to add what he told me frosty

regal gale
#

?

soft remnant
#

there edit my message, excuse my english.

#

finish

#

thx 😄

#

in DeluxeMenu, can I still add js in command execution parameters?**

hot hull
#

Yes

soft remnant
#

nice

#

Thanks for the help, they are the best!

hot hull
#

I love you @ocean quartz

component.sendMessage(player);

component.sendActionBar(player, fadeIn, stay, fadeOut);
component.sendSubTitle(player, fadeIn, stay, fadeOut);
component.sendTitle(player, fadeIn, stay, fadeOut);
errant geyser
#

We all love Matt

obtuse gale
hot hull
#

@quiet depot I could use a hand cause I'm lost, when I try to build the project I get this:

Cannot resolve external dependency org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.72 because no repositories are defined.
Required by:
    project :

I've no idea what in the bejesus it means by that tho, here's my main build.gradle
https://github.com/Frcsty/FrozenJoinGlobal/blob/master/build.gradle

quiet depot
hot hull
#

Yea it don't work, anyhow any clue on my issue?

quiet depot
#

archiveFileName.set("")

#

and erm

#

still looking

heady birch
#

i found an issue

hot hull
#

I copied it from papi, not sure if I missed anything tho

quiet depot
#

archiveFileName is a Property<String> right?

heady birch
#

you appear to be using gradle (assume that was a mistake)

hot hull
#

Niall

#

Leave

quiet depot
#

cuz then it'd be applied on bungee too

#

and that don't make much sense

hot hull
#

It shouldn't no

quiet depot
#

btw if your subproject doesn't have any manual configuration to do in build.gradle

#

simply don't include the file

#

it's not needed

#

(talking about common)

hot hull
#

It doesn't right now, just have it there when I need it

quiet depot
#

ah

#

kotlin plugin seems to be incompatible with this setup

#

add the kotlin dependencies manually

#

do the normal notation for each kotlin dep

#

seems the kotlin plugin registers it's own implementation configuration, which isn't accessible when in the subprojects block

#
dependencies {
    val implementation by configurations
    implementation(kotlin("stdlib-jdk8"))
}```
seems you can make it accessible like that
#

but that's kotlin dsl, not groovy

#

idk what the corresponding code would be

hot hull
#

Yea I've no idea

hot hull
#

@prisma wave Can you gimme a hand .-.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':compileKotlin'.
> Could not resolve all files for configuration ':kotlinCompilerClasspath'.
   > Cannot resolve external dependency org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.72 because no repositories are defined.
     Required by:
         project :
quiet depot
#

did you try what I suggested (manual deps)?

hot hull
#

Yes

quiet depot
#

show me

prisma wave
#

why's it even depending on the compiler?

hot hull
regal gale
#

Ok now it's time for me to test graaljs for my js eval

obtuse gale
#

Still got this hotswapping problem angry_fingerguns

regal gale
#

Took a while though

#

With GraalJS

quiet depot
#

did you actually use graalvm, or are you just using graaljs over openjdk?

regal gale
#

Just the maven repo

empty flint
#

So in Kotlin

#

is the idea that top level functions are bad like in Java or should I use them wherever I can and it wouldn't make sense to create a class just to make a single method wrapper class?

prisma wave
#

they are by no means bad

#

And they're not a thing in java?

#

you should use them as a rough equivalent to util functions

#

But not exclusively

#

but yes, creating a single method wrapper class is dumb

#

Especially considering extension functions exist

quiet depot
#

Just the maven repo
@regal gale so I'll take that as graaljs over openjdk, fyi performance is trash on the openjdk. Use graalvm if you care

regal gale
#

I will consider that later...

#

It's just a temp

jovial warren
#

@heady birch just no lol

#

also, been looking for you

hot hull
jovial warren
#

@quiet depot wait OpenJDK performance is trash? I just use it because I use Linux and it's kinda standard lol

quiet depot
#

no

lunar cypress
#

no it's not

quiet depot
#

openjdk is fine

#

graaljs on the openjdk is not

jovial warren
#

ah okay

dusky drum
#

i love how spigot doesnt like my webserver and it just doesnt load images..

jovial warren
#

what's your web server?

dusky drum
#

click open original

#

to get to page

old wyvern
#

ssl

dusky drum
#

so spigot hates ssl?

old wyvern
#

no

#

You dont have one

jovial warren
#

^ that'll be it

dusky drum
#

well

#

works with other server

jovial warren
#

that doesn't have SSL

dusky drum
#

ye

old wyvern
#

🤷‍♂️

dusky drum
#

but works?

jovial warren
#

Spigot probably has a very strict policy

dusky drum
#

or my webserver is blacklisted on spigot or wia versa

jovial warren
#

¯_(ツ)_/¯

#

what web server are you running?

quiet depot
#

why don't you have sl?

dusky drum
#

idk its some webhosting stuff i ordered pretty cheap

#

i didnt enable ssl on that domain

jovial warren
#

ew web hosting

dusky drum
hot hull
#

disgusting

dusky drum
#

but it still doesnt work

#

gonna stick with contabo host for spigot then

#

hehe it works

#

oh and btw i have ssl on other domain to it just doesnt auto redirect

hot hull
#

If that has a dependency for holograms, ew

dusky drum
#

?

jovial warren
#

it almost certainly depends on HD, no one does that themselves lol

hot hull
#

I do :((

dusky drum
#

i dont want to deal with nms for more than 32 chars?

hot hull
#

HD is annoying cause it flickers if you update a hologram

#

And it's disgusting

jovial warren
#

^

dusky drum
#

i dont update holograms i delete them after 5 secs?

jovial warren
#

and then recreate them?

dusky drum
#

well

#

its like if player shift clicks on crop it shows crops info

#

after 5 secs hologram gets removed

#

so

hot hull
#

Ah I see

jovial warren
#

I'd just do the NMS myself, it's actually really easy if you do it right

dusky drum
#

eh

#

since everyone nowdays has hd i dont realy care

jovial warren
#

you just get packets, update fields using reflection, and put them back in

hot hull
#

It'll probably also be more efficient

dusky drum
#

i have that just for looks

jovial warren
#

@heady birch does this really well in KiteBoard (he's probably not sharing though lol)

dusky drum
#

he has holos in kiteboard?

jovial warren
#

no, but he has scoreboard NMS

dusky drum
#

oh

jovial warren
#

still NMS

dusky drum
#

i think tab also has nms

jovial warren
#

he basically has an Adapter interface with loads of methods in it, and makes an adapter for each version which he supports where he implements and makes the NMS for those methods

#

and then you can just call methods from the interface and it does the rest itself

dusky drum
#

the TAB (a.k.a Tab Reborn)

jovial warren
#

TAB?