#help-development

1 messages ยท Page 1074 of 1

mortal hare
#

yes, but the overhead or accessing that data is not worth it

eternal night
#

I mean, "overhead" is a statement

mortal hare
#

in that case just use some redis alternative

wet breach
#

yeah which the transfer packet is not really compatible with proxies at the moment or most of them anyhow

eternal night
#

Well, it is a layer above proxies

#

there is no "compatibility" with it and proxies

flat lark
#

Can anybody point me in the direction on how to change player skins with MineSkins. I just need to make some simple system nothing complex.

wet breach
#

not sure what you are saying, bungee doesn't implement transfer packet I don't think

mortal hare
eternal night
#

I mean, it does to the degree for you to switch proxies

#

which is what it would be used for in a proxy context

wet breach
#

I am aware, still need the proxy to implement it to use it

eternal night
#

huh?

wet breach
#

I suppose you could just create the packet manually

eternal night
#

spigot API has it

wet breach
#

doesn't help if there is a bungee

eternal night
#

I think bungee API does too

mortal hare
#

imagine server doing round trip back and forth just to get some couple kb of data

#

instead of storing it inside his own memory

eternal night
#

????

#

you don't use cookies for a single server setup

mortal hare
#

i just dont see the point of it apart from transfer packet

eternal night
#

that isn'T the point of this

#

yea

#

it is purely there for cross server communication

wet breach
eternal night
#

Yea

mortal hare
#

it would be cool if someone would design a software that would allow for Server A which doesnt have player joined to retrieve the data from Server B

wet breach
#

I can see it being useful even on the same proxy

mortal hare
#

now afaik you need to have player joined to read it

wet breach
#

bungee can detect which domain was used to connect to

#

you could technically use the transfer packet to reconnect via different domain but same proxy

eternal night
#

I guess? โ„ข๏ธ

wet breach
#

if you wanted to use it for specific servers

eternal night
#

idk, mostly use it for switching out proxies that should be removed

wet breach
#

yeah that is the other advantage of transfer packet

#

to transfer between proxies

#

which is actually a pretty neat usage really

eternal night
#

Yea it is great

wet breach
#

like if you were going to reboot your network

eternal night
#

allows you to restart proxies without loosing your players

wet breach
#

^

#

that yep

#

probably could make a game out of it

#

XD

#

see which players survive the restart as they are transfered from proxy to proxy

eternal night
wet breach
#

with the world crumbling and they have to run to the other end

#

anyone who dies to the void has to wait XD

#

now, I wonder though

#

could we technically setup a master portal server?

#

wonder if someone could easily make money by simply providing an easy way to get to servers or networks

#

its just nothing but a hub where you can easily go to another network XD

eternal night
#

iirc the client does indicate if it joined via transfer

#

and the server does have the config to prevent it

wet breach
#

interesting

wet breach
#

can't really think of a good reason to block transfer connections unless it was for a backend of course

eternal night
#

I mean, I might not appreciate a server forwarding players to my server without my permissions for PR reasons?

wet breach
#

I guess, but I mean players is what you need and if another network is willing to send you players

#

that would seem good

eternal night
#

Yea probably xD

wet breach
#

ah affiliation linking

#

that was what I was trying to think of

#

wonder if it would be feasible to implement that now or if it would even work ๐Ÿค”

mortal hare
#

how can i convert enchantment id from the Set Container Property packet to Enchantment object

eternal night
#

yarn mapping names skully

mortal hare
#

pre 1.21 there was Enchantment.byRawId(handler.enchantmentId[i]);

#

now its gone since enchantments are now data driven

#

and packet ids are still there but only for display for enchanting table

eternal night
#

but anyway, convert the enchantment reg into an id map

#

asHolderIdMap

#

on proper mappings run

mortal hare
#

?

eternal night
#

huh?

mortal hare
#

there's no method supplied for converting id to Enchantment

#

?

eternal night
#

There is?

#

via the registry

mortal hare
#

what's that site you gave me with mappings again

eternal night
mortal hare
#

got it

#

?mappings

undone axleBOT
remote swallow
eternal night
#

getIndexedEntries

eternal night
#

who doesn't own a .dev domain smhduck

mortal hare
#

isnt this kinda unsafe, since if you edit native mc datapack enchantment order everything fucks up?

remote swallow
eternal night
#

the menu would have to survive a registry edit

#

which it won't because you'd have to boot players into configuration stage when you edit the registry while the server is running

mortal hare
#

but i cant find a code with such hardcoded ids

#

so i guess wiki.vg might just took default datapack for enchantments

#

and provided ids like this?

#

am i wrong?

eternal night
#

those ids change every version

#

they are version (and in case of datapack entries) load-order specific ids

slender elbow
#

that depends solely on the order in which enchantments are registered in the registry in source code, which is how the fields are ordered

#

they aren't exactly hard-coded, which is why you should use the registry

mortal hare
#

those new Registries fucked up the whole codebase of my beloved mod

#

so i try to fix it ๐Ÿ˜„

eternal night
#

yea but what is the issue now?

mortal hare
#

i've resolved it

eternal night
#

grab the int id, ask the IdMap and good you are

#

noice NODDERS

mortal hare
#

with getIndexedEntries()

eternal night
#

Yee

shadow night
slender elbow
#

not exactly

mortal hare
#

idk man this is the latest protocol

#

its just that they're not persistent hardcoded ids

#

more like indexes of load order

opal gazelle
#

