#build-tooling-help
1 messages · Page 16 of 1
pretty sure it's https://github.com/Alvinn8/paper-nms-maven-plugin
Ahh awesome. I'll test it out, thanks!
"Nobody suggests you use this" - "okay I'll use it!"
I don't see the issue, I haven't asked for support regarding setting up the build, how to use it etc. I've only asked what sort of possibilities there would be in my use-case. I don't get the hostility towards wanting to use Maven? It's not like I've criticized, how the developers haven't made NMS compatible with (Paper+Maven)? I understand that there might be certain benefits to using Gradle and Paper, and that it's the "supported way", but I was simply asking if there were any alternatives where I wouldn't be depending on having to use Gradle.
I'm just an old grump, sorry.
Nahh it’s all good.🙂
Hello guys, i want to fork a papermc fork. For this i use useStandardUpstream with withStandardPatcher. But for some reason i run into this problem while executing applyPatches:
(> Task :cloneFirstForkServerRepo FAILED)
io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false submodule update --init --recursive
I am not really sure what went wrong here. Does some documention/guilds exist for the case for a fork of a fork of papermc?
For the background information, with mc version 1.20 it worked, then i successfully updated the fork to 1.21.
Now i have to update the fork of the fork where i run into this issue.
Maybe someone could tell me what goes wrong here.
try running with -Dpaperweight.debug=true
it should show more of the error message
and could you show your gradle buildscript?
Sure
With debug:
del
gradle.build.kts:
del
I messed it up. I updatet the pastebin links.
It look like i have some problems with this:
$ (pwd) C:\Users\Fabian\IdeaProjects\SecondFork.gradle\caches\paperweight\upstreams\FirstFork
$ git -c commit.gpgsign=false -c core.safecrlf=false submodule update --init --recursive
fatal: No url found for submodule path 'paper-api-generator/generated' in .gitmodules
Can someone tell me what this is?
Thanks to Noah . The debug thing helped me a lot. I have now managed to solve it. The first fork did not create a 'paper-api-generator'. I have now specified the url and ref of paper there. That made it work.
What just changed...? ```Execution failed for task ':compileJava'.
Could not resolve all files for configuration ':compileClasspath'.
Could not resolve org.apache.logging.log4j:log4j-bom:{strictly 2.22.1}.
Required by:
root project : > com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT:20240916.181108-14
root project : > com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT:20240916.181108-14 > com.sk89q.worldguard:worldguard-core:7.1.0-SNAPSHOT:20240916.181108-14
Cannot find a version of 'org.apache.logging.log4j:log4j-bom' that satisfies the version constraints:
Dependency path 'com.n9works.bukkit:TheArtifact:4.6' --> 'com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT' (apiElements) --> 'org.apache.logging.log4j:log4j-bom:{strictly 2.22.1}' because of the following reason: Mojang provides Log4j
Dependency path 'com.n9works.bukkit:TheArtifact:4.6' --> 'com.sk89q.worldedit:worldedit-bukkit:7.4.0-SNAPSHOT' (apiElements) --> 'org.apache.logging.log4j:log4j-bom:{strictly 2.24.1}' because of the following reason: Mojang provides Log4j
Dependency path 'com.n9works.bukkit:TheArtifact:4.6' --> 'com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT' (apiElements) --> 'com.sk89q.worldguard:worldguard-core:7.1.0-SNAPSHOT' (apiElements) --> 'org.apache.logging.log4j:log4j-bom:{strictly 2.22.1}' because of the following reason: Mojang provides Log4j
Dependency path 'com.n9works.bukkit:TheArtifact:4.6' --> 'com.sk89q.worldedit:worldedit-bukkit:7.4.0-SNAPSHOT' (apiElements) --> 'com.sk89q.worldedit:worldedit-core:7.4.0-SNAPSHOT' (apiElements) --> 'org.apache.logging.log4j:log4j-bom:{strictly 2.24.1}' because of the following reason: Mojang provides Log4j
Snapshot versions are not stable. Do not use them unless you need to. Stick to the actual releases
I suppose paper's log4j is just too old
What's odd is WG api hasn't updated since Sep 16, but only today did builds stop working
WE received an update
Also WG API doesn't do stable releases
It does.
There is no 7.1.0 stable version
I don't. I'm a developer from WorldGuard
i think the person in top 3 of contributions to WG knows what they're talking about lol
Well, balls
What changed today though?
I have been using 7.1.0-SNAPSHOT for months
The unstable version from WorldEdit (7.4.0-SNAPSHOT) updated dependencies
That's why you should use the release versions because they don't change their dependencies
Guess i'm thrown off by my error mentioning worldguard
Dropped to 7.3.9 WE and that worked, thanks
worldguard is defining that it requires a different version of some libraries vs those that are provided by paper
Hey, been messing with a multi module project... and I can't get it to work lmao. and now somehow my core module was seperated from everything else?
include 'core', 'api', 'nms-wrapper', 'nms-1_21_R1', 'nms-1_21_R2', 'nms-1_21_R3'```
i mean it has a settings.gradle. I dont think it needs one. as well as gradle, gradle.properties, gradlew and gradslew.bat
close IJ, delete .idea and reopen
usually fixes that bullshittery
Hi.. i hate me and try to move to gradle for a few tests... but not sure why i just fail in build for a issue in import org.apache.commons.io.FileUtils;
you didn't add apache commons?
that not comes from paper?
i based in the POM used...
pretty sure there was a thing about that no longer being exposed by the server api
the old version (or im confusing with another apache thing) i just pass all dependencies from pom to the build.. still need add the work for "change the version based in git..."
yeah, the pom no longer includes apache commons
but in gradle need pass that?
I'm unsure what you are asking, sorry
in older versions certain libraries were exposed in the api artifact, as of recently(?) they are not anymore iirc
i mean i just add the same dependencies from pom to build.gradle for that im confusing why throw a issue for commons.
most likely you had some outdated pom cached in maven
strange because with maven i just pase this to github actions and not throw that (if was the cache)
github has a cache as well iirc

