#help-development
1 messages ยท Page 1074 of 1
I mean, "overhead" is a statement
in that case just use some redis alternative
yeah which the transfer packet is not really compatible with proxies at the moment or most of them anyhow
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.
not sure what you are saying, bungee doesn't implement transfer packet I don't think
you need to send packets to write and read that data, its not as if you can manipulate that data from the client itself which would make it pretty useful
I mean, it does to the degree for you to switch proxies
which is what it would be used for in a proxy context
I am aware, still need the proxy to implement it to use it
huh?
I suppose you could just create the packet manually
spigot API has it
doesn't help if there is a bungee
I think bungee API does too
imagine server doing round trip back and forth just to get some couple kb of data
instead of storing it inside his own memory
i just dont see the point of it apart from transfer packet
that isn'T the point of this
yea
it is purely there for cross server communication
ah it does, but its experimental
Yea
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
I can see it being useful even on the same proxy
now afaik you need to have player joined to read it
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
I guess? โข๏ธ
if you wanted to use it for specific servers
idk, mostly use it for switching out proxies that should be removed
yeah that is the other advantage of transfer packet
to transfer between proxies
which is actually a pretty neat usage really
Yea it is great
like if you were going to reboot your network
allows you to restart proxies without loosing your players
^
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

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
iirc the client does indicate if it joined via transfer
and the server does have the config to prevent it
interesting
would there be a reason to prevent it?
can't really think of a good reason to block transfer connections unless it was for a backend of course
I mean, I might not appreciate a server forwarding players to my server without my permissions for PR reasons?
I guess, but I mean players is what you need and if another network is willing to send you players
that would seem good
Yea probably xD
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 ๐ค
how can i convert enchantment id from the Set Container Property packet to Enchantment object
yarn mapping names 
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
but anyway, convert the enchantment reg into an id map
asHolderIdMap
on proper mappings 
huh?
what's that site you gave me with mappings again
Compare different mappings with this website: https://mappings.cephx.dev
they own mappings.dev?
getIndexedEntries
isnt this kinda unsafe, since if you edit native mc datapack enchantment order everything fucks up?
me
i thought it was just mappings.cephx
I mean, not really?
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
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?
those ids change every version
they are version (and in case of datapack entries) load-order specific ids
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
i do use the registry i just work on the clientside mod atm, and the only i have is current enchantment id due to how im working with a gui
those new Registries fucked up the whole codebase of my beloved mod
so i try to fix it ๐
yea but what is the issue now?
i've resolved it
with getIndexedEntries()
Yee
Those numeric IDs are from the past
not exactly
idk man this is the latest protocol
its just that they're not persistent hardcoded ids
more like indexes of load order
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!
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
i have both the api and the server imported
Yes
I can see that
again, you do not need packets for this
simply use the existing API on the player
declaration: package: org.bukkit.entity, interface: Player, class: Spigot
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
i don't use bungee though
that is a spigot method
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)
huh, i can't import it
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
i used the build tool
oh you're talking about that, though this https://www.spigotmc.org/wiki/buildtools. i'm using maven
oh
thanks mate
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.
gradle moment
I'm putting 100 down on a skill issue rather than gradle issue
If I hold a spawner in my main hand, how do I get the entity type of the spawner that I am holding?
BlockStateMeta
how do I find a structure at a certain index by how close it is to a certain location?
ItemStack item = event.getPlayer().getInventory().getItemInMainHand();
BlockStateMeta blockMeta = (BlockStateMeta) item.getItemMeta();
CreatureSpawner creatureSpawner = (CreatureSpawner) blockMeta.getBlockState();
something like this?
eg. first closest structure second closest structure
that can be quite performance intensive to do
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>
Something a person has to click to confirm execution of the command
But yes arg 1 would be the reason
send a clickable text component
I used build tolds to remapped 1.21 its work but I cannot access PlayerConnection now.
?mappings
Compare different mappings with this website: https://mappings.cephx.dev
Are these all the same?
DOES ANYONE KNOW HOW TO SOLVE LOMBOK NOT BEING RECOGNIZED IN THE COMPILATION?
10H ON THIS ERROR
use the lombok gradle plugin, check you compile with gradle or remove lombok
gradle plugin no solve; delombok not works
well it really depends on what you mean by all, but if you're talking about the mapping labels
then yes
How?
Send your build gradle
The home of Spigot a high performance, no lag customized CraftBukkit Minecraft server API, and BungeeCord, the cloud server proxy.
fuck
olivo always lurking
i alwaysI always compiled with this button but with the "build" button it's the same thing
also use the lombok gradle plugin
It doesn't work with the plugin, I've always used it this way
and what happens if you try it
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
It would be the 5th time I tried today
yeah
but make sure you don't blind cast
it's a gradle error
not an intellij error
so a real gradle moment
what not using alt+insert does to a MF
why do i have to take lombok in more than 1000 fucking classes
for the 6th time it doesn't work
i ll to grale
you have gradle to maven convertor idk
by then I'll be dead
well I wouldn't be worried about developing then
go enjoy your last week of life
take a vacation or something
is there anyway to update player's profile after setting skin on 1.20.6?
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
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 "
you don't cast a CraftPlayer to a Server player without .getHandle()
CraftPlayer#getHandle() returns the ServerPlayer
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
That is confusing as hell.
how is it confusing
wow this says a lot about your grindset
I'm working very hard into researching ways that I can continue my grindset after I die
if you know java the wiki has some good sources to start
if you don't know java learn some java first then come back to spigot
I took a basic java course through codeacademy but that is about it
@chrome beacon ๐ญ ๐ญ ๐ญ ๐ญ ๐ญ
its a gradle bug probably with the plugin make a bug report
then you have an incorrect configuration
So yesterday it worked because with the same configuration?
some lombok thing
10*
shit the compiler doesn't recognize lombok
what is the error
I have already changed the version of intellij, added a plugin for gradle, changed intellij settings, changed to maven
basically I use a getter provided by lombok and it says it doesn't exist (on compiler only, on code no)
log of??
you failing to compile
bri, I already said the compilation problem
alright that's fine enjoy your next 10 hours of whining about it then
factualllll
bro, if I said the compilation problem it's because I've already seen the log
damn that's wild
crazy
I would have figured you just guessed
?paste teh FULL log or shhh
tell you what since you've seen it just mail your brain to me and I will read the data directly from it
smart
magma guy yet again being spigot's #1 genius problem solver
neither maven nor gradle recognize lombok. what can i do
post teh log ,as you've been told
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
what log?
yep going to hack his log and tunnel into his firewall
did you hit your head against a pipe in the last 10 minutes and get amnesia
@eternal oxide
I refuse
It's the way I don't waste my time doing the things you say
yeah defnitely this log is completely useless
good thing you've been withholding it and not reading it, great call
Exactly, why did you ask me for the log then?
wow that log was very useless
should have never asked for it
That's what they asked me for, damn it
Now it's my fucking fault?
mmm sure
I don't like my API status available
I'm starting to think you aren't actually smart and everybody else just consumes copious amounts of lead
in the land of the blind the one-eyed man is king
I should hope not
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
how do i wait for a ClickEvent to occur before executing the code?
neither maven nor gradle recognize lombok. what can i do
you could stop asking the same question in spigot help dev
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
in which case you shuold be making an issue or following an issue
not asking in spigot help development
I am so ahead of my time my messages come from the future
we are not the lombok maintainers
ive been trying to figure out how to do this for probably around 15 minutes and can't
generally a hashmap with a UUID function
since ClickEvents can't have code embedded inside of them you can just make a command
I don't really understand his question
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
ah chat click events
that way you can delegate a specific function to each player
my eyes
22-34 approximately
but basically what it does it that you have to confirm via click before it will run the command
you can even use a fake command of a uuid and cancel in player pre command
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
what is "Function<Input, Output>"?
whatever function you want Ig
I mean it could be literally anything
its any arbitrary code you want to run
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
my hands are completely shredded
you're not supposed to use the cheese grater on your hand silly guy
that would be an interesting workout routine
to make it easy to punish people ๐คท
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
Anybody got any ideas on stuff I could optimize?
you could optimize sending your code by using a paste
?paste
then you could get your code reviewd by going in #1100941063058894868
public static hashmap, ah cmon
.-.
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
.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)
Would I have to register the command in pluginyml?
Probably
You could catch the command pre-process event
i dont know if that is triggered, if the command isnt registered
thnx will look at it
thats something you'd have to test
It will only be answered in 2 years
Sayign "neither maven or gradle recognize lombok", is rather pointless, you provide no stacktrace nor a description of your Issue
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
sucks to suck
nothing we can do about that
you could just fork lombok and try and figure it out yourself
or switch to kotlin
or use alt+insert
your meant to promo kotlin
neither maven nor gradle recognize lombok. what can i do
wdym recognize
havent had the opportunity to get it working either ๐ฅบ
are you using intellij?
theres some enable annotation processing option somewhere in the settings
yes
its enabled
no clue then, havent even got it working myself
wdym srry
lombok?
ye
you mean
@Getter
@Setter
yes
Are you going through the same problem as me?
I mean im using gradle
compileOnly ("org.projectlombok:lombok:1.18.24")
does lombok need to be shadded?
no
annotationProcessor("org.projectlombok:lombok:1.18.24")
need this too
but on my project not works
annotationProcessor ("org.projectlombok:lombok:1.18.24")
can you show your build.gradle
?paste
^on there
dependencies {
compileOnly("org.spigotmc
1.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")
}
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/")
}
but I didn't understand. Do you want to use lombok in your project or help me with my problem?
Im trying to help you, i have it working for me
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
?paste
is .kts?
Sec, making a kotlin project
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
It works on a new project
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
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)
}
}
let me see
player#teleport(new Location(world,x,y,z))
do you know how to create a command?
if not i can teach you
I have no experience with it, Ive been jist adding premade plugins so far ๐
have you set up a project?
But I would be reaฤบy grateful if I would get any help with that
Not yet
@vast ledge kotlin compiler your .kts?
go set up a project and tell me when u are ready
I may sound stupid, but how do I set up a project?
Are you using Intellij?
its installing a plugin
Yes
oh ok
build.gradle.kts usually shows that you are using kotlin
there a plenty of tutorials, but in short, install and ide like intellij, add the dependencies and create your main class
but youre using a kotlin compiler plugin
Alright, will do that
Wait, if you're writing pure java in your class.java files, then why tf is your build file using kotlin???
if you're writing java your build file should be build.gradle
not build.gradle.kts
I can choose groove or kotlin
Is ideaIU supposed to have 1GB?
It can be whatever I want
idk, i just installed intellij community edition
my project on java using build.gradle.kts
Pick community
Oh yes, thats exactly what I am downloading :DD
wonderful isnt it
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
Your project is the most cursed thing ive ever seen
So creating plugin is programming in JAVA, right?
and 1.21 changes everything since you can now create your own enchantments
yes
well
you can create skripts, which is a language dedicated for easy mc scripting
or use kotlin
but thats a "branch" of java ig
Personally, i dont like kotlin, but that depends on your taste, and preferences!
but its really not powerful and i discourage it
why?
cus you have a kotlin build file, but are writing pure java?
your build.gradle is not in java but in groove lol
kotlin is like c++, in order to know what im seeing i need to know billions of rules of implicit syntax
Is your whole project in groove?
Like
fun functionName()
instead of
public void functionName()
well in a second one at least i know who will have access to a func/method
Java...
how is private void then
notfun
public static void main(String[] args)
private fun
repeat after me
๐
like i said im not well versed nor, do i plan on becoming well versed
true=?
how the fck would you write groove
the mod?
This is so cursed
You mean kotlin or what?
had that when making a plugin versiion independent lol
how hardcoded it is
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
I think I'm about to get some award for that line and then get shot
Why lombok if kotlin does getter and setter for you? ๐
idk
kotlin is tad bit slower
he said he had a build.gradle.kts, so I assumed, he'd be writing in kotlin
although i should learn it tbh
it powers gradle by default
why not just use it in a first place
I don't like kotlin, because it looks to much, like a script lanuage
like typescript, with brackets
Is this a real method? I want to make potions stack to 64 but when I get the item's meta this method doesn't come up.
yes it's a real thing
What version are you on
how is the getters on kotlin
thats from 1.21.1
do I need my IDE to be spigot 1.21.1?
They added components instead of meta data or smth
yes
Yea
Every property kotlin compiler generates getter and setter(if variable is not final)
how do I update it on intelliJ?
well just 1.21
You on gradle or maven
maven
oh its good
open your pom.xml and change the version
kk
olivo
remember
of my problem?
lombok
the maven not solves ๐ฆ
Sir idk what the fuck you did, but you assaulted you r enitre project
Create a new Project
And dont pick kotlin
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
<?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?
ok so change 1.20.4-R0.1-SNAPSHOT to 1.21.1?
afaik
๐คก
.
1.21-R0.1-SNAPSHOT
thanks
You get the point right
You dont write kotlin
your writing JAVA
hence
the .JAVA
ending
I'm getting Dependency 'org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT' not found
BRO
Did you reload your pom
BUILD.GRADLE IS GROOVYYYYYYYYYYYY
BUILD.GRADLE.KTS
NOT JAVA
how do you do that?
NO
FOR GRADLE
YOU DONT
WHATS THE PROBLEM?
you click the little reload icon in the top right
YOU USE GROOVY
YOU'RE WRITING JAVA
FOR THE JAVA PROJECT
or open the maven tab and click the reload icon
worked, thanks!
YOU DONT MIX A KOTLIN BUILD FILE WITH A JAVA PROJECT
whats with the caps?
sorry
yes you do
kotlin build file can be used with java project
ACCORDING TO YOUR LOGIC YOU DONT MIX A GROOVY BUILD FILE WITH A JAVA PROJECT
Im about to jump out of the window
do it
wait now the Material class isn't importing, did they remove it in 1.21???
IN OTHER WORDS, IT IS IMPOSSIBLE TO BUILD A JAVA PROJECT WITH GRADLE OR MAVEN
can we stop with the caps
Pay me
he got on my nerves
It's wrong tho, it looks so very much wrong
Update Intellij
nah not really
HAHDHAWHDAHWDHAWHD
๐
๐คก
SIr
you get intellisense with kotlin buildscript
Please watch the caps .-.
that may happen from time to time, so best to either ignore them or step away for a bit if thatt happens
Can you answer a question, most likely yes
build.gradle ends with .java?
Sir, you're getting on my nerves, im just going to ignore you, pester other people with your problem
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
I just wanted to help you like you tried to help me but ok
between .gradle and gradle.kts?
yeah
Slight syntax differences, yeah
It's just different dsl
um not sure why it matters on the ending?
Anyways I surmise this is the same lombok issue you had a few hours before?
wdym
yes
Yea ;-;
Still complaining abt it
I still haven't been able to solve it
In which case I am impressed by your persistence, but you really ought to use delombok by now
what does lombok have to do with maven or gradle build files?
๐
no works too
Nothin
so the whole ordeal was over nothing?
Yea
Thing is, if it isn't fixable in a few hours, it probably won't be fixable until you get an epiphany months later
I was trying to help, but ig I didnt exactly know what was going wrong
figures I guess
Yea
Take a break ๐ญ ๐๐ป
like 1 Year later looking back, and I was so stupid, why didnt i realize this back then
and what do you want me to do
remove the lombok in 1000 classes?
just wait till some old timer shows you some nifty secret of the way
and it blows your mind in how you never knew about it before
Some secret, that solves most of the problems :D
โจ delombok โจ
Yeah, there's even a tool that automates it called delombok
more bugged that lombok
no works
more bugged that lombok
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
At least lombok worked for me. delombok didn't.
I updated it and the classes still arent importing
be funny if it was a caching issue with the building
Material and CropState
and they really had no problem to begin with
I still haven't got the courage to convert 1000 classes
I REALLY need to find that "Only help, no info" meme one of these days
They might've changed the name, check the docs
that wouldbe a breaking change, wouldnt happen
I assure you material is still called material
you assume me
xD
cant believe your assuming materials identity
2nd time
that i listen this
today
I didn tsee material, ithought he was talking abt CropState
something wrong not is right
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html
seems to be the same
i added id("de.lukaskoerfer.gradle.delombok") version "0.2" with annotationproccessor and compileonly lombok? @quiet ice
or i remove this?
no its an intellij plugin
On intellij, thers a bar on the right, it should look like this
compileOnly("org.projectlombok:lombok:1.18.32")
annotationProcessor("org.projectlombok:lombok:1.18.32")
i remove this
to delombok?
Delombok is a standalone application
Press the icon on the very left, it refreshes the gradle file
Make sure the project is set to use Java 21
Yeah
okay, I have it set to java 22 rn
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.
Discord should add the ability, to have blocked messages not show
Remove the gradle plugin
Obscure gradle plugins are generally pretty badly written either way
lombok plugin? not have only this
what vendor should I choose for java 21?
compileOnly("org.projectlombok:lombok:1.18.32")
annotationProcessor("org.projectlombok:lombok:1.18.32")
only this
I use coretto
ok
change to 22
Remove all traces of lombok in your buildscript for the better word of it
including that delombok plugin. I have no idea what such a plugin needs to exist
yes yes
THEN you run the delombok standalone application, as detailed in https://projectlombok.org/features/delombok as someone was as kind to link earlier
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
Paste the entire build.gradle file
My assumption is that you did not get rid of that plugin
id("de.lukaskoerfer.gradle.delombok") version "0.2"
Nuke this line
what
how i execute delombok
then
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
Any works
Download https://repo1.maven.org/maven2/org/projectlombok/lombok/1.18.34/lombok-1.18.34.jar and run the commands described in https://projectlombok.org/features/delombok
Install Java 17 at https://adoptium.net/?variant=openjdk17&jvmVariant=hotspot
^^ open and select 21
add the libs folder the lombok?
huh?
and you changed Java version in project settings?
yes
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
Try invalidating caches
how do you do that?
Should be somewhere under the File tab
then
why i download the lombok.jar
oh ok
commands requires lombok.jar
RTFM
ok
Yeah
that worked
my god
all ugly code without spaces https://imgur.com/a/Hc6qcn3
Just create an annotation of that name in your project
see this
It's a destructive tool - it basically does what the lombok AP already SHOULD do in the background
@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 ๐
Though uh, may I ask why you have lombok in 1k classes and only figured out now that lombok doesn't even work?
Have you programmed in Java before?
IT ALWAYS WORKED FOR ME
how do I give an item meta to a potion? getItemMeta() returns null and I need to use ItemMeta#setMaxStackSize().
And when did it stop to work?
Idk how it is in the newer versions
yea.. it did compile but it never launched
now i made to finally launch
getItemMeta is only null when the item is air
today
but "back in the day", we had PotionMeta
but now it crashes when i hover over armor hud
No, I have no experience at all. Only did some simple codes in LUA. I want to make a plugin to minecraft, that will teleport players to a certain location when they type /shop
๐ฅฒ
?learnjava
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! ๐
You'd be better of creating an alias in the commands.yml
^@cyan silo
Yeah, but did you do anything that would cause such an issue (updating Java, Lombok or other modifications to the buildscript)?
I'm not sure but I updated IntelliJ, but I don't know if yesterday I had compiled the project with IntelliJ already updated
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
IntelliJ shouldn't make a difference here
I went here to find out, if anyone knows the code to run what I want to.
If it weren't for intellij and maven it would work
@cyan silo hop in the general-1 vc
There are some topics talking about changing the intellij settings
IntelliJ makes no difference as IJ shouldn't be the thing compiling your project - I dearly hope so at least
Alright. My english pretty sucks btw
np
you need to set up your dependencies now, you probably should just watch a tutorial
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
i literally needed to fix that much
its half of the project that was broken due to new system
I would like to pass you the project but I really can't. And I've already tried to downgrade the Lombok version
at least now it loads into mc
Is this part of a multi-module gradle build?
still crashes at tooltips
no its a shitty project
that was hardcoded to enchantment types
Nah, it's related to @runic pine
Otherwise, try to update/downgrade the version of gradle you are using as defined by IntelliJ and the command line via the gradle wrapper
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
wdym
i downgrade to 8.5
and ugprade to 8.9
but no works too
i will generated getters
manually
unique alternative
ctrl alt insert is the cmd?
then it probably isn't.
I mean, people are going to hate me for that, but: Public fields.
has only one build.gradle.kts file
on java? hah
I even wanted to know why there was prejudice about this, by chance.
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.
can you help me with javatoolchains
idk what is
you are so real for this
fuck getters and setter
s
embrace fields / kotlin
(same thing)
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
yes your right but
I'd need to find a project of mine that uses it first heh
mojang vibes with public fields AND getters and setters
How do non-personal projects in kotlin deal with this if there are no getters? Can they manually define private if they want?
wdym?
i founded the option
kotlin just handles them the same way
it seems like I'm doing something weird
wyd
wdym
I'm magically turning a list into a string
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
a really neat magic trick
I'd run ./gradlew -q javaToolchains
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
wtf
I'm saying that in kotlin there are no getters and setters. So how do you define a field so that it doesn't have getters and setters? Is it defined as private in that field?
i ll run
just a private variable?
I wonder if collect it somehow turning my list in a list into just a string
or something
this is so unreadable in discord
just rq does anyone know why my code is giving the item infinite uses?
?paste
and public generate getters and setters?
tbf it's just unreadable period
yeah
and how do I make this variable immutable without setters
you can also do ```kt
var myVariable = false
internal get
private set
you use val instead of var
I don't know if it's concat or collect or what that is flattening this, or even none of the above
val = value, var = variable
yup
oh
is 1.21 spigot giving error outdated build for everyone?
Sounds like you should update
@quiet ice https://paste.md-5.net/gekonapexa.rb
it's literally flattening it
gongas
mhm
update what
I just updated everything
Spigot
wasnt getting the error before
ok is what I'm trying to do even possible in java without using a purpose made container or something
I just updated to 1.21 and NOW I'm getting the error
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
Let me guess you didn't run BuildTools
did you like my username?
idk what that is
It's the only official way of getting Spigot
well there are two J22 JDKs, both of them provided by IntelliJ. That could be an issue, but the chance of this being a JDK-induced issue is a bit low
i just find it surprising that there have been three people called gongas here, one of them got banned
The reason why you're outdated is because you downloaded fron a 3rd party
what can i do then
I downloaded the .jar file from the site that it wont let me type
You don't have to send the link or name
ohno, not the forbidden site again
lol
and all three of them have been working on the exact same server
just a big
coincidence
just believe seeing
I thought bukkit was the first party?
what is the first party?
Yes from a unofficial 3rd party which is giving you outdated versions
?buildtools
huh didnt know that was third party
And hopefully not malware
get bukkit .org can give you malware?????
To be sure, use buildtools, to build your server jars
Temporarily (temporarily as I'd be surprised if this makes a difference) comment out
java {
toolchain {
languageVersion = JavaLanguageVersion.of(22)
}
}
bukkit is dead
ok
just run buildtools
Let's just say that people aren't reverse-engineering/diffing the jars every day
I mean nothings stopping them. I haven't actually checked the jars they give