Hello, I want to make a message appear in the action bar.
I found this code online:

    public static void sendActionBar(Player player, String message){
            CraftPlayer p = (CraftPlayer) player;
            IChatBaseComponent cbc = ChatSerializer.a("{\"text\": \"" + message + "\"}");
            PacketPlayOutChat ppoc = new PacketPlayOutChat(cbc,2);
            ((CraftPlayer) p).getHandle().playerConnection.sendPacket(ppoc);
        }```
However, I cannot import `PacketPlayOutChat`.  An image to the packets I can import is [here](https://tijme.s-ul.eu/On1ibGIT). I have imported spigot-1.21-R0.1-SNAPSHOT.jar and spigot-api-1.21-R0.1-SNAPSHOT.jar, and am running spigot-1.21.jar. Any ideas are welcome!
eternal night
#

1.20.4 has API for action bar

#

I'd also suggest running 1.21 if you are coding against the 1.21 API jar

opal gazelle
#

i have both the api and the server imported

eternal night
#

Yes

#

I can see that

#

again, you do not need packets for this

#

simply use the existing API on the player

mortal hare
#

ok now i need help to find Enchantment#canCombine() substitute?

#

any ideas

#

got it

#

yarn is really fucking up me

#

Enchantment#canCombine() became Enchantment#canBeCombined L

eternal night
#

propose a PR to move it to mojang mappings

#

like a real g

eternal night
#

that is a spigot method

mellow edge
#

so, InventoryDragEvent#getInventory returns the Inventory from InventoryEvent, I want to check whether the drag happened inside a chest or in player's inventory, but the InventoryDragEvent#getInventory returns the primary inventory (so only chest inventory no matter where you drag)

opal gazelle
#

huh, i can't import it

eternal night
#

I'd presume such is the case because you said you "imported" jars

#

which already sounds like you are not using a build tool

#

and are hence missing all transitive dependency

opal gazelle
#

i used the build tool

eternal night
#

"the build tool" ?

#

maven or gradle

opal gazelle
eternal night
#

share your pom.xml then

#

?paste

undone axleBOT
opal gazelle
eternal night
#

Yea

#

don't import the API by having it point at a file

opal gazelle
#

oh

eternal night
opal gazelle
#

thanks mate

runic pine
#

DELOMBOK NOT WORKS

#

HOW I SOLVE

#

Resolving dependency configuration 'compileOnly' is not allowed as it is defined as 'canBeResolved=false'.
Instead, a resolvable ('canBeResolved=true') dependency configuration that extends 'compileOnly' should be resolved.

river oracle
#

Damn that sucks bro

#

You know getting some code would be wild asf tho

chrome beacon
#

gradle moment

river oracle
small valve
#

If I hold a spawner in my main hand, how do I get the entity type of the spawner that I am holding?

quiet hearth
#

how do I find a structure at a certain index by how close it is to a certain location?

small valve
# river oracle BlockStateMeta
        ItemStack item = event.getPlayer().getInventory().getItemInMainHand();
        BlockStateMeta blockMeta = (BlockStateMeta) item.getItemMeta();
        CreatureSpawner creatureSpawner = (CreatureSpawner) blockMeta.getBlockState();

something like this?

quiet hearth
chrome beacon
#

that can be quite performance intensive to do

rigid loom
#

How do i make a command confirmation that can use multiple args? I tried using md5's thing but it can only accept "/punish target.getName", but i need to do /punish <target> <reason>

dense oracle
#

arg[1]
?

#

Or what do u mean with confirmation?

#

Tab completion?

rigid loom
#

But yes arg 1 would be the reason

tardy delta
#

send a clickable text component

flat lark
#

I used build tolds to remapped 1.21 its work but I cannot access PlayerConnection now.

chrome beacon
#

?mappings

undone axleBOT
flat lark
runic pine
#

DOES ANYONE KNOW HOW TO SOLVE LOMBOK NOT BEING RECOGNIZED IN THE COMPILATION?

#

10H ON THIS ERROR

chrome beacon
#

is

remote swallow
#

use the lombok gradle plugin, check you compile with gradle or remove lombok

runic pine
chrome beacon
#

well it really depends on what you mean by all, but if you're talking about the mapping labels

#

then yes

rigid loom
chrome beacon
tardy delta
#

fuck

chrome beacon
#

too slow

tardy delta
#

olivo always lurking

chrome beacon
#

so why are you running the jar task

#

instead of build

runic pine
#

i alwaysI always compiled with this button but with the "build" button it's the same thing

chrome beacon
#

also use the lombok gradle plugin

runic pine
chrome beacon
#

and what happens if you try it

runic pine
#

and even this project worked yesterday, but the damn intellij I don't know what got into his head today but this shit started today, I've already reinstalled 3 different versions

runic pine
river oracle
#

but make sure you don't blind cast

chrome beacon
#

not an intellij error

#

so a real gradle moment

river oracle
#

what not using alt+insert does to a MF

runic pine
runic pine
runic pine
#

you have gradle to maven convertor idk

river oracle
#

๐Ÿ‘€ or you could make a bug report

#

idk how else you expect it to get fixed

runic pine
river oracle
#

well I wouldn't be worried about developing then

#

go enjoy your last week of life

#

take a vacation or something

sterile leaf
#

is there anyway to update player's profile after setting skin on 1.20.6?

torn shuttle
#

me sowing: haha yeah this is awesome
me reaping: wtf, this sucks, what the hell

#

this meme format is living rent free in my head

flat lark
#
    public void SetSkin(Player player) {
        GameProfile profile = ((CraftPlayer)player).getProfile();
        ServerGamePacketListenerImpl connection = ((ServerPlayer)player).connection;

        connection.sendPacket(new ClientboundPlayerInfoRemovePacket(Collections.singletonList(profile.getId())));

        int randomSkin = new Random().nextInt(skins.size());
        Property property = new Property("textures", skins.get(randomSkin));

        profile.getProperties().removeAll("textures");
        profile.getProperties().put("textures", property);

        connection.sendPacket(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, ((CraftPlayer)player).getHandle()));

    }

I am kinda stumped. With replacing EntityPlayer with ServerPlayer and its still having issues. "Casting 'player' to 'ServerPlayer' will produce 'ClassCastException' for any non-null value "

eternal oxide
#

you don't cast a CraftPlayer to a Server player without .getHandle()

flat lark
#

I'm a bit confused in what variable your refering too?

#

The connection or profile?

eternal oxide
#

CraftPlayer#getHandle() returns the ServerPlayer

ancient forge
#

Anyone know any good youtube playlist that explain on like getting started i cant seem to find one that really like updated/helpful

#

i was watching the one by kangarko but that one doesnt really help

flat lark
river oracle
#

how is it confusing

torn shuttle
#

I'm working very hard into researching ways that I can continue my grindset after I die

river oracle
#

if you don't know java learn some java first then come back to spigot

ancient forge
#

I took a basic java course through codeacademy but that is about it

runic pine
#

@chrome beacon ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ

river oracle
runic pine
#

maven not fix my problem

#

๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ ๐Ÿ˜ญ

river oracle
#

then you have an incorrect configuration

runic pine
torn shuttle
#

what is this guy's error anyway

#

he's been on this for at least 6 hours

runic pine
river oracle
runic pine
#

shit the compiler doesn't recognize lombok

torn shuttle
#

what is the error

runic pine
#

I have already changed the version of intellij, added a plugin for gradle, changed intellij settings, changed to maven

runic pine
torn shuttle
#

buddy

#

basically get a log

runic pine
#

log of??

torn shuttle
#

you failing to compile

runic pine
#

bri, I already said the compilation problem

torn shuttle
#

alright that's fine enjoy your next 10 hours of whining about it then

river oracle
#

factualllll

runic pine
river oracle
#

damn that's wild

torn shuttle
#

crazy

river oracle
#

I would have figured you just guessed

eternal oxide
#

?paste teh FULL log or shhh

undone axleBOT
torn shuttle
#

tell you what since you've seen it just mail your brain to me and I will read the data directly from it

river oracle
#

magma guy yet again being spigot's #1 genius problem solver

runic pine
#

neither maven nor gradle recognize lombok. what can i do

eternal oxide
#

post teh log ,as you've been told

torn shuttle
#

whatever you do don't give us more info than that

#

they're trying to scam you into leaking your social security number so they can lower your social credit score

#

they're inside your walls and under your bed

runic pine
eternal oxide
#

yep going to hack his log and tunnel into his firewall

torn shuttle
#

did you hit your head against a pipe in the last 10 minutes and get amnesia

runic pine
torn shuttle
#

fucking lmao

#

I'm not saying anything

runic pine
#

@eternal oxide

torn shuttle
#

I refuse

runic pine
#

It's the way I don't waste my time doing the things you say

torn shuttle
#

yeah defnitely this log is completely useless

#

good thing you've been withholding it and not reading it, great call

runic pine
#

Exactly, why did you ask me for the log then?

torn shuttle
#

yeah sorry

#

that was really dumb of me

river oracle
#

wow that log was very useless

torn shuttle
#

yeah

#

sucks

#

oh well

river oracle
#

should have never asked for it

torn shuttle
#

really it's wasting storage space on pastebin

#

you ought to delete it

runic pine
#

Now it's my fucking fault?

river oracle
#

mmm sure

torn shuttle
#

I think they're putting lead in the water again

#

it's the only explanation

eternal night
#

I don't like my API status available

river oracle
torn shuttle
torn shuttle
#

you weirdo

#

why would you want that

#

ngl pastebin should probably do something about these, kinda wild

#

also one of those things AI is actually really suited for if you can afford it, since it can read and somewhat judge the contents

rigid loom
#

how do i wait for a ClickEvent to occur before executing the code?

runic pine
#

neither maven nor gradle recognize lombok. what can i do

river oracle
#

you could stop asking the same question in spigot help dev

runic pine
river oracle
# runic pine I waited 30 minutes to ask again

https://github.com/projectlombok/lombok/issues/3704

make sure your lombok is up to date to latest ensure you're compiling with java 22. If all of these steps are followed it is likely a lombok issue

GitHub

Describe the bug Using the combination of @Data, @Builder,@NoArgsConstructor, and @AllArgsConstructor throws the error that - constructor Person() is already defined in class com.example.Person To ...

#

in which case you shuold be making an issue or following an issue

#

not asking in spigot help development

torn shuttle
#

I am so ahead of my time my messages come from the future

river oracle
#

we are not the lombok maintainers

rigid loom
river oracle
#

generally a hashmap with a UUID function

#

since ClickEvents can't have code embedded inside of them you can just make a command

eternal oxide
#

I don't really understand his question

river oracle
#

he wants code to run when a player clicks text

#

easiest way to do this is just a hashmap with the players uuid and function

eternal oxide
#

ah chat click events

river oracle
#

that way you can delegate a specific function to each player

torn shuttle
#

I mean

#

I just make them run a command

rigid loom
#

this is part of the code

river oracle
#

my eyes

rigid loom
#

22-34 approximately

river oracle
#

can we chill a bit on the arrow pattern

#

I wish I had that gif saved ๐Ÿ˜ญ

rigid loom
#

but basically what it does it that you have to confirm via click before it will run the command

river oracle
#

yeah so just do wh at I said

#

use a Command

#

Map<UUID, Function<Input, Output>>

remote swallow
#

you can even use a fake command of a uuid and cancel in player pre command

rigid loom
#

ive nvr messed with precommands

#

the key is what? the target?

river oracle
#

yeah ofc

#

gotta beable to do a little thinking for yourself it helps you grow and get better

#

A Map with a command or fake command is the way

rigid loom
#

what is "Function<Input, Output>"?

river oracle
#

whatever function you want Ig

#

I mean it could be literally anything

#

its any arbitrary code you want to run

rigid loom
#

ah ok

#

is it even possible to check if a ClickEvent is on a TextComponent?

river oracle
#

I mean you coulddd but like why would you even need to

#

you're the one whose making the component shouldn't you know just by looking at it

torn shuttle
#

my hands are completely shredded

river oracle
torn shuttle
#

that would be an interesting workout routine

rigid loom
worldly ingot
#

They're asking why you need to check

#

Not why you want to add one :p

river oracle
#

I mean adding a click event is pretty self explanatory why you need to check it even exists is not

#

if you take the approach I said when you construct the component you push to your map with the function that needs to be executed

#

no need to have any knowledge of what is and isn't on the component after you send it

vast ledge
#

Anybody got any ideas on stuff I could optimize?

river oracle
#

you could optimize sending your code by using a paste

vast ledge
#

?paste

undone axleBOT
river oracle
tardy delta
#

public static hashmap, ah cmon

vast ledge
#

.-.

#

I dont wanna create a new hashmap everytime, so it needs to be static, and i didnt want to create a map in the main plugin, so i ended up using a static one

#

And I dont like singletons

wraith delta
#

.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text("Click to teleport!"))); Question I have this, how could I make it so that when I actually click it I could make it run a piece of code, not command, player.teleport(xyz)

vast ledge
#

You dont

#

You can make it run a command, then have that command execute code

wraith delta
#

Would I have to register the command in pluginyml?

vast ledge
#

Probably

#

You could catch the command pre-process event

#

i dont know if that is triggered, if the command isnt registered

wraith delta
#

thnx will look at it

vast ledge
#

thats something you'd have to test

runic pine
vast ledge
#

Sayign "neither maven or gradle recognize lombok", is rather pointless, you provide no stacktrace nor a description of your Issue

meager wolf
#

A while ago, i made a "sign gui" in a serverside forge mod, where a sign window pops up to the player and he can write whatever he wants and u can do whatever u want with that input, and im doig it by sending the player data about a ghost sign block, so other players wont see the sign, however, the player who has the sign menu can see it, i tried putting it far away, but the client can only open signs 13 blocks away i think. I know other plugins did the same thing, hypixel has it too, but in hypixel, i cant see the sign, it never appears in even a 50 blocks radius, how do they do it?

#

Sorry for big text i cant get the point over in short sentences :b

river oracle
#

nothing we can do about that

#

you could just fork lombok and try and figure it out yourself

tardy delta
#

or switch to kotlin

river oracle
#

or use alt+insert

remote swallow
runic pine
#

neither maven nor gradle recognize lombok. what can i do

tardy delta
#

wdym recognize

runic pine
#

etc

tardy delta
#

havent had the opportunity to get it working either ๐Ÿฅบ

runic pine
#

whart

#

wdym

tardy delta
#

are you using intellij?

#

theres some enable annotation processing option somewhere in the settings

runic pine
tardy delta
#

no clue then, havent even got it working myself

runic pine
#

wdym srry

vast ledge
tardy delta
#

ye

vast ledge
#

you mean

@Getter
@Setter
tardy delta
#

yes

runic pine
#

Are you going through the same problem as me?

vast ledge
#

I mean im using gradle

    compileOnly ("org.projectlombok:lombok:1.18.24")
#

does lombok need to be shadded?

runic pine
#

annotationProcessor("org.projectlombok:lombok:1.18.24")

#

need this too

#

but on my project not works

vast ledge
#
    annotationProcessor ("org.projectlombok:lombok:1.18.24")
#

can you show your build.gradle

#

?paste

undone axleBOT
vast ledge
#

^on there

runic pine
#

dependencies {
compileOnly("org.spigotmcspigot1.8.8-R0.1-SNAPSHOT")
compileOnly("org.projectlombok:lombok:1.18.24")
compileOnly(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
implementation("me.devnatan:inventory-framework-platform-bukkit:3.0.8")
implementation("co.aikar:acf-bukkit:0.5.1-SNAPSHOT")
compileOnly("com.nickuc.chat:nchat-api:5.6")

annotationProcessor("org.projectlombok:lombok:1.18.24")

}

vast ledge
#

what do you have in your respositories {

#

you do

runic pine
#

repositories {
mavenCentral()
mavenLocal()

maven("https://jitpack.io")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://repo.codemc.io/repository/maven-releases/")
maven("https://repo.aikar.co/content/groups/aikar/")

}

vast ledge
#

ok you have mavenCentral()

#

Lemme make a new project

runic pine
#

but I didn't understand. Do you want to use lombok in your project or help me with my problem?

vast ledge
#

Im trying to help you, i have it working for me

runic pine
#

oh ok

#

I believe it is not a problem with the gradle configuration because I have already tried gradle and maven

#

and yesterday I was using this build.gradle.kts

#

and there was no problem at all

#

I've tried changing Java versions, reinstalling IntelliJ, changing versions between IntelliJ and nothing

vast ledge
#

Its working fine for me, on a new project

runic pine
#

send your full

#

build.gradle

#

pls

vast ledge
#

?paste

undone axleBOT
vast ledge
runic pine
#

is .kts?

vast ledge
#

no

#

I dont use kotlin

runic pine
#

i using java

#

but

#

i use kotlin gradle

vast ledge
#

Sec, making a kotlin project

runic pine
#

but I won't even try, I already switched to maven

#

It's not even worth it, bro, I already know it won't work

#

1 day in this shit trying to fix it

vast ledge
#

It works on a new project

runic pine
#

im using java

#

not kot

cyan silo
#

Hey guys, Ive been trying to find this out for a while but failed. I want to make a plugin, that teleports players to a certain location. When they type for example /shop , this plugin will teleport them to X1000 y2000 . Does anyone have any experience with this? Thank you

vast ledge
#
plugins {
    kotlin("jvm") version "2.0.20-Beta2"
    id("com.github.johnrengelman.shadow") version "8.1.1"
}

group = "dev.bedless"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
    maven("https://repo.papermc.io/repository/maven-public/") {
        name = "papermc-repo"
    }
    maven("https://oss.sonatype.org/content/groups/public/") {
        name = "sonatype"
    }
}

dependencies {
    compileOnly("io.papermc.paper:paper-api:1.21-R0.1-SNAPSHOT")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    compileOnly ("org.projectlombok:lombok:1.18.24")
    annotationProcessor ("org.projectlombok:lombok:1.18.24")
}

val targetJavaVersion = 21
kotlin {
    jvmToolchain(targetJavaVersion)
}

tasks.build {
    dependsOn("shadowJar")
}

tasks.processResources {
    val props = mapOf("version" to version)
    inputs.properties(props)
    filteringCharset = "UTF-8"
    filesMatching("paper-plugin.yml") {
        expand(props)
    }
}

runic pine
#

let me see

vast ledge
inner mulch
#

if not i can teach you

cyan silo
inner mulch
#

have you set up a project?

cyan silo
#

But I would be reaฤบy grateful if I would get any help with that

cyan silo
runic pine
#

@vast ledge kotlin compiler your .kts?

inner mulch
runic pine
#

what the differences

#

of your .kts

#

from mine

cyan silo
runic pine
#

you using kotlin compiler?

#

idk

vast ledge
runic pine
#

its installing a plugin

vast ledge
runic pine
vast ledge
#

build.gradle.kts usually shows that you are using kotlin

inner mulch
runic pine
vast ledge
#

if you're writing java your build file should be build.gradle

#

not build.gradle.kts

cyan silo
#

Is ideaIU supposed to have 1GB?

runic pine
#

It can be whatever I want

inner mulch
vast ledge
runic pine
#

my project on java using build.gradle.kts

vast ledge
#

Pick community

mortal hare
#

honestly

#

this mod that im porting isnt even worth to port

cyan silo
mortal hare
#

it needs whole rewrite

#

due to 1.21 changes

tardy delta
#

wonderful isnt it

mortal hare
#

i'll still do a PR, but the code is so shitty due to how it was so hardcoded to initial enchantment types and ids

vast ledge
cyan silo
#

So creating plugin is programming in JAVA, right?

mortal hare
#

and 1.21 changes everything since you can now create your own enchantments

vast ledge
#

or kotlin

mortal hare
#

well

#

you can create skripts, which is a language dedicated for easy mc scripting

#

or use kotlin

vast ledge
#

but thats a "branch" of java ig

#

Personally, i dont like kotlin, but that depends on your taste, and preferences!

mortal hare
vast ledge
#

cus you have a kotlin build file, but are writing pure java?

runic pine
mortal hare
#

kotlin is like c++, in order to know what im seeing i need to know billions of rules of implicit syntax

runic pine
#

Is your whole project in groove?

mortal hare
#

operator overloading and shit

#

simplicity rules

vast ledge
mortal hare
#

well in a second one at least i know who will have access to a func/method

vast ledge
runic pine
#

groove not is java

hybrid spoke
mortal hare
#

public static void main(String[] args)

tardy delta
#

private fun

mortal hare
#

repeat after me

tardy delta
#

๐Ÿ˜‰

vast ledge
runic pine
vast ledge
#

how the fck would you write groove

mortal hare
#

holy shit

#

it compiled successfully

#

for 1.21

vast ledge
#

the mod?

mortal hare
#

after 8 hours

#

lol

quaint mantle
mortal hare
#

yea

#

its so cursed you wouldnt get it

vast ledge
tardy delta
#

had that when making a plugin versiion independent lol

mortal hare
#

how hardcoded it is

torn shuttle
#
    public SetupMinidungeonCommand() {
        super(List.of("setup"),
                Stream.concat(
                        Stream.of("toggle"),
                        EMPackage.getEmPackages().values().stream().map(emPackage -> emPackage.getDungeonPackagerConfigFields().getFilename())
                ).collect(Collectors.toList()),
                "Toggles the installation of specific content.",
                "elitemobs.*",
                true,
                "/em setup toggle <content_filename.yml>");
    }

the only thing more upsetting than how I'm passing the super is that it's not even working right

mortal hare
#

this mod is just a lesson to never trust apis

#

and be agnostic as much as you can

torn shuttle
#

I think I'm about to get some award for that line and then get shot

quaint mantle
vast ledge
#

idk

mortal hare
#

kotlin is tad bit slower

vast ledge
#

he said he had a build.gradle.kts, so I assumed, he'd be writing in kotlin

mortal hare
#

although i should learn it tbh

#

it powers gradle by default

#

why not just use it in a first place

vast ledge
#

I don't like kotlin, because it looks to much, like a script lanuage

#

like typescript, with brackets

tardy delta
#

meanwhile java removing main method

earnest girder
chrome beacon
#

yes it's a real thing

runic pine
vast ledge
#

thats from 1.21.1

earnest girder
#

do I need my IDE to be spigot 1.21.1?

vast ledge
#

They added components instead of meta data or smth

chrome beacon
vast ledge
quaint mantle
earnest girder
#

how do I update it on intelliJ?

chrome beacon
#

well just 1.21

vast ledge
#

Change ur gradle/maven dependecy to 1.21.1

#

1.21*

vast ledge
earnest girder
#

maven

chrome beacon
#

open your pom.xml and change the version

earnest girder
#

kk

runic pine
#

@vast ledge no works

#

your .kts

runic pine
#

remember

#

of my problem?

#

lombok

#

the maven not solves ๐Ÿ˜ฆ

chrome beacon
#

Have you tried Java 21

#

instead of 22

runic pine
#

yes

#

java 17

#

21

vast ledge
#

Sir idk what the fuck you did, but you assaulted you r enitre project

#

Create a new Project

#

And dont pick kotlin

runic pine
#

i created already

#

bro its normal

#

i used kotlin to gradle on java project

#

no have problem for this

#

and you used groove for gradle in your java project

earnest girder
#
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>gg.wicklow</groupId>
    <artifactId>Wicklow2</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>Wicklow2</name>

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
#
<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <repositories>
        <repository>
            <id>spigotmc-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.20.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
```Where do I change the version?
vast ledge
#

