#dev-general

1 messages · Page 592 of 1

obtuse gale
#

Lol

#

Correct

foggy pond
#

Ookay

wintry plinth
#

with a plugin as large as LP, I wonder how long it usually takes to compile

#

running gradlew build will not add it to my maven repository right? Just compile a jar?

#

Similar to how maven package creates a jar only, whereas mvn install adds it to my repo

obtuse gale
#

Correct

wintry plinth
#

ah lit, i always hate that with maven

#

ik it has a purpose

obtuse gale
#

Well unless the build tasks group also has it so it installs to local lol but it doesn't by default, no

wintry plinth
#

ahh aha, so ran luckperms fresh took 1m 47s, i assume running again will take much less time?

obtuse gale
#

Running it again without cleaning will likely be sub 5s (given LPs size...)

#

Gradle does an amazing job at incremental builds

wintry plinth
#

I got to admit

#

this is crazy that incremental shit is small

#

because maven would do entire cycle again, right?

#

so in this case, another ~2 mins

obtuse gale
#

Wow

#

Yeah

wintry plinth
#

im mind blown that gradle does luckperms in 2mins, considering it supports a fuck ton of stuff

obtuse gale
#

Maven has 0 support for incremental builds so yeah lol

wintry plinth
#

lol really? Can't lie, I am genuinely impressed, I have only dived into gradle a tiny bit, so not that knowledable

#

but thats crazy

obtuse gale
#

Gradle is a whole universe to learn

#

It's huge

#

I think there is a maven plugin for IB but it never left out of alpha stages

wintry plinth
#

I have a good few projects I wanna migrate, majority will prob be easy, as they dont need shading

static zealot
#

shading ain't that hard to do with shadowjar

obtuse gale
#

IMO very interesting stuff to read

wintry plinth
#

oh really? I have a huge pom from my old spoof plugin, i wanted to gradle convert it, but its huge

#

thats my only frightening one

#

and will read that now

#

Is multi-module stuff easy to do with gradle? One old project is module based, just realised 😂

obtuse gale
#

Yeah it's not hard I reckon

wintry plinth
ocean quartz
#

I find it much simpler in gradle than maven
Create a folder add build.gradle.kts, go to settings.gradle.kts, include("folder") refresh and boom you have module

wintry plinth
#

wtf

#

that easy? 😂

ocean quartz
#

Yeah

obtuse gale
#

The thing is that, while maven has a concept of "parent module", gradle does not

#

A module doesn't need to know about a "parent module"

ocean quartz
#

Cuz kts gradle is better fingerguns

wintry plinth
#

Gonna give this a go with the voucher one then, I wonder if the maven converter will auto do it

ocean quartz
#

Probably not

#

Iirc @forest pecan converted a multi module project from maven and it didn't convert the modules

wintry plinth
#

oh

#

Unsupported Java.
Your build is currently configured to use Java 17.0.1 and Gradle 7.1.

Possible solution:

  • Use Java 16 as Gradle JVM: Open Gradle settings
  • Upgrade Gradle wrapper to 6.7 version and re-import the project

o, LOL

obtuse gale
#

Gradle 7.2 supports Java 17

#

Stupid IntelliJ

wintry plinth
#

ye im confused then why it tells me that lmao

#

if im using the built in gradle with intellij, any way to change the ver?

obtuse gale
#

Mm no idea

wintry plinth
#

ahh .gradle/gradle-wrapper

obtuse gale
#

Oh i thought you meant how to change the version IJ uses by default lmao

wintry plinth
#

oh sorry my bad 😂

#

lol wtf, it imported my multi module for me @ocean quartz

#

via gradlew init

ocean quartz
#

Ah so it does do that, nice

outer crater
#

Hi

#

The
DeluxeMenus-1.13.4-DEV-117.jar
doesn't load in 1.16.5
This server is running CraftBukkit version 2991-Spigot-018b9a0-f3f3094 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

wintry plinth
#

but now got this weird thing lol

prisma wave
#

it doesnt like http anymore

#

which is pretty reasonable imo

#

apart from when u need to use one of the ancient repos without TLS

wintry plinth
#

It turned out the conversion moved my repo to some folder

#

I didn’t find until i did a global find

#

That made no sense, rip

#

I couldn’t see the issue until I did a global search and found it 😅

foggy pond
#

What is truly a nightmare

#

Is rewriting half my plugin from using string literals for messages display names scoreboards etc to TextComponents

#

i guess most people have gone through that right

obtuse gale
#

yep

#

it is quite a transition

#

but worth it (imo)

foggy pond
#

No it absolutely is

#

At first I was a bit confused to why

#

But text components are just soo much better and cleaner

#

Yeah they might be lengthier

#

But they are so much clearer

foggy pond
#

Rewriting lore is an actual nightmare though

timber oak
#

oml I hate everything about NBT, should've never tried to make it even simpler using generics and wildcards

steel heart
#

Type erasure 🌞

unkempt tangle
#

So much good memories on those games :')

sick belfry
#

So I have a question, I'm working with multiple projects so I'm trying to use modules, the thing is that I can't get the hierarchy as I want:
I want:
Project:
Module 1
Module 2
Module 3

I get:
Project
Module 1:
Module 2 and so

#

how can I?

#

using intelllij ofc

obtuse gale
#

What are you doing that gets you that?

#

I mean it's just a matter of right clicking the project and "Add module" or whatever

sick belfry
obtuse gale
#

Can you show screenshots or something?

#

It's kinda hard to follow when:
You say "I did the thing and it didn't work"
And I say "I did the thing and it works" lmao

sick belfry
obtuse gale
#

Yeah? That's how it is

#

Chaos Universe is the root project, which has subprojects (a.k.a. modules)

sick belfry
#

oh right I'm stupid

#

thanks

obtuse gale
#

Lmao

#

No problem

#

RIP internet

gusty glen
#

@ocean quartz could you provide an example of interaction that doesn't work with Hopper GUIs (like, what kind of interactions doesn't trigger InventoryClickEvents)? I just tested the interaction prevention, and it seems to work just fine

ocean quartz
half harness
obtuse gale
#

yeah

#

they're that much of a pro sunglasso