ok i add and works for fail in anothers.. then i think need add the whole things now xd
I'm 5 months late to this but thank you
Ok i get work the build (i dont test run the plugin..) but if try use runServer i throw this.
update shadow to gradleup/shadow
probably use 8.3.5 for now dunno how stable the beta's are
thanks i just found the same in github xd
not sure from where i copy the first plugin....
ok.. now i move all versions to more "order" and build.. but when run i just get a error for the reflection dependency...
[15:33:46 INFO]: [ConterCraftLogger] [CustomEnchantmentBoostrap] Loading Custom Enchantment Boostrap...
[15:33:46 ERROR]: [BootstrapProviderStorage] Failed to run bootstrapper for plugins/ConterCraft.jar. This plugin will not be loaded.
java.lang.NoClassDefFoundError: org/reflections/Reflections
at ConterCraft.jar/me.mrdoc.minecraft.utils.ReflectionUtils.getClasses(ReflectionUtils.java:39) ~[ConterCraft.jar:?]
at ConterCraft.jar/me.mrdoc.minecraft.custom.enchantment.CustomEnchantmentManager.loadAllCustomEnchantments(CustomEnchantmentManager.java:34) ~[ConterCraft.jar:?]
at ConterCraft.jar/me.mrdoc.minecraft.custom.enchantment.CustomEnchantmentBoostrap.bootstrap(CustomEnchantmentBoostrap.java:13) ~[ConterCraft.jar:?]
at ConterCraft.jar/me.mrdoc.minecraft.contercraft.CoreBootstrap.bootstrap(CoreBootstrap.java:19) ~[ConterCraft.jar:?]
at io.papermc.paper.plugin.storage.BootstrapProviderStorage$1.load(BootstrapProviderStorage.java:36) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at io.papermc.paper.plugin.storage.BootstrapProviderStorage$1.load(BootstrapProviderStorage.java:24) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:117) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:38) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:40) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enterBootstrappers(LaunchEntryPointHandler.java:30) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at net.minecraft.server.Bootstrap.bootStrap(Bootstrap.java:69) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at net.minecraft.server.Main.main(Main.java:126) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at io.papermc.paper.PaperBootstrap.boot(PaperBootstrap.java:21) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at org.bukkit.craftbukkit.Main.main(Main.java:281) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at io.papermc.paperclip.Paperclip.lambda$main$0(Paperclip.java:42) ~[app:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Caused by: java.lang.ClassNotFoundException: org.reflections.Reflections
at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:146) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at io.papermc.paper.plugin.entrypoint.classloader.PaperPluginClassLoader.loadClass(PaperPluginClassLoader.java:107) ~[paper-1.21.4.jar:1.21.4-14-b746d9d]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
... 16 more
you want the shadowJar task and its output
renaming files as part of the build is also asking for issues
you mean the final jar name?
Hey, so trying to compile the entire project in my core module in the project so I tried to do this in the other modules
tasks.jar {
enabled = false
}``` and in the core do
```java
from(project(':api').sourceSets.main.output)
``` but it breaks the project and doesn't let me compile. What is the correct way to compile everything in the core module?
you just shade everything
rather than trying to mangle source sets
idk what that output stuff is though
For anyone feeling adventurous you can try paperweight-userdev 2.0.0-beta.1 now, it supports config cache for all supported dev bundles
One small difference is you may need to click "Attach sources" when viewing a minecraft/paper-server class for the sources to... attach
Well, very good to know that the version fetcher on the docs works fine even without the usual x.x.x format, so thanks for testing that out Ig 
5head move that the version fetcher is recommending beta builds
(that should be fixed if possible)
Well, it was never designed to account for beta builds. Usually, you just post full releases
I might look into that though
Would be great
the beta build should probably be marked as a pre release then?
then you’d just be able to check if it’s an actual release or pre
@ jmp
Yeah would be useful for sure
My current idea is to just check whether the version contains "BETA", but that is obviously not a sustainable solution
Well, it's a quick-fix alright
Did a quick and dirty PR. Just waiting for it to be merged in
-# https://github.com/PaperMC/docs/pull/506
is every class supposed to be duplicated, or is this just a beta "feature"
it's not duplicated
that is the class file and the source file
in v1 a fake ivy repository was created with separate source and class jars during a dependency resolution hook
in v2 a task produces a jar, however this doesn't have a way of attaching sources normally
but you can merge the sources and classes into the same jar and intellij will recognize it and index properly
share the log file it points you to on a paste site
most likely you need to configure java toolchains with java 21
the error is consistently on the same class
line 3908
it's literally the only error
Just in case you didn't, change the java version of your project to java 21
You might be using java 17
first thing I did
since a co-dev told me it fixed it for them when something similar happened (not actually sure if it was the same issue)
but didn't work for me
a quick ctrl + F shows I'm not using java 17 anywhere in any of my scripts
make sure that you're using the latest version of paperweight
make sure that you have 21 set for the toolchain, not 22, not 23, etc
I have paperweight on 1.7.7
where is this again just to make sure I'm not mistaking it for something else
That error is generally because a different version of java was used which caused the decompiler to produce different output
gotcha
Why every item explodes? (only tnt should explode)
so is literally just that one file using v21 exclusive code lol
Nah, it's just oddball decompiler quirks
probably ask in #paper-dev
(though at a glance, not sure)
probs want to do a clean build or something, all I can guess is that you're running a jar from before you added that check
Yooo, thank you!
:)
That fixed so many things lol
👍
thanks
whats the goal?
if you want to move the file to your plugins folder use a copy task
how does one use a copy task?
tasks.register("copy", Copy) {
mustRunAfter(build)
from("build/libs/Plugin.jar")
into("destination/plugin/dir")
}
ooo nice and can i rename it when copying?
why do you need to rename it?
cause i like renaming things, can I?
using mustRunAfter not always but very often means something is wrong
yeah idk it was the only fix and i cba to look for other solutions
in this case you are using a raw file path as an input instead of using the output from the jar task, which forces you to declare explicit dependencies
also should there be something instead of copy?
so can i just change the output from the jar task?
... what?
changing jar names away from the conventions is not something I recommend
i mean just a different folder
switch 'jar names' for 'jar file paths' and it's still a true sentence
cring
Why do you need to do that?
Only reason I can think of is running a test server, and there are better options for that, ie the Gradle plugin
or symlinks
how do I use xyz.jpenilla.run-paper to run a folia server?
see its docs
I did but I dont understand it
... in your build script?
keep in mind it can only resolve folia versions that have been merged to the master branch
1.21.x is on a seperate branch
pretty sure 1.21.3 specifically was never released
ok thanks for the help
Not sure if this is the right channel, BUT how would I make gradle output the plugin jar to a specific folder? More specifially I want gradle to output to my plugins folder whenever I build.
use run-paper or a copy task (see pins)
Awesome, but how do I get my plugin into the plugins folder in my intellij project?
Nevermind
It did
But, how can I make it show the jar files
Nevermind again
I'm trying to build a paperweight fork in a CI/CD job (GitLab) and there seems to be a random chance the build is failing.
Here is the runner log: https://pastes.dev/vCeHyLuQLH Does anybody have an idea whats going on here?
Look at the log file
To see why the decompiler failed
(man, life is so much better without spigots decompiler now)
https://pastes.dev/Z10fMuCchY
Absolutely useless log
Is that a hardfork thing?
yes!
exit code 137 apparently means the process was killed from the outside
so idk why gitlab is killing the process
maybe it uses too much ram?
might be OOM
oom would be different
I would just assume it used too many resources and gitlab killed it
Is there a specific reason why there is no paperweight-userdev dev-bundle for 1.17, but only for 1.17.1?
why do you even need 1.17
without looking up, I assume it was one of those releases that directly got hotfixed
so there never was a paper release
I like to migrate https://github.com/gecolay/GSit and md5's specialsource-maven-plugin allowed 1.17 put paper not. ^^
ah no, maybe we didnt have userdev back then?
it's also possible that paperweight simply wasn't a thing back then? not sure
paperweight was, just not userdev I think
but generally, there is no point in supporting minors that arent the latest of a version, no?
so just drop 1.17.0
I mean depends on the changes mojang made in it...
tbh. I'm more confused that a sitting plugin still needs NMS to work :S
So GSit will have 1.16.x support + 1.17.1+ support after this. That's a bit weird. 🫠
Not much, but the ClientboundRemoveEntityPacket was changed there to ClientboundRemoveEntitiesPacket, and i sadly need this packet 🫠
well I personally don't see the value in using packets for something simple as that at all but ¯_(ツ)_/¯
If you look at the code base you know why I need to use the packets ^^
yeah I'm looking at it now and I don't see anything that couldn't be done with api tbh
I am sure the * checks notes * 6 servers that use your plugin on 1.17.0 make it worth the effort to still support 1.17.0 😛
Yes, you are right, I will simply drop the support with the switch to gradle ^^
I'm really glad that so many of my GSit users are using the latest server versions. I considered dropping support for 1.16.x, 1.17.x, 1.18.x and 1.19.x a while ago. This versions currently only make up about 7.5%.
thats why you added stats after all, to see what matters to your users
imagine the build time save by that, all the remove code, etc
and generally, people that run such dead end versions most likely don't run the latest version of your plugin anyways, they can just stick on an old one
Would be great if bstats had something for "players/version" not only "server/version" to see how many players it would effect (as GSit is a plugin for server players, not for the server owners like a setting plugin) (maybe I can add a custom chart for this for my plugins in the future)
you can easily add that as a custom chart
but of course that wont work for outdated plugin versions
I would also love if bstats would allow you to filter for stuff like that, but it quickly becomes a privacy issue, if stats only return 5 results, its not really anonymous anymore
as long as it doesn't list IPs/domains or all installed plugins in correlation to other values I don't see an issue tbh
maybe bStats v2 will have it (whenever it happens lol)
(PaperStats wen?!?)
it crossed my mind before...
I just wish Bastian had accepted my PR which added some of the missing graph types a couple years ago instead of dismissing them because they wanted to write a new version anyways :(
I actually considred just running my own install after that lol
right, I noticed that there actually is a new backend now 
I wonder if my test setup still works
oh yeah I PRd a fix for server name resolving to that
mergh, it seems to use google firebase now instead of redis :S
makes me actually consider pulling all of my plugins from it now that I know that :(
I'm having 4 more build tooling related questions (maybe you can help me with this 🫠 ):
https://github.com/gecolay/GSit/tree/gradle
- I'm not quite sure how to tell the "com.gradleup.shadow" plugin what things to bundle. Currently my GSit jar is just empty. (How it was done with Maven https://github.com/gecolay/GSit/blob/main/pom.xml#L61)
- How can I set the output name + path for the final jar (How it was done with maven: https://github.com/gecolay/GSit/blob/main/dist/pom.xml#L17)
- How can I include my resources folder again in the final jar (How it was done with maven: https://github.com/gecolay/GSit/blob/main/dist/pom.xml#L18)
- How can I use placeholders in my plugin.yml again (Current plugin.yml which was included by maven into the final jar: https://github.com/gecolay/GSit/blob/main/src/resources/plugin.yml)
use the shadowjar task
a) you use different configurations. in maven the equalivent kinda was scopes? basically use implementation("dep") for shading and compileOnly("dep") for provided
d) is just processResources { expand(project.properties) } I think?
my main build.gradle.kts already includes all project modules with "api" or "implementation"
(ok nice, apparently Bastian wants to move away from Firebase 👀 )
omg its Gecolay I just downloaded gsit last night for my server 
That sounds wonderful 
Using shadowJar like this worked for me, thank you: https://github.com/gecolay/GSit/blob/gradle/build.gradle.kts#L54
(I also had to change all "implementation" to "api" for it to work)
shouldn’t be a difference in api and implementation unless you changed something
Any Ideas why everyhing is red? I mean its working but kinda confusing
did neither of the two suggestions work?
I tried to invalidate the Chaches but it didnt work
I don't really know what I should try
well try the other suggestion...
I dont know what he means
build the project in intellij and then reimport it
still dont work
Did you walk through the entire repair flow? Rebuilding indexes should take a while
yep
thats not really important, IJ jsut doesnt always resolve plugins
I think you can force it, but just ignore it, lol
oh okay
this is why expressing your problem clearly is important, everybody else thought you had issues accessing api classes 😛
Every time I've had to walk through the repair flow, it's taken 5m+, so I'm guessing you're not actually going through the whole flow properly.
Are you clicking the buttons on the notification at the bottom after that completed? It should be giving you a notification that's something like "Did <thing>, step 1/#", and giving you "Everything works now" / "Try <next step>"
you are chasing the wrong symtomps _11, they are just confused why IJ marks their plugins as red in the pom
Fair enough, still good to know though
sorry for that, im kinda new into this
I mean, all their xml tags are red too
Isn't that default for unthemed / no Rainbow Brackets?
thats their color theme hopefully 😄
yes haha
if that is default then that would be a really shitty theme ;P
Not necessarily a Paper-specific question, but any tips for handling private repository credentials with Gradle? Maven has settings.xml, never done it with Gradle
with gradle you basically use properties
I usually put them in the $HOME/.gradle/gradle.properties but no idea where that is on windows
same folder, just $HOME will be your C:/Users/urname
Log: https://pastebin.com/WZzPc0qH
(Error on paperweight.paperDevBundle 1.17.1 ~ 1.19.2 (1.19.4 ~ 1.21.4 is good))
Java: 21
Gradle jdk: 21
Project: https://github.com/RTUServer/RSFramework
the decompiler is jdk sensitive
set the toolchain for older versions to an appropriate java version, iirc, 17
oh..
like this?
should be fine but you don’t need all 4 statements
‘toolchain.languageVersion’ set to java 17 by itself is fine
I finally fix this problem with
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
}
compileJava {
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
}
is this the place to ask for help with plugin dev?
Would like to know if my plugin can detect an event for when a player joins/switches to a different vanilla scoreboard team
Ty
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
Jan^
When I try to build my plugin, I get the following error message:
org.gradle.api.GradleException: Could not add file '/home/jan/IdeaProjects/CastleConquest2/build/classes/java/main/net/chaossquad/castleconquest2/Utilities$1.class' to ZIP '/home/jan/IdeaProjects/CastleConquest2/build/libs/CastleConquest2-1.0-SNAPSHOT-all.jar'.
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65.
When I remove both relocations, everything works fine.
The weird thing is that the file shown in the error is not a file from a dependency, it is a file from my current plugin.
probably need to update shadow (com.gradleup.shadow)
It seems to be the latest version: https://plugins.gradle.org/plugin/com.github.johnrengelman.shadow
thank you it works now :)
I was looking for hours which damn file has the wrong version and now its just an outdated plugin xD
I am compiling the plugin with 1.20.6 because that is my minimum API version.
However, when I try to run my plugin with version 1.21 and above, I get the following error.
java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/v1_20_R4/inventory/CraftInventoryCrafting
v1_20_R4 isn't included anymore
1.20.6 includes?
don't downgrade it
see the forum post
The 1.20.4 Update
Stable Paper and Velocity 1.20.4 builds have been released! As always, backups are absolutely mandatory. After upgrading your world to 1.20.4, you cannot downgrade back to a lower version!
We would like to thank everyone that worked on this update (a lot of people and work...
man i am importing this class, so i am not using a version package name here
import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
Should I use like Class.forName("org.bukkit.craftbukkit.v1_20_R3.CraftServer")
just read the forum post
i read it man, i am just not sure what should i do
i will try it
So what could be the reason for the error below? This seems like a different situation.
java.lang.NoSuchMethodError: 'int net.minecraft.world.entity.Display$TextDisplay.al()'
i am getting this error only 1.21 version not 1.21.1
it is a Commodore issue? or something
yeah
show your code
but REOBF_MAPPING
and what jar are you running
paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.REOBF_PRODUCTION
i am using these
compileOnly("dev.folia:folia-api:$serverVersion")
paperweight.paperDevBundle(serverVersion)
serverVersion is 1.20.6-R0.1-SNAPSHOT
Is there an example floating around of using paperweight with java and build.gradle instead of kotlin?
why? it's only the buildscript that's kotlin
Cause I have never used a kotlin build script before. Been reading on the docs about setting it up was just curious. I will look into kotlin builds scripts more
java.lang.NoSuchMethodError: 'net.minecraft.world.level.Level net.minecraft.server.level.ServerPlayer.dW()'
When I run a plugin I compiled with 1.21.3 bundle with 1.21.4 paper, I get errors like the following. There is no error in 1.12.3. How should I approach NMS functions to get rid of these errors?
compile it with the 1.21.4 bundle. NMS is not backwards compatible, it is not considered API
but i don't wan't compile jar by version
all versions should be in one jar ?
You can use a multi modules setup in gradle and create an adapter for every version. Then you still have one plugin.
There is no easy solution for this. NMS is not stable, if you want backwards compatibility use the API
Unfortunately, the API is inadequate in my scenario, I would love to.
How far back does paperweight support?
Because we need it until 1.13, and paperweight is not working for 1.17 right now
1.17.1 was the first userdev version iirc
why do you need to go back that far? people dont use these versions anymore
For this API, we want to be able to support every version that brigadier can be used in sadly
So what are our options?
Using BuildTools?
That was pre bundler right?
iirc back then you used to just smack the uber server jar onto the classpath
idk, I never cared to look what hoops people jump thru to support versions nobody uses
no reliable/portable way to do that across systems if you dont want people to build it from scratch themselves
thats the whole reason userdev exists
Mhm, that's annoying...
Well yea
it would be a lot of hardcoding
you can fall back to reflection or something like that
Possibly, but very painful
You know what's not painful, support modern version only 😉
I would just cross that bridge when somebody actually requests that
didn't we have like a flag for this
Lamp supports up to 1.13, so that's what we're after
I prefer doing it now, rather than later, when somebody requests it, and then it takes us a lot of time, whilst they are waiting
Yea we had -Dpaperclip.install=true
so you'd grab the paperclip jar for the respective version and just run that with that property ^
it would throw the uber jar into your mavenLocal
We could maybe do that, thanks!
Then obviously suffer at the terrible naming and non reproducible builds
but, well, such is life
LAMP support? Just run a real web server setup on your linux server! Docker makes that so easy.
Shoving a system into a plugin that is intended to be standalone is a no go.
Isn't that a command framework? 
Yup lol
I doubt this is talking about the lamp stack lol
Stupid naming. 😦
only so many four letter combinations
Fair enough
btw. What's the long name of ur command framework? lamp?
https://github.com/Revxrsal/Lamp nothing apparently xD
So arbitrary letters. 😄
I should create a permissions Framework starting with these letters. Insiders know what name I choose. 😄
How should i get mojang jar from versions directory on higher than 1.20.6 versions
All I see is the paper jar
i need this jar for 1.21.3
You can only get Mojang jar from Mojang. Or are you confusing it with something else?
Er, what?
all I was explaining there was you need to ensure the classpath you provide to your thing is in the same mappings as the input jar your are providing it
What are the differences between these files?
Plugin-1.0.0.jar
Plugin-1.0.0-dev-all.jar
I know they are different sizes, but something interesting caught my attention. Some classes have different names.
like EntityType ~ EntityTypes
If I put dev-all on my server, will it work without any problems?
Once upon a time, when I compiled, only a file with -dev at the end was created. But for some reason it's not happening now. It happened after I tampered with my build.gradle file.
I mean, idk how that works with the new stuff
Do you have any idea how this -dev file is normally created, maybe I can fix it. Also, do you think there will be a problem if I put the shaded jar to the server?
Will I encounter strange things?
I mean, that's just your compiled jar ran through shade
userdev adds the dev classifier
(when you have REOBF_PRODUCTION set as the artifact configuration)
in that case shadowJar is -dev-all, jar is -dev, reobfJar (which uses shadowJar as input) is no classifier
with MOJANG_PRODUCTION jar and shadowJar do not have their classifiers changed and reobfJar is -reobf
Hey,
would be nice if someone who knows a bit more about Gradle could help me.
I currently have an "It works on my machine" problem with my project:
https://github.com/gecolay/GHolo
if i run "gradle clean build" on my local machine it works completely fine, but when it runs in the environment of the remote building it always fails. Example failed log: https://jitpack.io/com/github/gecolay/GHolo/339d1980de/build.log
My local env:
- Windows 11
- Default Java version 21.0.3
- Installed 17.0.6
- Using the in the project bundled gradle
The remote build fails with:
Dependency resolution is looking for a library compatible with JVM runtime version 17, but 'io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT:20241215.095037-18' is only compatible with JVM runtime version 21 or newer.
Even though only the java release version is 17 and the java toolchain version is 21.
Locally this works perfectly.
can you try addng
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.9.0"
}
to settings.grade
@distant mango https://jitpack.io/com/github/gecolay/GHolo/41a42cff35/build.log
This sadly didn't worked out. Same error message.
[1;32mInstalling: java 17.0.2-open[0m
[1;32mDone installing
https://jitpack.io/com/github/gecolay/GHolo/656d69483a/build.log
glad it worked out
I updated the chmod flags with the latest commit ^^: https://github.com/gecolay/GHolo/commit/045b8d8149bf3ea10bfb8d0ddcbeb29436f7d4b3
thank you for making the life of us poor terminal users better
you most likely have two dev bundles configured
I had the same error message for "1.21.4", upgrade paperweight to "2.0.0-beta.8", this worked for me.
also update paperweight
ah, yea, that may be it, will try 👍
Well, I have totally something outdated but dunno what.
Config (with 2.0.0-beta.8)
https://pastes.dev/SMfzDoaqwR
Error
https://pastes.dev/H7iUsdMagv
update gradle
that worked, thanks 
HIi, i have a problème when i build, i have that:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':Core'.
> Expected configuration ':Core:paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 340ms
17:53:18: Execution finished 'clean build'.
I didn't touch my build.gradle and it appeared
update gradle & paperweight
how can i upgrade Gradle?
and i have 1.7.7 version for paper-weight
i put 2.0.0-beta.8 but its same
Plugin [id: 'io.papermc.paperweight.userdev', version: '2.0.0'] was not found in any of the following sources:
that’s 2.0.0
Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.8.
remove that last .
update it to 8.12
Any clue why this happens on a freshly cloned Paper repo?
https://pastebin.com/suFBX071
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Did you actually clone main?
I deleted Paper dir entirely and cloned main with GitHub Desktop
Yeah something is off
Commenting out findProject(":$projName")!!.projectDir = file(name) fixes it for me, but no idea why
https://github.com/PaperMC/Paper/blob/main/settings.gradle.kts#L40
Nope, cloned into a new dir, still same :/
If I return that line back after successful applyPatches it works fine
But removing Paper and cloning again reintroduces the issue
I'm genuinely clueless
is documents a cloud(onedrive, icloud) folder?
Nope, local
have you tried just getting rid of the gradle cache folder
Looks like that did the trick, neat
gradlew can build again and IntelliJ sees modules just fine
✨ caches ✨
i’m so smart
on macos, you can still have Paper-API and Paper-Server because of case-insensitive file system
when I checked out the main branch, it kept the folders as Paper-API and Paper-Server
so there's some craziness that happens there
but they claimed to have deleted the folder 🤷♂️
Hey, for a multi modular system where I want one for spigot and one for paper now that they're aparting. Just so I understand how I do this correctly. I have a core that just picks between the two depending on server type and go from there? for some reason in the past I assumed you have one core and just added the other ontop?
many plugins have been adding paper modules for ages, since the paper api often offers ways to do the same thing but with better performance
I'm currently having this error: https://pastes.dev/k3qYyclen0, with this build.gradle.kts: https://pastes.dev/sCLKlc7DfK in a multi-module project with this root build.gradle.kts: https://pastes.dev/5p6vKfvT9s. Turn a blind eye on how messy the root build.gradle.kts is if it isn't what's causing the issue.
https://github.com/PaperMC/paperweight-test-plugin read the readme
test plugin for paperweight-userdev. Contribute to PaperMC/paperweight-test-plugin development by creating an account on GitHub.
I included paperweight-userdev with apply false and the other things, but now I'm getting this error: https://pastes.dev/kAbJq9Tw6T. The problem is that I am trying to support every version from latest to 1.13, so I made the entire project java 8. Any idea on how to fix this issue?
you should use jdk 21 for everything with java toolchains
and for the common module set options.release to 8 for JavaCompile
(see the test plugin for an example of setting those options)
for the version-specific modules set release to the appropriate version, i.e. 17 for 1.19, 21 for 1.21
and for paperweight modules for paper versions that use java 17 you will need to set paperweight.javaLauncher to be a java 17 launcher rather than 21
use paperweight 2.0.0-beta.8 for that option to appear
https://pastes.dev/UGbyJl12QO
Somehow i cant download my repositories but i have the credentials set up:
https://pastes.dev/8eiosp5hUR
I have paperweight forked and if i remove it it works but i want to use it
I appreciate any help 🙂
try looking at the reposllite example
you need to specify password credentials classs iirc
But it works without and i never had problems
Where can i find the example
https://reposilite.com/guide/gradle should work the same way
paperweight-userdev just suddenly broke on me. a clean checkout in a virtual machine of a project that was working perfectly a week ago now doesn't even download dependencies, gradle fails with this error:
A problem occurred configuring root project 'CabotEnchants'.
> Failed to notify project evaluation listener.
> Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
> Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
I'm guessing some external dependency changed and broke stuff. Anyone found any solution?
Tried upgrading to paperweight 2.0.0-beta.8 but that fails with "configuration with name compileOnly not found"
I'll try to reproduce with one of my userdev projects. Gimme a minute
If it helps, here's a public copy of the project I'm working on. last commit to this repo was a week ago and at that time there were no issues. now I can't get it to import anywhere, even on a brand new virtual machine on a different continent. https://github.com/EggAllocationService/CabotEnchants/tree/departmas/2024
Yeah I'll check after
idk what's wrong with it, but 2.0.0-beta.8 along with gradle 8.12 seems to work fine
also it complains if id 'java' isn't at the top in the plugins block
Yea swapping that around just fixed the issue. Still the fact that even really old versions of paperweight are broken is a big problem
Index: build.gradle
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/build.gradle b/build.gradle
--- a/build.gradle (revision b76f6801fc9efceeefa84681b2bf743f422c4016)
+++ b/build.gradle (date 1734997479117)
@@ -1,5 +1,6 @@
plugins {
- id("io.papermc.paperweight.userdev") version "1.7.5"
+
+ id("io.papermc.paperweight.userdev") version "2.0.0-beta.8"
id("xyz.jpenilla.run-paper") version "2.3.1"
id 'java'
}
Index: gradle/wrapper/gradle-wrapper.properties
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>ISO-8859-1
===================================================================
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
--- a/gradle/wrapper/gradle-wrapper.properties (revision b76f6801fc9efceeefa84681b2bf743f422c4016)
+++ b/gradle/wrapper/gradle-wrapper.properties (date 1734997436901)
@@ -1,6 +1,6 @@
#Sat Nov 23 00:53:45 AST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Interesting, if I use a paper dev bundle for 1.21.1 it doesn't happen (paperweight-userdev 1.7.5). I'm guessing 1.21.2+ dev bundles are screwed up for some reason
I was just gonna say the same
Aaaand now that I think of it, it's probably the 1.21.4 dev bundle being incompatible with old paperweight builds
1.21.3 works fine
My old project on 1.5.11 seems to be broken for a sec but I think that was because I was screwing with my gradle caches
Depends on what you mean by 'broken', the dev bundle changed, maybe it should have broken harder, but, it's not a surprise that the new dev bundles aren't working on older versions of the userdev plugin
If you can throw me your build.gradle.kts that'd be great
ah yea, the feature may be exclusive to userdev 2.x
lemme see if 1.x has an equivalent
thanks
does not look like it, seems pretty hardcoded
i can update without problems
latest is v2.0.0-beta.8
it does iirc require a rather new gradle version too
so make sure you are on 8.12 gradle or whatever
i dont remember the intellij version tho, i think i'll have to install it myself
at least i have brew
nah, its deployed to the gradle portal
id("io.papermc.paperweight.userdev") version "v2.0.0-beta.8"
?
mhm
seems like it can't be found
yea that might be it 😅
yup
just plugged that in a paste for ya 😅
Yea so, what you wanna do is running ./gradlew wrapper --gradle-version 8.12 twice (the twice is important)
i updated my gradle and also configured it in intelliJ build tools configuration but i still get this error
~/Desktop/XPrivateMines git:[master]
./gradlew wrapper --gradle-version 8.12
FAILURE: Build failed with an exception.
-
Where:
Build file '/Users/alessandrocalista/Desktop/XPrivateMines/build.gradle.kts' line: 3 -
What went wrong:
Plugin [id: 'io.papermc.paperweight.userdev', version: 'v2.0.0-beta.8'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (No included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:v2.0.0-beta.8')
Searched in the following repositories:
Gradle Central Plugin Repository
maven(https://repo.papermc.io/repository/maven-public/)
- Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
BUILD FAILED in 675ms
seems like it cannot find the plugin
oh, sorry
without the v
id("io.papermc.paperweight.userdev") version "2.0.0-beta.8"
I copied from the wrong place 
~/Desktop/XPrivateMines git:[master]
./gradlew wrapper --gradle-version 8.12
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring root project 'XenPrivateMines'.
Could not resolve all artifacts for configuration ':classpath'.
Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.8.
Required by:
project : > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.8
No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.8 was found. The consumer was configured to find a library for use during runtime, compatible with Java 22, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.8' but:
- Variant 'javadocElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 22)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.8')
- Variant 'shadowRuntimeElements' declares a library for use during runtime, compatible with Java 17, packaged as a jar, and its dependencies repackaged (shadow jar):
- Incompatible because this component declares a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.11.1' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.8'
- Variant 'sourcesElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 22)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.8')
- Try:
No matching variant errors are explained in more detail at https://docs.gradle.org/8.8/userguide/variant_model.html#sub:variant-no-match.
Review the variant matching algorithm at https://docs.gradle.org/8.8/userguide/variant_attributes.html#sec:abm_algorithm.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
BUILD FAILED in 315ms
i did run twice btw.
oh, no don'T upgrade the plugin before bumping gradle
that won't work
now gradle cannot set itself up, so it cannot bump to 8.12
its cyclic
i didn't upgrade the plugin, should i remove my brew installation and let intellij handle it alone?
Well you did, it's searching for io.papermc.paperweight:paperweight-userdev:2.0.0-beta.8
nah. Just, before touching your build.gradle.kts at all, upgrade the wrapper by running that twice
then attempt to update
I'd be depressing if userdev needs java 22 tho 👀
ok so i go with 1.7.7 run twice then update
yeah its not even LTS
pretty sure it should be compiling down to java 17
honestly
like regarding that issues with mockbukkit
now running the test doesn't even give me that error
LOL
Oh XD well good lol
Okay well, if its updated, now you should be able to paste the snippet
yeah
also seems like mockbukkit only supports spigot plugins :X
yeah now i need to study how to pass test classes for the nms / economy and worldguard / worldedit things so i can make them work
gl gl, try asking in their discord. Pretty sure they support paper
they have a discord?
Is there a way to develop gh actions or smth similar without spamming the whole repo with commits?
I mean, you'd need to check GH actions docs
there was an OSS project for building actions locally called act, iirc
idk if it's suitable for development
I mean yes but yk everyone makes errors without testing it
^ pretty much
yeah, thats a common thing with me. I'm usually testing on a separate repo
Hey guys im getting weird errors, when im trying to access a private repository with a paper fork published userdev
But im authenticated and somehow userdev doesnt get i
Error: https://pastes.dev/7gZMDUVuqP
build.gradle: https://pastes.dev/WdUdMhSNKv
You aren't authorised. The error says that. Ensure that your env has
VARILX_USER and VARILX_TOKEN set.
Thats 100% set because with out the user dev it still can fetch the fork
And if these are not set i would get an 403 ig
any ideas what it means? this error appears only on 1.21.4 version
Did you add that repo in settings.gradle.kts?
No? I never heard of repositories in settings.gradle.kts
My settings.gradle is almost empty
Can you tell me how i can put in there?
use the latest beta of paperweight
I looked into my own setup and it isn't needed. Was just a thought in the wrong direction. My bad 😞
Instead try the same what cat recommended. Update paperweight to 2.0.0-beta.8 as 1.21.4 needs that. Could solve the issue.
I think this wont work because my fork still uses the old "master" branch
message.txt by @bronze willow: https://pastes.dev/FcJv2xpXlj
for one, update gradle, from the seems of it
i have the same problem
Ah okay. 😅 No clue then.
Now i get the old error
I mean, iirc your issue is one due to how repos work
use the properties to define that stuff
Do you mean gradle.properties?
yes
How?
~/.gradle/gradle.properties
paperSnapshotsUsername=xxx
paperSnapshotsPassword=xxx
replace paperSnapshots with your repo name
And do i need to change the build.gradle?
doesn't seems to work
https://pastes.dev/99tEREa825
update gradle
honestly do not remember
Is it this:
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
?

So the error doesnt change
it shows the same error when I try to update gradle with ".\gradlew wrapper --gradle-version 8.12"
try removing basic auth, otherwise, I have no idea
update the gradle-wrapper.properties manually
updated, but now it shows this
Download https://plugins.gradle.org/m2/io/papermc/paperweight/paperweight-userdev/2.0.0-beta.8/paperweight-userdev-2.0.0-beta.8.jar, took 1 s 273 ms
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\just_lofe\Documents\GitHub1\xMain\bukkit\build.gradle' line: 14
* What went wrong:
An exception occurred applying plugin request [id: 'io.papermc.paperweight.userdev', version: '2.0.0-beta.8']
> Failed to apply plugin 'io.papermc.paperweight.userdev'.
> Could not create an instance of type io.papermc.paperweight.userdev.PaperweightUserExtension.
> Configuration with name 'compileOnly' not found.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
CONFIGURE FAILED in 6s
make sure that userdev is applied after the java library plugin
like this?
yes
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bukkit:paperweightUserdevSetup'.
> io.papermc.paperweight.PaperweightException: Failed to execute steps, invalidated relevant caches. Run with --stacktrace for more details.
💇♂️
oh i cleaned cache and it seems to work
same error
need more details
what can I provide?
the full message
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
> Task :bukkit:paperweightUserdevSetup
:executing 'download minecraft manifest'
:executing 'download minecraft version manifest'
:executing 'download vanilla minecraft server jar'
:executing 'download mojang server mappings'
:executing 'apply mojang mapped paperclip patch'
:executing 'extract libraries and server from downloaded jar'
:executing 'remap minecraft server jar'
> Task :bukkit:paperweightUserdevSetup FAILED
[Incubating] Problems report is available at: file:///C:/Users/just_lofe/Documents/GitHub1/xMain/build/reports/problems/problems-report.html
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.12/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
1 actionable task: 1 executed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bukkit:paperweightUserdevSetup'.
> io.papermc.paperweight.PaperweightException: Failed to execute steps, invalidated relevant caches. Run with --stacktrace for more details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 3m 25s
try running it with --stracktrace for some more info
kotlinSetupWindowsX86.txt by @indigo rapids: https://pastes.dev/ZgamiDtqzU
help me Hello, who can help me with something, that is, create a menu with a kit for my paper server with the DeluxeMenus plugin, I hope you can help me, give me a config for a fine menu with a kit in private or even here in general
Please, do not crosspost
(676c00846ed5010734cf1a70) // @pine hawk (@dariuspro04859 / 1297152244793475112) has been warned by @rapid fractal (177150983258767360)
Reason: dont spam/crosspost asking for spoonfeed
Hello, can anyone help me with paperweight-userdev?
I'm using gradle groovy v8.11.
if i try to sync gradle, it throws this error:
and this is my build.gradle file:
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
your target java version needs to be java 21
now i have changed the target version, but the same error was thrown
ah, thanks now it seems to work
now i become this weird error:
Execution failed for task ':bukkit:paperweightUserdevSetup'.
> io.papermc.paperweight.PaperweightException: Failed to execute steps, invalidated relevant caches. Run with --stacktrace for more details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.12/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 8s
Well run stacktrace for more details / proivde the whole log
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
C:\Users\Benny.gradle\caches\paperweight-userdev\613081b689735a1c6be92857491be1a4773c6b9c71a65baf922ee4f718c54ed2\module\io.papermc.paper\dev-bundle\1.21.4-R0.1-SNAPSHOT\paperweight\setupCache\remapServerJar.jar.log
Find the log
how can i fix this?
Idk. Might be a good idea to setup a java toolchain
i has the exact same problem and java 22, is there any solution?
i think this has fixed the problem:
def targetJavaVersion = 21
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
place this in your build.gradle
The answer is right above your question.
Yea, 1.21.4 needs java 21
only 21?
Well java 22 should maybe work?
no, it doesn't works
Share your build.gradle.kts
Please send large files/logs to a pastebin
A sensible, modern pastebin. Share text and source code snippets with no hassle.
I see one thing that you should update: ShadowJar https://github.com/GradleUp/shadow/releases/tag/9.0.0-beta4 Migrate to id("com.gradleup.shadow") version "9.0.0-beta4"
Proguard has an updated version as well. 7.5.0 -> 7.6.1.
That should at least fix shadowing in newer java versions.
it doesn't fix my problem
Did you post your log file?
.
Caused by: io.papermc.paperweight.PaperweightException: Execution of 'io.papermc.codebook.cli.Main' failed with exit code 1. Log file: C:\Users\just_lofe.gradle\caches\paperweight-userdev\613081b689735a1c6be92857491be1a4773c6b9c71a65baf922ee4f718c54ed2\module\io.papermc.paper\dev-bundle\1.21.4-R0.1-SNAPSHOT\paperweight\setupCache\remapServerJar.jar.log
That lot
error like here
Can you share it anyway please. Just so I can confirm that
the entire file or only stacktrace?
For all I care all of it
asm needs an update in paperweight I guess.
Okay danke
Yea
In codebook
So yea java 21 only then but I'll look into getting that fixed
9.5 -> 9.7.1
Only question is why the server jar it is remapping has java 22 code in it
The classfiles are compiles with java 22 and the remapping happens on them?
Just a wild guess.
Well but that is the Minecraft server, which run on java 21
The plugin that uses userdev get's compiled with Java 22 and probably uses 22'er features in classes using NMS.
I've built fresh paper project and published it to local maven repository (using publishToMavenLocal / publishMavenPublicationToMavenLocal) and tried to use local paper api in my plugin project as before:
mavenLocal()
mavenCentral()
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT'
}```
but some error that I haven't seen before appears when trying to build jar: https://pastes.dev/61a0EtXBNi
What did I wrong?
you still need to add the paper repo
just put it below maven local to prioritize your local build for testing
It's working, thanks 🙃
Is there any option to use paperweight with credentials?
Hm?
So im forking paper and publishing it to a private repo and i want to use this paperweight
Paperweight patcher ?
Is there a documentation for that?
Well, you are presumably using it if you forked paper?
paperweight-examples is the repo
Yeah but i dont really know what it does
But credentials are defined in the repo definition
So paperweight isn't really related to how you Auth to a repo
Yeah i did that but somehow it doesnt find the private dependencies inside the paper fork, but without paperweight it works
So i have this in the fork: api(group = "de.varilx.coreapi", name = "common", version = "2.3.12-commit-bf53780", classifier = "shadow")
And if i use it normaly everything is okay, but if i add paperweight i get this:
> Could not HEAD 'https://reposilite.varilx.de/Shadow/de/varilx/coreapi/common/2.3.12-commit-bf53780/common-2.3.12-commit-bf53780.jar'. Received status code 401 from server: Unauthorized
Idk if PW does anything in the build process that might fuck with that
But also not in a position to check that
Not like there is a "normally" without paperweight tho so, idk.
Is that project public
No thats why i have to use credentials
Well the code of the fork might have been
I can use the forked api fine, but if i want to use paperweight everything breaks
I dont really understand the paperweight code, but could the problem be, that paperweight is doing something wron with the credentials
So tried downloading the dev bundle zip and i realized my "common" doesnt show up in "compileDependencies": [, only in "runtimeDependencies": [, is that a problem, or is that normally the case
There's no 1.21.4 until after the fork, right?
It's now officially after the fork
And we're mid-fork right now, right?
No, it's been merged into main
Oh. So is there a stable 1.21.4 release?
No, we want more people to test it
It's not stable until we heard from enough people that it is stable
We called it softspoon for a while
it is stable imo
hope that is enough feedback
Is there a guide to convert old paper forks to hardfork/paperweight 2?
Guess I can use the changes in the paperweight-examples for now
That's the easiest way, just start clean and copy patches over
I’m a bit confused. Never used userdev before. I only want to achieve one thing. Stop the server from remapping my plugins since I only use the api and not any nms stuff and I intentionally want to keep it that way. So umm, whats the easiest and most straigthforward thing to do to achieve this? Do I even need userdev?
I’m not too familiar with this whole manifest thing in java
No you just need to set a manifest entry
How do I not find these docs damn, thank you!
And I assume this will work for every version
yes
Hi, I am getting the following error when trying to build a multi-module project that uses paperweight-userdev v2.0.0-beta.8.
A problem was found with the configuration of task ':moduleB:compileJava' (type 'JavaCompile').
- Gradle detected a problem with the following location: 'C:\Users\user\.gradle\caches\paperweight-userdev\613081b689735a1c6be92857491be1a4773c6b9c71a65baf922ee4f718c54ed2\module\io.papermc.paper\dev-bundle\1.21.4-R0.1-SNAPSHOT\paperweight\setupCache\patchedSources.jar'.
Reason: Task ':moduleB:compileJava' uses this output of task ':moduleA:paperweightUserdevSetup' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':moduleA:paperweightUserdevSetup' as an input of ':moduleB:compileJava'.
2. Declare an explicit dependency on ':moduleA:paperweightUserdevSetup' from ':moduleB:compileJava' using Task#dependsOn.
3. Declare an explicit dependency on ':moduleA:paperweightUserdevSetup' from ':moduleB:compileJava' using Task#mustRunAfter.
I'm not sure whether this is a bug in paperweight-userdev or a misconfigured project on my part, though this setup works fine with userdev v1.
I've created an example repository to reproduce this here: https://github.com/NichtStudioCode/paperweight-userdev2-multimodule (Just run gradle build)
I've also tried using 2.0.0-SNAPSHOT and disabling shared caches with -Ppaperweight.sharedCaches=false, both of which did not seem to help.
Of course, doing what gradle suggests works, but that seems like an odd solution
whatever that is does not look good
That is what I meant with "doing what gradle suggests works". Gradle's other suggested solutions also work, but I don't think this should be happening in the first place?
hmm
paperweight is probably sharing the cache between multiple submodules if they use the same paper devbundle version.
not even submodules, its machine wide
Yea its a global cache, but gradle should not consider that as an output I don't think
open an issue pls, that repo is a good minimal repro, jmp can take a look then

it's a known issue with using the same bundle twice in the same build and fixed by my rewrite, no issue needed
and do not try and follow the 'possible solutions', they are wrong
if I am using paperweight-userdev, just nothing works anymore. Even if I have no classes for nms. have I done something wrong?
https://pastes.dev/k5UmlbUw9w
you are probably looking for classes in spigot mappings, but they will be in real mappings
ie ServerPlayer not EntityPlayer
I am not using any classes. I´ve just added paperweight-uesrdev to the build.gradle.kts, nothing more
So what exactly doesn't work anymore?
other plugins, they are just getting disabled with NoClassDefFoundError
[22:56:56] [Server thread/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'EnderFrame-1.0-SNAPSHOT.jar' in folder 'plugins/.paper-remapped'
Please share the whole error, that part is useless
Ok, so it's not other plugins that are broken
What broke is the shading of libs into your plugin
First try updating both the shadow (it now has Gradle up as group id) and the paperweight-userdev plugin
no
they are just using the wrong jar
remove that block where you configure the shadowJar task, set the artifact configuration to MOJANG_PRODUCTION if you are not tagreting spigot, and then use the jar without a classifier
or honestly it could be both things lol
Would anyone be able to help me with my fork, please? I can't seem to get it to applyPatches anymore after the hardfork. Even a fresh clone from paperweight-examples, too
which version of the paperweight-userdev plugin should I use?
2.0.0-beta.8
that issue ended up fixing itself after a reboot for me
when I ran into it years ago
I've rebooted my computer multiple times :/
You tried applyAllPatches?
Yes
its telling you that your gradle is outdated
updated my gradle and both shadow and userdev plugins, but same error
here is my build.gradle.kts
As I said, the shadow plugin moved it's group id to gradleup
And as jmp said, you are most likely running the wrong jar
https://github.com/PaperMC/Paper/blob/af2812fb0f14acea697f3ff6b7b56ffd14900041/paper-server/src/main/java/io/papermc/paper/plugin/provider/configuration/PaperPluginMeta.java#L62 looks like it is supported so if it's missing an issue/PR is good
I am running the one jar that gets generated. there is no other
if you are on windows try in wsl, otherwise try in a vm generally
but what should I do about it?
Change the group id to the new one ^^
com.gradleup.shadow
okay, so I´ve updated the shadow plugin now correctly, but there is the same error. and what do you mean with "running the wrong jar"? There gets only one jar generated
Try open the jar and look if the classes are inside, then find the dependency that should add those classes and make sure you assigned it to the right configuration
looks like this, but i don´t have any nms classes in the project though
maybe cause I have no exact shadowTask assigned and just added the plugin?
Paperweight should hook into shadow
but why isnt it doing it then
if you are targeting spigot then make the assemble task dependsOn reobfJar and set paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION, otherwise make assemble dependsOn shadowJar
Do you mean if I have spigot plugins on my server?
no, I mean if you want the plugin to run on spigot (it makes the build slower and requires remapping on server startup)
so then tasks.assemble { dependsOn(tasks.shadowJar) } and remove anything changing jar file names
then build should produce two jars
which one should I use?
-all
full message
cut off errors are not useful but that looks like an error in your packet lib
it is the full message
how can I do that?
seems like your dashboard is cutting out parts of the error, pull the latest.log file
relocate into your own package space
everything that you shade
I dont shade anything
your lib is spigot mapped
net.megavex.scoreboardlibrary.api.ScoreboardLibrary this is in your source code?
no you need to find out where the lib publishes a mojang mapped variant and use that
tasks.withType<ShadowJar> {
relocate("com.zaxxer.hikari", "ch.ronny.relocated.hikari")
}
like this?
otherwise you need a more complicated build setup where you use the reobfJar and then add the spigot mapped library after remapping in another task
yes like that but for everything you shade
including the library class files in your jar
everything you have api or implementation or shadow
with shadow
that's not what the shadow configuration is for unless you modify things
so like I have to relocate everything that I implement or "runtimeOnly" or "compileOnly"?
by default shadow will include everything from your runtimeClasspath
just mentioning shadow since i've also seen people use it
well they are either doing it wrong or have overridden other options to make that work
¯_(ツ)_/¯
so thats my build.gradle.kts now. What have I done wrong?
isn't that explicite keyword (deprecated) and not recommend ? Thougth I read smth about that.
idk what this is supposed to mean, just don't recommend it in the future now that you know better 
I wasn't recommending anything?
idk why you are being so defensive over a small thing, maybe take a break from discord and relax or something
you don't need to redeclare the dependency runtimeOnly if it's implementation
generally for a plugin use implementation for things you want to shade and compile against, compileOnly for things you want to compile against but not shade, and runtimeOnly for things you want to shade but not compile against
I explained shading is when shadow includes library classes in your jar
I found mojangmappings
what are you confused about? compiling against something?
that means it's on the classpath passed to javac
easy everything works
thank you a lot
and minidigger/martin too!
@smoky violet If I want to use nms now, I just have to create the right package, like net.minecraft.world.entitiy.monster and add my classes to it right?
and how can I modify a zombie for example?
that's beyond the scope of the build tooling channel
(in generally, paper doesn't allow plugins to modify vanilla code, you can only call vanilla code or extend it or modify variables using reflection I guess)
@static urchin
pencil still dead HUH
Please send large files/logs to a pastebin
no it just died again
fucking hell
fix it
Somebody add monitoring so I can auto restart it, lol
I gotta review paper PRs im busy 😭
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
`java-library`
`maven-publish`
id("io.papermc.paperweight.userdev") version "2.0.0-beta.8"
}
repositories {
mavenLocal()
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
url = uri("https://oss.sonatype.org/content/groups/public/")
}
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}
dependencies {
// compileOnly(libs.io.papermc.paper.paper.api)
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}
group = "me.DJ1TJOO"
version = "1.0-SNAPSHOT"
description = "CustomGUI"
java.sourceCompatibility = JavaVersion.VERSION_16
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
}
tasks.withType<JavaCompile>() {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc>() {
options.encoding = "UTF-8"
}
This also works?
Oh I see the sourceCompatibility now. I automaticly converted from maven to gradle, so probably something went wrong there
Okay thanks its working!
Is there a way I can sync the version in my paper-plugin.yml with my build tool build.gradle.kts?
version: '${version}' This is supported, but i dont know what else is
thanks but.. where do i put that in the file build.gradle.kts 💀
Normally
Yea what dario said combined with the processResources task
Whats that?
tasks.processResources {
val props = mapOf("version" to version)
inputs.properties(props)
filteringCharset = "UTF-8"
duplicatesStrategy = DuplicatesStrategy.INCLUDE
filesMatching("paper-plugin.yml") {
expand(props)
}
}
Well no, you still need the key to exist
i.e. paper-plugin.yml for this: ```yaml
version: 0.0.0 # gets expanded to project.version
plugins {
id("java")
id("io.papermc.paperweight.userdev") version "1.7.7"
}
group = "net.jandie1505"
version = "1.3-1.21.4-SNAPSHOT"
repositories {
mavenCentral()
maven {
name = "papermc"
url = uri("https://repo.papermc.io/repository/maven-public/")
}
}
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
dependencies {
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}
Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
This has worked before, but now I have opened the project and it does not work anymore.
Update paperweight
and gradle
anyone knows why my gradle files are still getting showed as changes in github even though this is my .gitignore?
just remove the changes?
but they are getting added now when I am building for example
but its in my gitignore
gitignore .gradle/* and build/*
or just .gradle and build
isnt the 1.7.7 Version the newest? I've got the Same issue and idk how to fix it
2.0.0-beta.8
And wich gradle version? I am currently using 8.11
at least .2 I think but use 8.12
There is a 8.12
Yup there, but not in the IntellijIdea Wizzard
I’m not sure exactly what I did wrong, but I definitely messed something up.
pls dont send screen shots of logs
just do it
import xyz.jpenilla.resourcefactory.bukkit.BukkitPluginYaml
plugins {
`java-library`
id("io.papermc.paperweight.userdev") version "2.0.0-beta.8"
id("xyz.jpenilla.run-paper") version "2.3.1" // Adds runServer and runMojangMappedServer tasks for testing
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.2.0" // Generates plugin.yml based on the Gradle config
}
group = "dev.subscripted"
version = "1.0.0-SNAPSHOT"
description = "Userdev Test"
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
dependencies {
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
}
tasks {
compileJava {
options.release = 21
}
javadoc {
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
}
}
bukkitPluginYaml {
main = "dev.subscripted.Main"
load = BukkitPluginYaml.PluginLoadOrder.STARTUP
authors.add("Author")
apiVersion = "1.21"
}
and whats your gradle version?
8.11
i've used 8.11
8.11 or 8.11.2
there's a difference
if mini says you need 8.11.2 then you probably want to try said version
Okay now everything is working well
I have my core plugin from my minecraft network and its paper and velocity together. It all worked until I installed paperweight-userdev. Now the plugin won´t load on the Proxy. How can I fix this?
#paper-dev and send logs there (and probably your build script)
idk its some of both thats why I posted it here
Hello I would like to use the shadow color from adventure that was updated in one of the recent 1.21.4 builds. How do I update the paper version I use in development?
Should I change something about this in the build.gradle.kts:
paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
try with ./gradlew build --refresh-dependencies
alternatively, the caches are in ~/.gradle/caches/paperweight-userdev/ or whatever that path is on windows, so you could just yank that
gradlew cleanCaches or something is also a thing
oh yea, there is cleanAllPaperweightUserdevCaches and cleanCache
This did not seem to work, going to try to clean the cache
cleanAllPaperweightUserdevCaches also doesn't seem to work for some reason
after you do that you need to reimport your gradle project in IJ of course
deleting the userdev cache will not do anything to make the api update
(or the dev bundle/server for that matter)
how to fix this issue
Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
Update userdev to 2.0.0-beta.8
Could not resolve io.papermc.paperweight:paperweight-userdev:2.0.0-beta.8.
Required by:
project :common-paper > io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.8
No matching variant of io.papermc.paperweight:paperweight-userdev:2.0.0-beta.8 was found. The consumer was configured to find a library for use during runtime, compatible with Java 21, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.11-rc-1' but:
Update Gradle
what version
idk what rc means
how do I publish the dev bundle to maven local?
ty
Hey! I have a multi-module project and need to detect the server type (Velocity, Paper, Spigot, etc.) at runtime. I assume the check should be done in onEnable(), but what universal dependency can I use to identify if it's Spigot, Bukkit, etc., without relying on imports that might not be available on all server types?
I mean, at least two of those platforms are their own entire thing that have their own entry points that you can detect and pass into your shared code type of deal
There is no universal thing here
but, you'd just deal with the associated detections on the platform specific side
like, if your velocity initialisation logic is what calls into your shared code, you can assume it's something velocity based
for the others, you'd basically be Class.forName'ing stuff
Oh, ok! Thank you
plugins {
id 'java'
}
group 'me.senkoco'
version '1.3.1'
repositories {
mavenCentral()
mavenLocal()
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
maven { url = 'https://repo.glaremasters.me/repository/towny/' }
}
dependencies {
compileOnly 'io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT'
compileOnly 'com.palmergames.bukkit.towny:towny:0.101.0.4'
compileOnly files("libs/TownyMenus-0.0.11.jar")
}
sourceCompatibility = targetCompatibility = '17'
compileJava.options.encoding = 'UTF-8'
setLibsDirName('../builds')
related error: Could not resolve io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT
this looks like the problem
No matching variant of io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT:20241228.232114-63 was found. The consumer was configured to find a library for use during compile-time, compatible with Java 17, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally but:
- Variant 'apiElements' capabilities com.destroystokyo.paper:paper-api:1.21.4-R0.1-SNAPSHOT and com.destroystokyo.paper:paper-mojangapi:1.21.4-R0.1-SNAPSHOT and io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT and io.papermc.paper:paper-mojangapi:1.21.4-R0.1-SNAPSHOT and org.bukkit:bukkit:1.21.4-R0.1-SNAPSHOT and org.spigotmc:spigot-api:1.21.4-R0.1-SNAPSHOT declares a library for use during compile-time, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component, compatible with Java 21 and the consumer needed a component, compatible with Java 17
- Other compatible attribute:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
oh I just saw it..
You need to use java 21 or higher
I think it depends on which api's you are using, but I'm not sure
well I'm gonna switch from spigot first then I'll get to checking that
indeed works much better
uhh anyone able to help me with this paperweight-userdev error?
Please send large files/logs to a pastebin
throw the entire error when running ./gradlew build or whatever the windows version is (I think just gradlew build
Welp run it with --stacktrace then and please throw the output at a pastebin not a screenshot
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
/home/anmvc/.gradle/caches/paperweight-userdev/613081b689735a1c6be92857491be1a4773c6b9c71a65baf922ee4f718c54ed2/module/io.papermc.paper/dev-bundle/1.21.4-R0.1-SNAPSHOT/paperweight/setupCache/patchedSources.log
check the log file 
presumably wrong java version somewhere
can you provide the log
patchedSources.log by @rocky geyser: https://pastes.dev/3YYALMw8ZS
Yea you have hunk failures
which usually means the decompiler was ran with a different java version or generally some different values
can you share your build.gradle.kts
i'm guessing for paper?