in the dependecy

#

<version>1.21-R0.1-SNAPSHOT</version>

earnest girder
#

ok so change 1.20.4-R0.1-SNAPSHOT to 1.21.1?

vast ledge
#

afaik

runic pine
#

๐Ÿคก

mortal hare
vast ledge
chrome beacon
earnest girder
#

thanks

runic pine
vast ledge
#

You get the point right

#

You dont write kotlin

#

your writing JAVA

#

hence

#

the .JAVA

#

ending

earnest girder
#

I'm getting Dependency 'org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT' not found

runic pine
#

BRO

runic pine
#

BUILD.GRADLE

#

ENDS WITH .JAVA?

runic pine
#

BUILD.GRADLE IS GROOVYYYYYYYYYYYY

vast ledge
#

BUILD.GRADLE.KTS

runic pine
#

NOT JAVA

vast ledge
#

KTS = KOTLIN

#

NOT JAVA

earnest girder
runic pine
#

I USE KOTLIN

vast ledge
#

NO

runic pine
#

FOR GRADLE

vast ledge
#

YOU DONT

runic pine
#

WHATS THE PROBLEM?

chrome beacon
runic pine
#

YOU USE GROOVY

vast ledge
#

YOU'RE WRITING JAVA

runic pine
#

FOR THE JAVA PROJECT