half harness
#

lol

sweet cipher
static zealot
viral grove
#

Don't you love how they autoenabled it

static zealot
#

I do

viral grove
#

I was so confused at first. Then I realised. I think it's briliant as well.

leaden wraith
#

im here

prisma wave
#

@leaden wraith
we want both durations to be in ticks, so that we can compare them properly (we could also use ms, it doesn't really matter)
you have the reward timer in ticks already, so that's good
now we just want the Duration result in ticks, so do getSeconds() * 20 - you've got this, resultInMilli (even though this is in ticks, not milliseconds)
then we can just compare resultInMilli and REWARD_TIMER_TO_TICKS

#

you still havent told me what MINEARCH_HOURLY_REWARD_TIMER is, but if it's in ticks, then the whole Duration bit is redundant

leaden wraith
#

ffs I always use / and not *

prisma wave
#

then you don't need those extra conversions

leaden wraith
prisma wave
#

so it's in ticks

leaden wraith
#

20L * 60 * 5

#

yes

prisma wave
#

right

#

so then you dont need the duration bit

#

you want both durations in ticks, you've already got 1 of them

#
final Duration result = Duration.between(Instant.ofEpochMilli(now), Instant.ofEpochMilli(last));
long resultInTicks = result.getSeconds() * 20;

if (resultInTicks > MINEARCH_HOURLY_REWARD_TIMER) // etc
#

this should be all you need

#

incidentally i think you should swap now and last, otherwise you're gonna get a negative duration

#

or just abs it

#

Duration#abs

leaden wraith
#

what on earth is abs?

distant sun
#

absolute aka |-1| => 1

hot hull
#

Do you not have abs?

leaden wraith
#

right

leaden wraith
#

not really. im skinny as fuck

leaden wraith
#

I've spent way too much time on this fkn thing
rewritten it three times now.

prisma wave
#

get used to it lol

#

you dont usually get it right the first try

#

or the second

leaden wraith
#

I love coding, and seeing things I make
but goddamn its stressful ahha

prisma wave
#

ok, looks fine apart from the weird if else thing i mentioned earlier

leaden wraith
#

im giving it a try now

#

Just as I was about to say it didn't work.. it did

#

ok

#

guess ill go fuck myself then

prisma wave
#

lol

leaden wraith
#

setting it to run in 10m
just so I can make sure its working correctly

#

it seems to be working correctly.
but my concern is for 10minutes, its saying its 12000 ticks.
it should be 10000, right?

#

@prisma wave

#

I was wrong

#

lol

static zealot
#

10*60*20 = 12000

leaden wraith
#

i did the math, yeah xP

hot hull
#

Math at its finest

static zealot
#

lmao

uneven vapor
#

I test out if it big differences use nanoTime insted of currentTimeMillis (the later Is less accurate say others when google on it).

My testing is the differences pretty small.

For nanoTime 6.373 ms. and currentTimeMillis 7 ms.

I will say in most cases i think it will not mater to much and nanoTime are not threadsafe . The biggest difference are some most around 0.7 ms wrong (not a huge differences if you want to get some type of timing).

leaden wraith
steel heart
ocean quartz
#

Lmao

wintry plinth
#

Haha, to be fair the notch isnt that bad, in full screen mode it blends in

ocean quartz
#

Copium

#

Fuck

wintry plinth
#

wtf is that

ocean quartz
#

Just a sec

wintry plinth
#

help matts on my PC now

#

i can see his cursor

ocean quartz
wintry plinth
#

ye go into settings

#

u can turn something on

#

people are making it a bigger deal

ocean quartz
#

Because it's a stupid design lol

wintry plinth
#

eh i dont think so

#

most of my menu bars are smaller than that as well

ocean quartz
#

Apple fans literally eat anything they are given lol

wintry plinth
#

But I think it’s a good way to maximise space

#

Shoving the menu bar above, and having full space for content, if you have a larger menu bar then go into settings

#

You can enable it per app to move the menu bar down

ocean quartz
#

Ah i see, so you lose more of your screen then, meaning it could have literally not have a notch and it be perfect? You still believe that's not a stupid design?

wintry plinth
#

Well, in full screen you don’t see menu items anyway

#

But I think it’s good; because so far I’ve never had a menu bar that long

#

And I’ve tried PHPStorm and IntelliJ

#

I admit, under screen would be nicer naturally

#

But same as the phone notch, I don’t pay attention to it

ocean quartz
#

Same for phone notches, both are stupid

wintry plinth
#

I just like that menu items are tucked out the way, I admit its a small saving, like x many pixels

ocean quartz
#

I swear to god, apple could add a giant black circle to the middle of the screen and people would find a justification for it

wintry plinth
#

but in this case, for how powerful apples new chips are, i'd take a notch as a sacrifice

quiet depot
#

lol

wintry plinth
#

the new m1 max are more powerful than majority of cpus out rn

distant sun
#

Ok

wintry plinth
#

and thats been benchmarked, so "apple sheep" will take a notch for power

ocean quartz
#

Ah yes, good old apple "the chip is faster than the competition" where the competition is very hidden

quiet depot
#

apple is basically doing a power move over you

wintry plinth
#

apple showed the competition this time

#

in their keynote

#

they used a rtx 3080 iirc and some i9 cpu

#

ill try find it

quiet depot
#

"hey look at this notch that doesn't really need to be here, but we're leaving it here, because we can, and there's nothing you can do about it, but you'll still buy our product, kid"

#

sounds a lot like aperture science, at least they had portals though

wintry plinth
#

this was the first year apple showed the pc they was comparing against

#

previous years they never did that

distant sun
wintry plinth
#

first year ever they show u the specs against

ocean quartz
#

Ah yes, i love when my chips have 100 performance

#

It's very fast

quiet depot
#

this is something that doesn't affect your average iphone user in any way shape or form

#

a notch on the other hand

ocean quartz
#

You should see my 150 performance

quiet depot
#

that definitely gets in the way

wintry plinth
#

yes i agree iphone wise

#

but for the mac, idgaf if it gives me a huge boost

quiet depot
#

but you're paying every cent for that boost, plus whatever the apple premium is

wintry plinth
#

id take a notch ill get used to, for some power

#

yes with apples premium, i do agree

#

but they're now powerful, prior I admit they were "eh" for the price

ocean quartz
#

Ooor you could be smart not buy their shitty products so they learn to make better design while also having some power

wintry plinth
#

but i want power

#

power will help my workflow, if i dont buy, I lose out

#

plus if it matters, just dock your mac up to a bigger screen, you never see the notch

#

win win

#

you get top notch power, and not worry about a notch

#

just realised, the pun

quiet depot
#

wait they added a notch to the mac lol?

#

what fucking spuds

ocean quartz
#

Yeah lmao

wintry plinth
#

yes...?

distant sun
#

Lmao pig

quiet depot
#

just so I make my side clear chaz btwI am an iphone user and I don't regret it

wintry plinth
#

most the time u dont see it lol

#

oh u are

#

yesss

#

glad you're on the good side

ocean quartz
#

If you close your eyes it's very hard to notice i promise

quiet depot
#

but I think apple is incredibly stupid and I'm an idiot for buying apple products

distant sun
#

SheepSheeplet

quiet depot
#

bit of a love hate, mainly hate

wintry plinth
#

If it makes me money, I can justify it

ocean quartz
quiet depot
#

I'm a fan of making lots of money

wintry plinth
quiet depot
#

spin what?

wintry plinth
#

fan...

quiet depot
#

more of an air conditioner guy

wintry plinth
#

im a fan

#

brrrr

#

reminds me, i need to update my header pic

quiet depot
#

I used to be a fan but now I'm a whole air conditioner

#

anyway

wintry plinth
quiet depot
#

so like

#

I may aswell go with apple

inner umbra
#

Missed the season finale of Below Deck: Med and you have to pay for it on peacock 😭

wintry plinth
#

only thing I disagree with lately with apple

#

the csam shit, the scanning itself

quiet depot
#

what's that

wintry plinth
#

basically apple gonna start scanning your devices for child ---

quiet depot
#

oh

wintry plinth
#

Everyone kicked up a stink, not because of the reason

#

but rather it breaches privacy

quiet depot
#

yeah not that bad compared to the australian government

ocean quartz
quiet depot
#

we don't have privacy anymore lol

wintry plinth
#

if we allow them to scan our phones, they will allow governments to scan other stuff

quiet depot
#

it doesn't exist in australia

wintry plinth
#

like terrorist stuff

quiet depot
#

not like you brits have it anyway either

wintry plinth
#

thats the big fear

quiet depot
#

aus gov passed a bill that allows the federal police to hack into anyones devices, without warrant, to "view, create, modify, delete" evidence

wintry plinth
#

wait really LOL

quiet depot
#

meant to be used for big drug dealers and child porn

#

but

#

in reality

#

there's literally no checks and balances to stop them from planting that shit on a guy they don't like

#

we're fucked

wintry plinth
#

thats the fear everyone raised with apple doing this

#

they could give in to government requests

#

and start checking for terrorism

#

or anything like that

quiet depot
#

ok technically there is a warrant but the warrant is given out by the federal police or something

#

so like

#

ya know

wintry plinth
#

I do think its good apple checks your message picture to stop kids receiving fucked up content from weirdos

quiet depot
#

fisa court basically

wintry plinth
#

but i think the icloud scanning is just gonna end up with giving into requests

#

by china etc

quiet depot
#

don't you brits have more cameras looking at you than like anyone else in the world anyway

wintry plinth
#

yes sadly

#

they say that no matter where you go outside

#

you always have a camera watching

quiet depot
#

yeah well that's not true

wintry plinth
#

many houses here have cameras as well

quiet depot
#

makes sneaking out at night a pain

#

rip kids

wintry plinth
#

ye lol

#

my mum got her ducky btw yesterday, she doesnt like it

#

shes getting rid of it

quiet depot
#

she's in a major minority

#

make sure to tell her that

wintry plinth
#

i wanna say why, lack of keys, she got the mini

#

typing is hot i cant lie

#

one of the best ive typed on

quiet depot
#

mini keyboards suck

wintry plinth
#

but she bought the mini and has fuck all keys

#

not even up and down

#

this is it currently in our office space

quiet depot
#

you share an office with your mum?

#

I could literally never

wintry plinth
#

yee

#

we have nowhere else

#

its a small house 😂

quiet depot
#

I'd simply rather not work than work with my mum

ocean quartz
#

Same lmao

wintry plinth
#

why 😂 headphones in, bam

quiet depot
#

her presence alone

#

it's too much

wintry plinth
#

LOL

#

bloody hell

quiet depot
#

I wouldn't be able to work with my dad either

#

or my brother

#

or even my girlfriend (if I had one)

wintry plinth
#

why?

quiet depot
#

I work best alone

wintry plinth
#

The thing is, you're doing seperate things, like for me

#

my mums gonna wfh for a company soon, and im self employed

#

so we dont need to interact on same shit

quiet depot
#

it doesn't matter, another person in the room guarantees distraction at some point

wintry plinth
#

oh

quiet depot
#

avoidable distraction

wintry plinth
#

i see what you mean there

quiet depot
#

now even as I say this, I'd still rather work in a corporate office than at home, as setting is hugely important

wintry plinth
#

Lol I just released a new ver of my site, realised it looks fucked on big screen, oops

quiet depot
#

at home, even if you're in your "home office", you're still at home

wintry plinth
wintry plinth
#

when I was at the office, its constant distractions

#

phone calls, manager, people coming up to me etc

quiet depot
#

so basically here's the order of preference: working at corporate office alone > working at corporate office > working at home alone > working at shared home office

wintry plinth
#

oh yes

#

id love an office space if i was there myself

#

i try have a routine at home now, I sleep by 11-11:30, wake up at 7:30, coffee, then at 8:00 to 8:45 i do my morning exercise

#

then shower, get ready and start work

quiet depot
#

if you put your mind to it you could get it done in a week

wintry plinth
#

You reckon?

quiet depot
#

quite probably less assuming the poms aren’t overly complex

#

if they were all simple you could do it in 3 days

#

2 days even

#

idk

wintry plinth
#

1 project is nms based which will be a pain, as i wanna use a repo that has. nms stuff (if you still have yours), one is multi module

#

rest are simple i think

quiet depot
#

I never hosted nms

#

with gradle I recommend just using spigot jars in a folder and adding them as a dependency

#

codemc hosts nms if u want to use that instead

#

I recommend never using maven local for public projects

#

imo maven local is anti open source

prisma wave
#

it's a bit of a pita for sure

#

but then

#

DMCA takedowns are pretty anti open source

wintry plinth
#

i dont wanna have to install every mc ver

quiet depot
#

it’s easier to get people to download a few spigot jars off a dodgy website that looks official than for them to run buildtools 69 times

wintry plinth
#

ye thats the thing

#

its mainly the spigot jar stuff thats a pain for me

quiet depot
#

yea so just try codemc ig

wintry plinth
#

codemc has the nms stuff?

quiet depot
#

believe so

gusty glen
#

@ocean quartz where did you take the idea behind your config library (triumph-cfg)? I'm super curious about the "beans" and "properties" ideas behind it

ocean quartz
#

It's a fork of ConfigMe

wintry plinth
#

piggy gonna try now then

quiet depot
#

do beans and properties stem from java ee?

ocean quartz
#

I think so yeah

prisma wave
#

I second Matt's "I think so"

ocean quartz
#

I know that the way to work with beans is using PropertyDescriptor so at least properties are coming from here, idk where beans come from

gusty glen
#

did you implement the "Path" annotation functionality, or was it already part of ConfigMe?

ocean quartz
#

I did that one

wintry plinth
#

adding codemc's repo, doesnt import weirdly

#

Oh I realised why, maven doesn't like multiple of the same package, even if its diff vers, does gradle do this?

prisma wave
#

probably

#

you should use modules

wintry plinth
#

is my current gradle file

prisma wave
#

1 module per nms version, it's a bit of a pain but it's the best way of making sure you dont get conflicts

wintry plinth
#

Ah I see

prisma wave
#

example here

static zealot
#

Sx 😦

prisma wave
#

yeah

#

also a bit outdated

#

sad

wintry plinth
#

oh rip

prisma wave
#

im surprised u dont already have modules since im pretty sure maven is the exact same

wintry plinth
#

i used jars with maven, but wanting to use a public repo

#

so easier

marble stream
#

Which event should I use to stop players from dragging and dropping items in their offhand slot

wintry plinth
#

dropevent

marble stream
#

Ok thanks I’ll give it a shot

wintry plinth
#

been years since I dived in, I believe PlayerDropEvent or itemdropevent

#

something like that

static zealot
#

those are for ground

#

he wants them not to be able to put items in their offhand

wintry plinth
#

what am I doing wrong?

#
compileOnly(files("jars"))
#

I added that to my gradle

prisma wave
#

files takes an actual file name i think

#

rather than a directory

wintry plinth
#

oh

prisma wave
#

you can use the fileTree thing for directories

#

idk how to do that

#

someone else probably knows

static zealot
#

yes. the gradle docs

wintry plinth
#

ye worked, ty brist

prisma wave
#

np

wintry plinth
#

One project down in my huge list 😂

prisma wave
#

it'll get easier from here

#

probably

#

maybe

wintry plinth
#

i think most arent nms so thankfully should be an easy thing, and I use that shaded jar thing right for shaded libs?

prisma wave
#

shadowJar yeah

marble stream
#

Yea not player dropevent

marble stream
static zealot
#

its an item even

#

t

#

not a player

#

or an inventory

#

rather

marble stream
#

Which one?

wintry plinth
#

Once I add shadowjar plugin, do I need to do anything else?

prisma wave
#

nope

#

well, configure relocations and minimizing

#

if necessary

#

apart from that, just make sure all the shaded dependencies are implementation rather than compileOnly and ur good

wintry plinth
#

this is current

static zealot
#

paste bins please 😦

wintry plinth
#

o soz

static zealot
#

thank you

prisma wave
#

looks fine

#

u can make the repos a bit shorter by using maven("url")

wintry plinth
#

oh wow

#

the docs say to add;

shadowJar {
    relocate 'junit.framework', 'shadow.junit'
}
#

but shows up red

static zealot
#

is this kts?

wintry plinth
#

ye

static zealot
#

then use

tasks.withType<ShadowJar> {
    relocate("junit....", "shadow...")
}```
prisma wave
#

you need parens and double quoted strings then

#

yeah

static zealot
#

this is a way

wintry plinth
static zealot
#

you need to import shadowjar

wintry plinth
#

weirdly doesnt see it as a dependency

#

plugins {
java
id("com.github.johnrengelman.shadow") version "7.1.0"
}

#

even tho i have this

static zealot
#

try refreshing the dependencies and the other thing

#

fuck

#

how's it called

wintry plinth
#

ohh toolbar thing

static zealot
#

@marble stream InventoryDragEvent

#

you might also want to use InventoryMoveItemEvent

#

just look thru the spigot api and you'll see all the events

#

play with them. see which does what

wintry plinth
#

Ah wicked

#
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
    relocate("com.codeitforyou.lib", "{group}.spoof.lib")
}
#

is this how i use variables?

prisma wave
#

$

static zealot
#

^^

prisma wave
#

before the {}

static zealot
#

kotlin

wintry plinth
#

ohh ty

prisma wave
#

same as js

wintry plinth
#

everything does it different lmao

static zealot
#

xD

prisma wave
#

and add an import for the shadowjar cuz that's gross

static zealot
#

yeah ^^

wintry plinth
#

ye auto ide, i think i can change cant i

#

like import preference

static zealot
#

yeah you can

#

if you using ij

#

don't remember where that was in

wintry plinth
#

lmao what am I doing wrong

#

i tried require and import

#

both show as red

foggy pond
#

creeper.getIgnited() should check if a creeper's about to blow up right

#

Cause it returns false no matter what state the creeper is in for some odd reason

prisma wave
#

it's exactly the same syntax as java imports (almost)

wintry plinth
#

ah wicked ty worked

prisma wave
#

and then $ for the interpolation

wintry plinth
#

woohoo done

#
4:38:46 pm: Executing task 'build'...

> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :jar UP-TO-DATE
> Task :assemble UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE

BUILD SUCCESSFUL in 522ms
3 actionable tasks: 3 up-to-date
4:38:47 pm: Task execution finished 'build'.
#

does this look right?

prisma wave
#

use the shadowJar task instead of build

#

apart from that yeah

wintry plinth
#

oh so from now on id use shadowjar task

prisma wave
#

mhm

wintry plinth
#

gradle shadowJar I assume?

prisma wave
#

yup

wintry plinth
#

lit ty

#

weird thing

#

its showing a Shadow package

#
group = "gg.spoof"
version = "2.1.2"
description = "Spoof"
java.sourceCompatibility = JavaVersion.VERSION_1_8

tasks.withType<ShadowJar> {
    relocate("com.codeitforyou.lib", "${group}.spoof.lib")
    relocate("net.jafama", "${group}.spoof.math")
    relocate("redis.clients", "${group}.spoof.redis")
}
prisma wave
#

it might need to be ${project.group}

wintry plinth
#

wicked worked, ty, im really amazed how quick it did it

#
4:42:09 pm: Executing task 'shadowJar'...

> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE
> Task :shadowJar

BUILD SUCCESSFUL in 733ms
3 actionable tasks: 1 executed, 2 up-to-date
4:42:10 pm: Task execution finished 'shadowJar'.

#

not even 1s...

prisma wave
#

yea gradle is super fast

wintry plinth
#

now having that gradle build file as a reference, should be much easier for me to do the others

wintry plinth
#

With gradle, how can I replace variable stuff within resources? With maven I was able to do like ${version}

onyx loom
#

processResources task

wintry plinth
#

I saw this online, from july but didnt work

processResources {
    from(sourceSets.main.resources.srcDirs) {
        filter ReplaceTokens, tokens: [version: version]
    }
}
onyx loom
#

that would work if u were using groovy

#
        filesMatching("**/plugin.yml") {
            expand("version" to version)
        }

should work for kts

wintry plinth
#

ah ty, do I have to manually add my replacements then?

#

I assume

name: ${plugin}
version: ${version}

for the variable then?

onyx loom
#

smth like that

#

might be {project.version}, cant remember

#

and ud need to expand again if u wanted anything else than just version ig, and change the path for different files etc etc

trail wraith
#

is this the right place to talk about compiling ?

frigid badge
#

sure

jovial warren
#

did you guys successfully bully another guy in to switching to the superior Gradle? gj

trail wraith
#

i downloaded an addon for skript, Disky, and I removed some lines of code that spams the console with errors. Now, i need to compile it

jovial warren
#

Skript doesn't need to be compiled

trail wraith
#

its an addon

jovial warren
#

ah

#

you can compile it with javac, though the most popular way to compile many source files in to a single JAR is with a build tool, such as the objectively superior Gradle, or the objectively inferior Maven

trail wraith
#

how to do that ?

jovial warren
#

is the project not already set up with something like this?

#

or did you download it and modify the extracted JAR source?

trail wraith
#

i downloaded the source files

#

and modified them with intelij

jovial warren
#

did they come with a pom.xml or build.gradle?

trail wraith
#

build.gradle

jovial warren
#

open that, scroll down and look for "shadowJar"

#

if it's in there, go out of it, open the terminal at the bottom, and run ./gradlew shadowJar

trail wraith
#

in intelij ?

jovial warren
#

yeah, there should be a terminal tab at the bottom of IJ

trail wraith
#

i know

#

build failed

jovial warren
#

what did it say?

trail wraith
#

BUILD FAILED in 11s
1 actionable task: 1 executed

jovial warren
#

that's it?

#

no error above that?

trail wraith
#

idk

#

ScopeBotBuilder.lastBuilder.disableCache(CacheFlag.CLIENT_STATUS);

#

error: package info.itsthesky.disky.skript.scope.bot does not exist

#

a ton of these

#

and i have this error when i load the project

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

timber oak
#

oml, I've been working for a few hours on setting NBT on entities in 1.12.2, which I now see isn't possible...

Does someone have a workaround?

frigid badge
#

manually track them

distant sun
#

im pretty sure you can set nbt on entities

timber oak
#

I've found one solution though, storing the nbt on the entity helmet, and then just make the helmet a button or something to hide it

distant sun
#

it might not work, idk tbh

#

The NBTInjector will not work with: 1.12.0, 1.12.1, 1.13.0 (Please just update to the final release of your chosen version)
rip

#

why 1.12 - 1.13, idk

timber oak
#

1.12 is just bs

#

I'll just avoid NBT on entities in versions before 1.14

sick belfry
#

fuck fabric and gradle

timber oak
obtuse gale
#

Check in Settings -> Build, Execution, Deployment -> Build Tools -> Gradle

distant sun
prisma wave
#

😌

#

that guy is great

obtuse gale
#

what the fuck is this

distant sun
#

Raku [Perl 6]

#

Weird idk

#

Apl looks like all math symbols put together

#

BQN as well, how can people use that wtf

obtuse gale
#

wow the haskell solution

#

so meta function lmao

#

higher order functions pog

sick belfry
#

ok so I got fabric up and running, but how the heck I would setup my acc so I can play multiplayer?

obtuse gale
#

what does that even mean?

#

just drop the mod into your mods folder and run mc as usual?

sick belfry
obtuse gale
#

those are arguments you pass to MC (which the launcher does automatically if you're logged in)

#

uh.. now which are they?

sick belfry
timber oak
#

Someone got a good static explanation? Trying to explain it to someone else, but I'm bad at explaining

#

The disadvantages etc.

sick belfry
#

seriously?

ocean quartz
#

Gradle?

#

Compile was removed

sick belfry
#

oh come on

ocean quartz
#

Use implementation

obtuse gale
#

"oh come on" it was removed for a good while now, and it was due to removal for MANY versions for a really long time too, yielding warnings

ocean quartz
timber oak
raven vigil
#

can someone help with a hacked acccount?

half harness
#

¯_(ツ)_/¯

#

but there's no discord staff here or anything

raven vigil
#

yeah i cant seem to find any discord staff sadly.

#

im losing hope.

obtuse gale
#

they left

sturdy zinc
#

is there a way to mix mods and bukkit plugins?

sick belfry
ocean quartz
#

Send your build script, that error tells me nothing

ocean quartz
#

Dude use a paste lol

#

You're not adding a version

#

Also is jcenter still a thing?

remote goblet
#

no i dont think so

sick belfry
#

but is about to die

#

gosh, that much problem for just making a RPC in java?

#

fuck you discord and your Game SDK

empty flint
#

Anybody know how to serialize a nullable Path field in Kotlin ?

dawn hinge
#

Haha

eager fern
#

LMAOOOOO

distant sun
#

🤣 🤣 @quiet depot

obtuse gale
empty flint
supple swan
#

is there a way i can add a gif while editing a message?

static zealot
#

add the link to it

supple swan
static zealot
#

you can't add attachments after you sent the message already

supple swan
#

cuz its not working

#

someone help

#

the link is just there

#

but the image is not showing

static zealot
#

well that means embeds might be disabled in that server

supple swan
#

the msg is not an embed

#

neither the gid

#

gif

static zealot
#

you're saying that you've put a link for a gif and it doesn't show the gif right? it just shows the link?

static zealot
#

that means you don't have access to embed links

supple swan
#

of the server

#

😹

static zealot
#

no idea them. maybe its one of those bad links? I know some links discord just doesn't let to be embeded bcz of their anti bad stuff scanner

#

no idea what its called

supple swan
#

its not badddd

#

its just a gif

#

(header)

static zealot
#

@obtuse gale please send me that emoji. thanks

supple swan
#

@static zealot

static zealot
#

no idea

supple swan
supple swan
static zealot
#

no idea

supple swan
obtuse gale
#

@static zealot

static zealot
#

oh god

obtuse gale
#

Lmao

barren oar
#

is there a method to get death cause? Like event.getCause()

remote goblet
#

I don't think so

#

at most there's getDeathMessage

#

in normal spigot

#

paper probably has a death cause

mental trench
#

you can always get last damage cause

remote goblet
#

that too

hot hull
#

@static zealot DMS!!!!

static zealot
#

no

jovial warren
#

would anyone here have any idea why tests aren't re-compiling after a clean build? like Gradle is still executing the old broken tests that have been removed, and I've been getting results like this: BlockTests > initializationError FAILED java.lang.ExceptionInInitializerError at BlockTests.kt:-1 Caused by: org.kryptonmc.api.util.FactoryNotFoundException at BlockTests.kt:-1(notice the -1 for the line that causes the issue)

#

is there another Gradle cache somewhere that may be causing this BS?

#

actually, nvm

#

maybe just me being dumb

sweet cipher
#
    relocate 'net.kyori.adventure', 'me.fisher2911.enchantsexpansion.adventure'

Is this not the right way to shadowJar? I am using MiniMessage.

obtuse gale
#

what's the issue?

#

are you shading the whole of adventure or just MM and using e.g. Paper's native adventure impl?

static zealot
#

the issue is that I have an issue with my issue

compact perchBOT
obtuse gale
#

@sweet cipher here's a Barry Tip

sweet cipher
#

lol

obtuse gale
#

use -api 4.9.2

#

not sure when compaction was introduced... likely in 4.9.0 cuz semver but still

sweet cipher
#

Oh thanks

obtuse gale
#

also that's not relocated? lmao

#

wait

#

tf are you doing

sweet cipher
#

Yeah that's what it seems like

obtuse gale
#

compileOnly 'net.kyori:adventure-api:4.9.0'?

sweet cipher
#

Oh I was trying that

#

It doesn't work normally either

#

lol

sweet cipher
#
    relocate 'net.kyori.adventure', 'me.fisher2911.enchantsexpansion.adventure-text-minimessage'
    relocate 'net.kyori.adventure', 'me.fisher2911.enchantsexpansion.adventure-platform-bukkit'

This doesn't relocate all of Adventure does it?

obtuse gale
#

uh that's not

#

a proper

#

- is not a valid package identifier char

#

also lol @ relocating the same thing twice

sweet cipher
#

Whoops

#

What am I supposed to do?

obtuse gale
#

answer my question

sweet cipher
#

I'm not trying to relocate all of Adventure

obtuse gale
#

relocation is not what i'm asking

#

i'm asking about what you want to shade, what you want to include in your jar

sweet cipher
#

Oh

steel heart
#

holy cow google spreadsheets are kinda good databases

sweet cipher
#

I want to shade just minimessage and the bukkit minimessage platform

obtuse gale
#

"bukkit minimessage platform"?

#

you mean adventure platform?

sweet cipher
#

Yeah

obtuse gale
#

yes, nothing to do with MM lol

#

you'll want to relocate net.kyori.adventure.platform to ....adventure.platform and ...adventure.text.minimessage to ....adventure.minimessage or whatever, and yes, explicitly include adventure-api as compileOnly

sweet cipher
#

Thank you!

#

Like this?

    relocate 'net.kyori.adventure.text.minimessage', 'me.fisher2911.enchantsexpansion.adventure.minimessage'
    relocate 'net.kyori.adventure.platform', 'me.fisher2911.enchantsexpansion.adventure.platform'
#

It's not working for me, I'm definitely doing something wrong.

steel heart
#

send ur build.gradle

#

:p

sweet cipher
steel heart
#

yeah looks like it should be working

#

push the latest stuff to gh

#

maybe I can try fiddling with it a bit

sweet cipher
#

Oh this is a different plugin build.gradle

#

I'm running it on paper, would that make a difference?

steel heart
#

are you getting an error

#

or it just not shading and relocating?

sweet cipher
#

java.lang.NoSuchMethodError: 'net.kyori.adventure.text.Component net.kyori.adventure.text.Component.compact()'

steel heart
#

that just looks line some binary incompats

#

uh well

#

what version of adventure are you depending on?

sweet cipher
#

compileOnly 'net.kyori:adventure-api:4.9.2'

obtuse gale
#

what version of paper are you running?

#

@sweet cipher

sweet cipher
#

paper-1.17.1-165

obtuse gale
#

update lmao

sweet cipher
#

Oh

#

Wow there are a lot of updates

#

It works now

#

Thank you very much

obtuse gale
#

Epic

gusty glen
#

gitbook "just selected" this emoji when I wrote my library name, why does gitbook doesn't like my lib? :/

static zealot
#

:))))

obtuse gale
#

Lmao

half harness
#

🤣

gusty glen
#

is possible on gitbook to link tabs with same name (so if I switch to "Gradle (KTS)" for example, it switchs all tabs to it)?

static zealot
#

I don't think so. but matt's wiki will be able to. right @ocean quartz ?

ocean quartz
#

It used to do that but as a bug lmao
I could add it though

static zealot
#

you should* add it

onyx loom
#

you will* add it

#

🔫

gusty glen
#

what is the gradle equivalent of this maven thing? xml <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>1.7.32</version> <optional>true</optional> <!-- case: when other logging implementation used or logging is not needed --> </dependency>

obtuse gale
#

tf does optional mean

gusty glen
obtuse gale
#

Actually I've used that before wutcat

ocean quartz
obtuse gale
#

idk lol

#

too much reading

obtuse gale
#

for exposing (or not) transitive dependencies

#

probably wrong usage though lmao

gusty glen
#

when choosing a library, do you prefer to read the readme file (on Github), or you go directly to their wiki (when it's something lighter like Gitbooks)?

wintry plinth
#

readme

#

aint got time for no wiki pages

ocean quartz
#

Imo add simple example on readme, then direct them to a wiki for the rest

cobalt arch
#

is there an api for DeluxeMenus

steel heart
gusty glen
#

I see, I'm migrating most of my readme content to a separate wiki

onyx loom
steel heart
cobalt arch
#

bruh

#

it could have a potential

#

I need a good gui plugin with a good api, CommandPanels has some downsides in their api so I won't use it

steel heart
#

yeah

#

I should become a contributor to deluxe menus and add an api

#

rite? :p

cobalt arch
#

you can fork it

#

and then make a req

steel heart
#

is it even open source?

onyx loom
#

nope

steel heart
#

🍽️

cobalt arch
steel heart
#

hmm quite unsure how I would fork and pr an api based on that

cobalt arch
#

it has an api

#

so I might check it

onyx loom
#

why do u need an api anyway?

dense dew
#

what api should do in gui plugin?

onyx loom
#

yeah thats what i think lmao

steel heart
#

customizability

#

🌝

cobalt arch
#

I wanna connect to a gui plugin in my plugin

steel heart
cobalt arch
#

They have good plugins there

onyx loom
#

in what way

onyx loom
cobalt arch
#

let's say it should open a gui after/before a game and that gui can connect to others that I have from CommandPanels.

steel heart
#

I agree an api wouldn't harm

#

but I mean you can connect that with raw premade plugins

cobalt arch
#

how if I can't open it without an api?

steel heart
#

well you literally can

#

just use something like Server::dispatchCommand?

#

(if that was the name)

cobalt arch
#

the stuff inside the gui are customized and have special functions with my plugin

steel heart
#

at this point you may just want to write a custom gui

cobalt arch
#

let me try using BetterGUI first

steel heart
#

alright

#

good luck

cobalt arch
#

thanks

half harness
#

(or copy and paste into build.gradle)

#

|| kts won't work btw ||

cobalt arch
viral grove
#

Should I even be using a lib?

prisma wave
#

flutter is a bit more than just a library lol

viral grove
#

Yeah, I realised after reading through further. Just a tiny bit :p

prisma wave
#

Entirely new language and everything

#

Although I've heard it's good

viral grove
#

Yep. Gotta learn dart for that though.

steel heart
#

Dart is good

#

It’s like kotlin and java but actually good

#

Not bloated with keywords and got null safety

viral grove
#

I looked at it, and my first thought was Kotlin + Js

#

I'm reading up on it now, seems that it can compile to Js. Might learn it now, cause I wanted to learn Ts. Could now learn Dart instead of Ts

steel heart
#

Wise choice

#

Well both are quite the meta right now

#

I know a decent amount of fart

#

Dart*

#

But yeah

viral grove
#

Do you know if Dart is higher level than something like Java? Not that it'll change my perception much, just curius

steel heart
#

Quite the same in my opinion

#

It has a gc for instance

#

It’s pass by value just like Java and some other similar things to Java

#

And it performs significantly better

viral grove
#

Yeah, that's my first impression on reading the docs

#

It's Kotlin stuff but mostly Java syntax

steel heart
#

Ya

viral grove
#

Wait some things are mixed

#

Like for (variable in list)

steel heart
#

Oh yeah

#

You’ll have to learn those syntax things but that’s not a big challenge for someone who knows Java decently reversed_fingerguns

#

Or kotlin for that part

viral grove
#

Exciting. Will probably go learn it later.

viral grove
steel heart
#

👍

prisma wave
#

Dart is more like Java mixed with js than anything

viral grove
#

Yeah, it really is

#

I'm reading through it, finding more and more js stuff

steel heart
#

Idk if that was invented by JavaScript but yeah

obtuse gale
#

F

viral grove
#

Should my package name be io.github.(stuff) or com.github.(stuff)?

quiet depot
viral grove
#

No, I should though.

quiet depot
#

if you have a gh page, i'd use that (so io)

#

otherwise, .com

viral grove
#

Okay thanks.

frail glade
#

👋

obtuse gale
#

Hi glare

frail glade
#

What's up?

frail glade
#

Is anyone here proficient with pupeteer? I wrote a little program lately that uses it to scrape NameMC to convert profiles -> MC UUID. Was wondering if anyone could give it a quick looksie (in the resolver.js) and let me know if anything outstanding shows. Trying to keep it fast and efficient, but I also need to ensure the XPATH I need is loaded before I go to the next in the list. https://github.com/darbyjack/namemc-skin-resolver

wintry plinth
#

Oh just read why, it’s to get every skin

obtuse gale
#

I cant seem to import PlaceholderAPI in maven. It all works and looks good in the POM, but when i try use PAPI in my code, the import goes red and it just dosent work.

half harness
#

don't crosspost

#

and this isn't the correct channel - but show ur pom.xml in #placeholder-api (since u already posted there)

obtuse gale
#

done

jovial warren
#

@old wyvern currently trying to apply SlimJar in a KTS project, and I have the import for io.github.slimjar.func.slimjar, but trying to use implementation(slimjar("1.2.6")) yields: ```
org.gradle.internal.exceptions.LocationAwareException: Build file '/home/bombardygamer/IdeaProjects/data-link/bukkit/build.gradle.kts' line: 17
Extension with name 'slimjar' does not exist. Currently registered extension names: [ext]

old wyvern
#

Yea the repo is currently down, Its pointed to bm's repo atm

#

Your best option is to install it to your local repo

#

I'm trying to get in touch with oracle suppourt to reenable the vps

#

Worst comes worst, I'll submit it onto central and remove the mirror

jovial warren
#

alright

prisma wave
#

good old oracle

#

yugi is there anything you can change to make it use my repo for now ?

#

i can publish the slimjar artifacts if that's the problem

ocean quartz
half harness
#

or should i use hastebin since i dont need the paste any longer for a day

#

idk

#

¯_(ツ)_/¯

static zealot
#

like logs for a month from their servers

half harness
#

o

static zealot
#

but it will take a while to load xD

half harness
#

turned out pastebin had an api limit

#

😩

#

☹️

obtuse gale
#

bad api

distant sun
#

How many pastes have you created lol

static zealot
#

oh you mean like a limit of how many you want to make

#

lmao

half harness
half harness
#

pastebin > hastebin

wintry plinth
#

With Gradle (KTS), how can I copy the final jar to a location? I’m looking to copy it to a test server, so I can work from my IDE and test a plugin quickly

ocean quartz
#

You can change the destination folder on shadowJar or create a copy task

eternal compass
#

@half harness host your own paste site 😎 I found out yesterday it can be free

#

on cloudflare workers

steel heart
wintry plinth
wintry plinth
onyx loom
#

omg its a monad, must be good!

wintry plinth
#

How would I copy the jar (or even, move) after shadowJar is finished? (With Gradle KTS)

half harness
wintry plinth
half harness
# wintry plinth How would I copy the jar (or even, move) after shadowJar is finished? (With Grad...

this is what i do (build.gradle, not kts): ```gradle
task removeBuildJars() {
//noinspection GrUnresolvedAccess
new File(project.rootDir, 'build/libs').deleteDir()
new File(project.rootDir, 'build/resources/main/plugin.yml').delete()
}

final server = '1.8'
final servers = [
'1.8',
'1.16',
'1.17'
]

task copyFile(type: Copy) {
if (!new File("../.TestServers/${server}/plugins/").exists()) {
return
}
new File("../.TestServers/${server}/plugins/${fileName}").delete()
from("build/libs/${fileName}")
into("../.TestServers/${server}/plugins")
include("*.jar")
}

task deleteAll() {
for (deleteServer in servers) {
for (file in new File("../.TestServers/${deleteServer}/plugins").listFiles()) {
if (file.name.startsWith(shadowJar.archiveBaseName.get())) {
file.delete()
}
}
}
}
``` then gradle removeBuildJars deleteAll shadowJar copyFile

#

¯_(ツ)_/¯

#

then i use intellij's jar configuration to run the server and build the jar

wintry plinth
wintry plinth
#

Only perk I think with that plugin version would be that if it’s open sourced others could test it, but I guess for a single project it doesn’t matter too much

#

I just don’t like that it downloads a jar to my root folder

half harness
#

so that if others build the jar

#

they don't also have the jar copied

#

¯_(ツ)_/¯

wintry plinth
#

Oh super cool approach

half harness
#

you'll have to change the directory though unless you have the same exact directory system as me

wintry plinth
#

Yeah

ocean quartz
half harness
ocean quartz
#

That's not how that works, if you want to remove just clean
But that's not needed either gradle handles all that

wintry plinth
#

oh

half harness
#

but then it removes all the cache

ocean quartz
#

You're deleting from the cache as well lol

half harness
#

i just deleted the plugin.yml

ocean quartz
#

And how often do you update plugin.yml
Which btw if changed will be updated automatically
You never should need to remove anything

dreamy dagger
#

Is deluxemenus SRC available to the public?

wintry plinth
#

No

half harness
#

And how often do you update plugin.yml
somewhere between every day to every week
Which btw if changed will be updated automatically
it didn't 🤷 it just randomly stopped updating
You never should need to remove anything
I don't know any other solution

ocean quartz
#

Why would you update plugin.yml everyday? thonking

wintry plinth
#

Matt, what would be the KTS version of what Dkim has? To copy the jar after shadow, is there a way to automatically do it after shadow, or would I have to specify it?

#

After shadowJar in my CLI

#

_on phone rn so apologies _

static zealot
#

you can use the copy task and call shadowjar from inside the copy task

prisma wave
#

just make a copy task

half harness
static zealot
#

and then you call the copy task instead of the shadow task

prisma wave
#
tasks.register<Copy>("copyJarToServerPlugins") {
    from(tasks.getByPath("shadowJar"))
    into(layout.projectDirectory.dir("server/plugins"))
}
eternal compass
half harness
wintry plinth
ocean quartz
#

All you need is a simple copy task or on shadow destinationDirectory.set(File("path"))

prisma wave
#

gradle shadowJar copyJarToServerPlugins

wintry plinth
#

Ohh I see so when you give something a name within the Gradle file, it becomes there via CLI

#

if that makes sense

half harness
#

a task*

ocean quartz
prisma wave
#

yeah a task

wintry plinth
#

Ahh that’s super cool

half harness
#

shadowJar for ex is a task

wintry plinth
#

Learning something new every day

static zealot
#

man. I'm to tired to read all the documentation on cloudflare

#

fuck

ocean quartz
#

@prisma wave Sir you should go see a doctor

eternal compass
static zealot
wintry plinth
#

I’m jk, you do it to me all the time

#

It was the perfect opportunity

prisma wave
static zealot
#

was it? because I Was literally talking to fred

eternal compass
wintry plinth
static zealot
#

like there's so many opportunities (I talk alone a lot) but you chose the bad one