vast ledge
#

NOT

#

KOTLIN

runic pine
#

AND

#

YOU'RE WRITING

#

JAVA

chrome beacon
runic pine
#

NOT

#

GROOVY

#

GROOVY NOT IS JAVAAAAAAAAAAAAAAA

earnest girder
vast ledge
#

YOU DONT MIX A KOTLIN BUILD FILE WITH A JAVA PROJECT

wet breach
#

whats with the caps?

vast ledge
#

sorry

remote swallow
#

kotlin build file can be used with java project

runic pine
vast ledge
hybrid spoke
earnest girder
#

wait now the Material class isn't importing, did they remove it in 1.21???

runic pine
wet breach
vast ledge
runic pine
vast ledge
remote swallow
runic pine
#

๐Ÿ˜‚

#

๐Ÿคก

vast ledge
#

SIr

remote swallow
#

you get intellisense with kotlin buildscript

vast ledge
wet breach
runic pine
#

@vast ledge can me aswner a questino?

#

build.gradle ends with .java?

vast ledge
#

Can you answer a question, most likely yes

runic pine
vast ledge
#

Sir, you're getting on my nerves, im just going to ignore you, pester other people with your problem

quiet ice
#

The good thing with groovy buildscripts is that eclipse's buildship plugin can make use of them. So while I know the groovy syntax I won't know the kotlin syntax heh

vast ledge
#

Whats the difference anyways

#

like syntax or smth?

runic pine
vast ledge
#

between .gradle and gradle.kts?

remote swallow
quiet ice
#

Slight syntax differences, yeah

hazy parrot
#

It's just different dsl

wet breach
quiet ice
#

Anyways I surmise this is the same lombok issue you had a few hours before?

runic pine
vast ledge
#

Still complaining abt it

runic pine
#

I still haven't been able to solve it

quiet ice
#

In which case I am impressed by your persistence, but you really ought to use delombok by now

wet breach
#

what does lombok have to do with maven or gradle build files?

runic pine
#

im from Portugal

#

dedication

#

SIUUUUUUUUUUUU

#

10 hours fixing

#

this shit

wet breach
vast ledge
#

Yea

quiet ice
#

Thing is, if it isn't fixable in a few hours, it probably won't be fixable until you get an epiphany months later

vast ledge
#

I was trying to help, but ig I didnt exactly know what was going wrong

wet breach
#

figures I guess

quaint mantle
vast ledge
#

like 1 Year later looking back, and I was so stupid, why didnt i realize this back then

runic pine
#

remove the lombok in 1000 classes?

wet breach
#

and it blows your mind in how you never knew about it before

vast ledge
#

Some secret, that solves most of the problems :D

hazy parrot
runic pine
#

w

#

o

#

r

#

k

#

s

quiet ice
runic pine
#

more bugged that lombok

runic pine
#

more bugged that lombok

vast ledge
#

Why does one even need lombok, in the time you've spent yelling about it, you could've just written the getters and setters yourself

runic pine
#

At least lombok worked for me. delombok didn't.

earnest girder
wet breach
#

be funny if it was a caching issue with the building

earnest girder
#

Material and CropState

wet breach
#

and they really had no problem to begin with

runic pine
quiet ice
#

I REALLY need to find that "Only help, no info" meme one of these days

vast ledge
remote swallow
young knoll
#

I assure you material is still called material

remote swallow
#

you assume me

vast ledge
#

xD

remote swallow
#

cant believe your assuming materials identity

runic pine
#

that i listen this

#

today

vast ledge
#

I didn tsee material, ithought he was talking abt CropState

runic pine
#

something wrong not is right

runic pine
#

i added id("de.lukaskoerfer.gradle.delombok") version "0.2" with annotationproccessor and compileonly lombok? @quiet ice

#

or i remove this?

remote swallow
#

no its an intellij plugin

vast ledge
#

On intellij, thers a bar on the right, it should look like this

runic pine
#

compileOnly("org.projectlombok:lombok:1.18.32")
annotationProcessor("org.projectlombok:lombok:1.18.32")

#

i remove this

#

to delombok?

quiet ice
#

Delombok is a standalone application

vast ledge
runic pine
#

no need then

#

?

remote swallow
chrome beacon
quiet ice
#

Yeah

earnest girder
runic pine
# quiet ice Delombok is a standalone application

Resolving dependency configuration 'compileOnly' is not allowed as it is defined as 'canBeResolved=false'.
Instead, a resolvable ('canBeResolved=true') dependency configuration that extends 'compileOnly' should be resolved.

vast ledge
#

Discord should add the ability, to have blocked messages not show

quiet ice
#

Remove the gradle plugin

#

Obscure gradle plugins are generally pretty badly written either way

runic pine
earnest girder
runic pine
#

compileOnly("org.projectlombok:lombok:1.18.32")
annotationProcessor("org.projectlombok:lombok:1.18.32")

#

only this

vast ledge
#

I use coretto

earnest girder
#

ok

runic pine
#

change to 22

quiet ice
#

Remove all traces of lombok in your buildscript for the better word of it

runic pine
#

ok

#

but it est this already

#

then i know that will no works

quiet ice
#

including that delombok plugin. I have no idea what such a plugin needs to exist

quiet ice
runic pine
#

Resolving dependency configuration 'compileOnly' is not allowed as it is defined as 'canBeResolved=false'.
Instead, a resolvable ('canBeResolved=true') dependency configuration that extends 'compileOnly' should be resolved.

#

same error

quiet ice
#

Paste the entire build.gradle file

#

My assumption is that you did not get rid of that plugin

runic pine
quiet ice
#
id("de.lukaskoerfer.gradle.delombok") version "0.2"

Nuke this line

runic pine
#

how i execute delombok

#

then

earnest girder
#

after updating my dependency to 1.21 a bunch of classes like Material and EntityType aren't importing. I tried updating intellij and switching from java 22 to 21

chrome beacon
chrome beacon
#

?java21

#

?java17

undone axleBOT
chrome beacon
#

^^ open and select 21

runic pine
earnest girder
chrome beacon
earnest girder
#

yes

quiet ice
#

No - delombok is an application that will modify your source code forever. So it might be adviseable to create a git commit before doing so

#

However after you run delombok you can throw it out of the window forever

chrome beacon
earnest girder
#

how do you do that?

chrome beacon
#

Should be somewhere under the File tab

runic pine
#

why i download the lombok.jar

#

oh ok

#

commands requires lombok.jar

quiet ice
#

RTFM

runic pine
#

ok

quiet ice
#

Yeah

earnest girder
runic pine
#

have this now

quiet ice
#

my god

runic pine
quiet ice
#

Just create an annotation of that name in your project

runic pine
#

but this remove

#

spaces

quiet ice
#

It's a destructive tool - it basically does what the lombok AP already SHOULD do in the background

cyan silo
#

@inner mulch Sorry to bother. I just installed what you told me to and started a new project in JAVA. Now im pretty much lost ๐Ÿ˜…

quiet ice
#

Though uh, may I ask why you have lombok in 1k classes and only figured out now that lombok doesn't even work?

chrome beacon
earnest girder
#

how do I give an item meta to a potion? getItemMeta() returns null and I need to use ItemMeta#setMaxStackSize().

vast ledge
#

PotionMeta

#

or smth

quiet ice
vast ledge
#

Idk how it is in the newer versions

mortal hare
#

now i made to finally launch

chrome beacon
runic pine
vast ledge
#

but "back in the day", we had PotionMeta

mortal hare
#

but now it crashes when i hover over armor hud

cyan silo
mortal hare
#

๐Ÿฅฒ

vast ledge
#

?learnjava

undone axleBOT
#

For Beginners:

Codecademy - Learn Java: Interactive Java programming course from basics to more advanced concepts. Perfect for absolute beginners.
https://www.codecademy.com/learn/learn-java
JetBrains Academy - Java Developer Track: Learn by doing with projects and challenges. It covers Java fundamentals to advanced topics.
https://www.jetbrains.com/academy/
Udemy - Java Programming Masterclass for Software Developers: Updated courses that cover Java 8 to Java 17 features. Suitable for those who prefer structured learning.
https://www.udemy.com/course/java-the-complete-java-developer-course/

For Intermediate to Advanced Learners:

Oracle Java Tutorials: The official guides by Oracle for Java programmingโ€”great for understanding the depth of Java.
https://docs.oracle.com/javase/tutorial/
Baeldung - Learn Java and Spring: Focus on Spring Framework and modern Java technologies. Best for intermediate learners aiming to expand their knowledge.
https://www.baeldung.com/

Practice and Hands-on Learning:

Exercism - Java Track: Solve exercises and get feedback from mentors. Great for practicing coding skills.
https://exercism.io/tracks/java
LeetCode: Practice your coding skills and prepare for technical interviews with Java.
https://leetcode.com/

Free Resources and Documentation:

Java Programming and Documentation: A comprehensive collection of Java programming guides, tutorials, and API documentation.
https://docs.oracle.com/en/java/

Community and Support:

Stack Overflow: A vast community of developers. Great for getting help with specific problems or understanding concepts.
https://stackoverflow.com/questions/tagged/java
r/learnjava on Reddit: Join the community of Java learners and get advice, share resources, and discuss projects.
https://www.reddit.com/r/learnjava/

Remember: Learning to program takes practice and patience. Don't hesitate to experiment with code and participate in community discussions. Happy coding! ๐ŸŽ‰

chrome beacon
vast ledge
#

^@cyan silo

quiet ice
# runic pine today

Yeah, but did you do anything that would cause such an issue (updating Java, Lombok or other modifications to the buildscript)?

runic pine
#

otherwise it was the only thing I did, I hadn't changed anything in build.gradle.kts or java version, nothing

#

I've already tried to go to the 2023 version of intellij but it didn't work

earnest girder
#

thanks

quiet ice
#

IntelliJ shouldn't make a difference here

cyan silo
#

I went here to find out, if anyone knows the code to run what I want to.

runic pine
vast ledge
#

@cyan silo hop in the general-1 vc

runic pine
#

There are some topics talking about changing the intellij settings

quiet ice
#

IntelliJ makes no difference as IJ shouldn't be the thing compiling your project - I dearly hope so at least

cyan silo
vast ledge
#

np

inner mulch
quiet ice
#

If you feel like it, you can DM me your entire project as a ZIP and I could try to find a proper solution that way, but otherwise try downgrading lombok and hope that that does it's trick

mortal hare
#

i literally needed to fix that much

#

its half of the project that was broken due to new system

runic pine
mortal hare
#

at least now it loads into mc

quiet ice
#

Is this part of a multi-module gradle build?

mortal hare
#

still crashes at tooltips

mortal hare
#

that was hardcoded to enchantment types

quiet ice
#

Nah, it's related to @runic pine

mortal hare
#

and bam 1.21 introduce data driven enchantments

#

and guess what, everything's broken

quiet ice
#

Otherwise, try to update/downgrade the version of gradle you are using as defined by IntelliJ and the command line via the gradle wrapper

mortal hare
#

if i was project owner, i would port this to 1.21 at a half baked state, and then do a project rewrite

#

because codebase is literally screaming when being put into 1.21

runic pine
runic pine
#

and ugprade to 8.9

#

but no works too

#

i will generated getters

#

manually

#

unique alternative

#

ctrl alt insert is the cmd?

quiet ice
runic pine
#

But I get sick of not seeing a project of mine without Lombok

#

I'll learn kotlin soon

quiet ice
#

I mean, people are going to hate me for that, but: Public fields.

runic pine
runic pine
#

I even wanted to know why there was prejudice about this, by chance.

quiet ice
# runic pine but no works too

Okay, then the only thing that could be an issue is the JDK you are using having suddenly changed, running the javaToolchains task could help here.

runic pine
#

idk what is

blazing ocean
#

fuck getters and setter

#

s

#

embrace fields / kotlin

#

(same thing)

quiet ice
#

I'm very frequently "abusing" public fields in my personal projects. As long as it's not intended to have a public API, exposing the internals of your application is completely okay

quiet ice
blazing ocean
runic pine
#

How do non-personal projects in kotlin deal with this if there are no getters? Can they manually define private if they want?

blazing ocean
#

wdym?

runic pine
blazing ocean
#

kotlin just handles them the same way

runic pine
#

project - help - javatoolschains

#

but no works

torn shuttle
#

it seems like I'm doing something weird

blazing ocean
#

wyd

runic pine
torn shuttle
#

I'm magically turning a list into a string

blazing ocean
# runic pine wdym

i'm not sure what you're talking about, but if you mean public fields in java? kotlin handles them the same way as getters/setters

torn shuttle
#

a really neat magic trick

quiet ice
#

I'd run ./gradlew -q javaToolchains

torn shuttle
#
    public SetupToggleCommand() {
        super(List.of("setup"),
                Stream.concat(
                        Stream.of("toggle"),
                        EMPackage.getEmPackages().values().stream().map(emPackage -> emPackage.getDungeonPackagerConfigFields().getFilename())
                ).collect(Collectors.toList()),
                "Toggles the installation of specific content.",
                "elitemobs.*",
                true,
                "/em setup toggle <content_filename.yml>");
        Logger.debug("wtf " + EMPackage.getEmPackages().values().stream().map(emPackage -> emPackage.getDungeonPackagerConfigFields().getFilename()));
        EMPackage.getEmPackages().values().stream().map(emPackage -> emPackage.getDungeonPackagerConfigFields().getFilename()).forEach(str -> Logger.debug("uh " + str));
    }

thoughts about my al dente pasta

blazing ocean
#

wtf

runic pine
runic pine
torn shuttle
#

I wonder if collect it somehow turning my list in a list into just a string

#

or something

blazing ocean
wintry elk
torn shuttle
#

?paste

undone axleBOT
runic pine
torn shuttle
blazing ocean
torn shuttle
runic pine
#

and how do I make this variable immutable without setters

blazing ocean
blazing ocean
torn shuttle
#

I don't know if it's concat or collect or what that is flattening this, or even none of the above

blazing ocean
#

val = value, var = variable

runic pine
#

its confused

#

ahah

blazing ocean
torn shuttle
#

oh

earnest girder
#

is 1.21 spigot giving error outdated build for everyone?

torn shuttle
#

wait what

#

ok

#

this is getting even weirder?

runic pine
torn shuttle
#

aaaaah

#

no

#

damn it

chrome beacon
runic pine
torn shuttle
#

it's literally flattening it

blazing ocean
earnest girder
#

I just updated everything

chrome beacon
earnest girder
#

wasnt getting the error before

torn shuttle
#

ok is what I'm trying to do even possible in java without using a purpose made container or something

earnest girder
#

I just updated to 1.21 and NOW I'm getting the error

torn shuttle
#

trying to initialize a list that can contain a list, inside of the initialization because it's for a super

#

and I do have to stream the data

chrome beacon
runic pine
earnest girder
chrome beacon
quiet ice
blazing ocean
chrome beacon
#

The reason why you're outdated is because you downloaded fron a 3rd party

earnest girder
chrome beacon
#

You don't have to send the link or name

quiet ice
#

ohno, not the forbidden site again

blazing ocean
#

just a big

#

coincidence

runic pine
#

just believe seeing

earnest girder
#

what is the first party?

chrome beacon
vast ledge
#

?buildtools

undone axleBOT
earnest girder
#

huh didnt know that was third party

chrome beacon
#

And hopefully not malware

earnest girder
#

get bukkit .org can give you malware?????

vast ledge
#

To be sure, use buildtools, to build your server jars

quiet ice
# runic pine what can i do then

Temporarily (temporarily as I'd be surprised if this makes a difference) comment out

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(22)
    }
}
blazing ocean
blazing ocean
#

just run buildtools

quiet ice
chrome beacon
#

I mean nothings stopping them. I haven't actually checked the jars they give