#build-tooling-help

1 messages · Page 18 of 1

bronze willow
#

yes

#

everything in the file patches commit ends up being a file patch

I still dont get this, what does file patches commit mean?

smoky violet
#

try reading the git log we told you to read

#

this is not rocket science

bronze ember
#

A commit with the term file patches in its name, with a tag called file and an author cause file

#

Maybe we mean that one

#

Can't really make it more obvious

bronze willow
#

now i get it

#

But how should i know* this?

smoky violet
#

... what?

#

how should you know this? because you said you read the paper contributing doc

#

which is part of understanding the paper project structure I mentioned earlier

#

we also laid it out pretty plainly

bronze willow
#

then im just blind

#

I get it now ig, thank you

smoky violet
#

some of the stuff you were asking about earlier is not documented yet, so idk how the documented part was the hardest to get omegaroll

bronze willow
#

But where is this author shit documented, i still cant find it

#

Am i dumb?

smoky violet
#

the author of the commit is set to make things more obvious, but it's not important

#

the concepts applied to mc sources in paper extend to api, paper-server, etc. in forks

bronze willow
#

So should i use it or just use feature patches as i did accidentally?

smoky violet
#

for example there is also fixup tasks for each patch set

#

it's up to you

bronze willow
#

Are there positvite aspects of file patches?

agile skiff
#

use file patches for stuff that you can easily update to new versions and don't need to be able to just rip out if you want to

#

and feature patches if you have big changes or stuff that you might want to be able to just yoink for a while

bronze ember
#

That's our policy, you can do whatever you want

smoky violet
#

the main benefit is it makes for less merge conflicts

bronze ember
#

Some forks don't use file patches at all, some don't use feature patches at all

agile skiff
#

though making sure your code still compiles when that feature patch is not applied is completely up to you

#

(not even sure whether paper compiles without some of the feature patches lol)

bronze willow
#

What do i do now, i have a feature patch and i want to convert it to a file patch

bronze ember
agile skiff
bronze ember
static urchin
#

it at least doesn't run without moonrise I dont thinkomegaroll

agile skiff
#

or whatever is the right gradle tasks for that

main mica
#

always

smoky violet
#

no

#

kenny

static urchin
#

both ™️

agile skiff
smoky violet
#

no, just kenny

static urchin
main mica
static urchin
#

There is already a discussion in here as to why not

#

lemme find it

agile skiff
#

honestly might be nice to have some more technical examples in the contributing md. e.g. a simplified git log inside paper-server folder or something. cause i feel like new people might often have trouble applying the stuff thats written in there into an actual git structure

smoky violet
#

you can make that command nicer by just using the appropriate rebuild*Patches task instead of doing files and patches separately

main mica
#

inb4 cryptite did it wrong and there was an easier way all the time OMEGALUL

smoky violet
#

but what even is the goal there lol

grim mauve
#

what I'm doing is ./gradlew rebuildMinecraftPatches rebuildServerPatches after commiting my server changes SCsleepybb6

bronze ember
smoky violet
#

./gradlew tasks is required reading for fork devs

#

the entire thing!

grim mauve
static urchin
#

only thing I think was a no no was rebuildAllPatches no?

#

has been a while since that chat

rapid fractal
#

Guys please spend sometime reading, this cannot be good for jmp’s blood pressure notlikerie

smoky violet
grim mauve
#

I did read the tasks but I think at the time I was too confused about the distiction between paper-server and the fork-server/src/minecraft folder that when I was reading the tasks I was like "uuhh i don't get this thing at all where's my beloved rebuildPatches task"

static urchin
#

Right because the upstreams were nested builds or smth. Welp not a fork dev so SpookyDance

smoky violet
#

thats why you should write the readme for the v2 example

bronze ember
#

Isn't there a PR by somebody?

#

I started reading it but then it was too much text and my Jenkins run was done kekw

grim mauve
#

Finished updating my fork to Paper 1.21.4! Thanks lynx, cat and jmp for replying to my stupid questions SCpetpetcat

After you understand what's going on and it clicks in your head, it is fairly easy to go around and do the changes, you just need to remember that you need to create a commit in the root paper-server and in fork-server/src/minecraft/ to create a patch containing all of your server changes.

The REAL hardest part is updating the patches due to the mappings changes which cause everything on the net.minecraft.server package to conflict, but that's not actually hard, it's just mind-numbing work comparing the original patch file, Paper's 1.21.3 source code and Paper's 1.21.4 source code. Just put some cool electronic music and go wild.

(Sorry for being a kotlin enjoyer lynx sad_cat5, also I haven't updated my fork's "branding" patch yet)

smoky violet
#

if you don't have zoxide you should install it

#

helps with navigating around

#

(can also just make your own aliases or scripts)

bronze willow
#

Sorry to ask again but now i have File Patches in the commit but still a feature patch

agile skiff
#

no

#

run git log

#

you will see that there is already a file patches commit

#

you need to append to that commit

agile skiff
#

or at least one of the first

#

ig mc source come first

smoky violet
#

it's going to be one of the latest commits

#

before your features

#

api history looks like ```
commit 61b4c081c1d8eb4a06c7a000216d972dde3da811 (HEAD -> main, tag: file)
Author: File noreply+automated@papermc.io
Date: Sun Apr 20 06:37:42 1997 -0700

fork paperApi File Patches

commit e3990cd3d41170ccfa28004bfe2ff982b87877cd (tag: base)
Author: base noreply+automated@papermc.io
Date: Mon Jan 13 13:55:28 2025 -0700

Import repo from upstream

commit d69981b611c8afc67e55aa9955a749e3af119a77
Author: Jason Penilla 11360596+jpenilla@users.noreply.github.com
Date: Mon Jan 13 13:51:40 2025 -0700

[ci skip] Remove redundant build configuration

This is already the default path for the reobf mappings patch.

commit 1bb3677651770f274404b2a245c9b51cb82b776a
Author: Bjarne Koll git@lynxplay.dev
Date: Mon Jan 13 17:51:58 2025 +0100

Remove deprecation from EntityRemoveEvent (#11961)
#

followed by feature patches

bronze willow
#

yeah

#

and then i do that?

#

No thats for minecraft patches

#

Im lost

smoky violet
#

there are fixup tasks for other source sets. but the manual steps should be pretty much the same bar file paths

bronze willow
brave widgetBOT
smoky violet
#

I think mini wanted to look at improving the error logging for some tasks, you would need to run again with -Dpaperweight.debug=true for the full error - but you probably need to go the manual route anyways with an interactive rebase

agile skiff
#

do you actually have any changed files that are not commited?

agile skiff
#

yeah well you need the changes you want to make to file patches to not be commited

bronze willow
# smoky violet I think mini wanted to look at improving the error logging for some tasks, you w...

Calculating task graph as no cached configuration is available for tasks: fixuppaperapifilepatches

Configure project :
paperweight-patcher v2.0.0-beta.13 (running on 'Linux')

Configure project :forky-server
paperweight-core v2.0.0-beta.13 (running on 'Linux')

Task :fixupPaperApiFilePatches FAILED

$ (pwd) /home/dario/test-fork-of-fork/paper-api
$ git -c commit.gpgsign=false -c core.safecrlf=false add .

$ (pwd) /home/dario/test-fork-of-fork/paper-api
$ git -c commit.gpgsign=false -c core.safecrlf=false commit --fixup file
On branch dev/hard-fork
nothing to commit, working tree clean

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':fixupPaperApiFilePatches'.

io.papermc.paperweight.PaperweightException: Command finished with 1 exit code: git -c commit.gpgsign=false -c core.safecrlf=false commit --fixup 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 987ms
1 actionable task: 1 executed
Configuration cache entry stored.

agile skiff
#

the commit you just made with the changes you want in file patches, soft reset that one and re run

bronze willow
#

Oh maybe because i have the changes commited and not changed

agile skiff
bronze willow
#

i just realized this too haha

smoky violet
#

you need the changes staged

#

for the fixup task

#

you should just squash the commit to file patches with interactive rebase and not use the fixup task

bronze ember
#

But I also wanna work on hangar, adventure, that paperweight PR, etc...

agile skiff
#

btw jmp or mini, out of interest what exactly are the ROOT, Vanilla and paper Imports commits in paper-server/minecraft/jadajadajada/

bronze willow
#

Now its failing again but i get this

smoky violet
#

did you open an issue for this one

agile skiff
#

oh wait paper Imports is for library imports i assume?

bronze ember
agile skiff
smoky violet
#

all of that should be pretty obvious if you look at the content of the commits

#

the decompile fixes

agile skiff
#

ahh

#

yeah i thought that would be applied in one commit instead of 2

main mica
#

ngl I find it way more complicated than the old system

#

haven't even made it past the build changes patch yet OMEGALUL

bronze willow
#

It works ty guys

smoky violet
static urchin
main mica
#

Maybe I am just too old for change

agile skiff
# smoky violet how is it applied in 2

well i thought that you guys would just apply the decompiled server and the mache patches in 1 commit instead of having it split between first decompiled server and then mache patches

smoky violet
#

paper is more complicated

#

from the dev perspective

#

forks get the full benefits but also have to deal with the same complexity

bronze willow
#

Cant you buy mojang and make the source public and no patches

static urchin
bronze willow
grim mauve
#

paper is not a spigot fork anymore

static urchin
#

same reason forks use patches when forking paper

#

instead of just copying our files

grim mauve
#

me a fork dev thinking about why do I use patches instead of copying paper's files

bronze willow
#

Whats the reason

#

I dont get it

agile skiff
grim mauve
agile skiff
grim mauve
#

but I think it's because it would be a pain in the butt to handle conflicts on .patch files

agile skiff
#
  • you have your changes kinda split of from upstream sources
bronze willow
#

But if upstream had no patches

#

Whats then

static urchin
#

if you just have a 1 to 1 copy of our file

#

and we change stuff in there, you'd have to apply every change onto your fork as well

#

patches mean you can do it all in once and just fix the conflicts from the other perspective, e.g. re-applying your changes over the new sourcefile

smoky violet
#

the alternative is a traditional git fork, not just copy pasting files

#

you can technically get patcher working in such a setup

#

well, you wouldn't use patcher, you would only use the forking features of core

agile skiff
#

paper is a really nice and beginner friendly dev environment that doesn't make you want to rethink the meaning of life at all fingerguns /s

main mica
#

at least v2 seems to be significantly faster

static urchin
#

upside is, after you got into paper, you are a git god compared to like every normal dev you'll meet in your work life

smoky violet
#

but depending what exactly you are running (ie which tasks) the improvement will vary from like 30% faster to 100s of % faster

bronze willow
static urchin
#

the fact alone that we have per-file patches and my changes only have to rebase ~30 feature patch commits is a godsend

main mica
#

You can also finally look at the patches on Github again OMEGALUL

agile skiff
bronze ember
smoky violet
bronze ember
#

People at work here are scared of merge conflicts, I can't relate, I used to fix thousands as a hobby kekwhyper

#

But there is place for patch files in professional environments, all JavaScript package managers for example support patching dependencies

agile skiff
grim mauve
#

if you squint hard enough every commit is a .patch file

bronze ember
#

You can add .patch to any PR or commit on GitHub ^^

distant mango
#

and diff

bronze willow
brave widgetBOT
bronze willow
#

What the hell does that mean?
aused by: java.lang.IllegalArgumentException: Could not find namespace "mojang" in provided tiny tree

smoky violet
#

version mismatch

#

like before, you need to keep build dependencies in sync with upstream

bronze willow
#

How can something be not sync if i changed nothing

smoky violet
#

you declare build dependencies (i.e. plugins) in your root build file

#

so does paper

bronze willow
#

But i changed nothing

#

And paper probably also not in the last 2h

magic hearth
#

This isn't really a paper thing but when I run .\gradlew wrapper --gradle-version latest It updates the gradle-wrapper.properties and the gradlew file but it doesn't update the gradle-wrapper.jar file

smoky violet
#

you have to run it twice

#

docs say so too

magic hearth
#

I have ran it like 20 times

smoky violet
#

not every gradle version changes the jar and scripts

magic hearth
#

oh ok

bronze willow
floral jackal
#

you forking purpur?

magic hearth
#

thanks

bronze willow
#

yes

floral jackal
#

i think this because of purpur using paperweight 8 beta, but latest is 13

smoky violet
#

in the examples the fork uses the same paperweight version as the commit of paper it's forking

floral jackal
#

i don’t any other reasons, all other things is good

smoky violet
#

and for fork of fork, the fork in the middle is also in sync

magic hearth
#

any reason why it updates the gradlew but not the gradlew.bat?

bronze willow
#

But what if the fork in the middle doesnt do that

#

Can i fix that?

smoky violet
#

it might work if you sync with the paper version they fork, but you should bother the maintainers to fix their build

floral jackal
#

but i found issue on 8 beta, when using forks = purpur to use patched repo from purpur, it gives unknown stack overflow error, something like that

#

but on 13 it works perfectly

smoky violet
#

beta 8 is unsupported and outdated

floral jackal
#

yeah, i know

#

so waiting for granny to update to 13 beta

smoky violet
#

are they on latest paper but with out of sync paperweight

#

or just on outdated paper in general

floral jackal
#

maybe

smoky violet
#

the answer is one of those two things lol

#

maybe doesn't make sense

bronze willow
#

This is the hash in the gradle.properties

smoky violet
#

ok so it's in sync but on old paper

bronze willow
#

Yeah they updated today to the hardfork

#

And probably still a bit behind

smoky violet
#

you will need to wait until they update to latest paper and paperweight, unless beta 8 works for you

#

which would be the in-sync version here

bronze willow
#

So if i change my version to 8 it could work?

floral jackal
#

nah, 8 not working

#

i already test that

smoky violet
#

yes it could, unless you run into the issue nonplay has

#

it's dependant on iteration order of some collection, you have to test and see if it effects your project

bronze willow
smoky violet
#

yeah same problem as nonplay

#

you gotta wait on your upstream

bronze willow
#

What if we clone purpur change the version and use that as our upstream

smoky violet
#

it won't work unless you also update paper

#

remeber the in-sync thing

bronze willow
#

So if i want to build i would have to be perfectly up to date?

#

I mean i dont care if im 2 feature patches behind

#

But i can publish

#

Im gonna sleep maybe tomorrow its updated we will see...

smoky violet
#

changes don't always apply to both

grim mauve
#

thanks GitHub

grim mauve
#

maybe I'm stupid, but from where does paperweight pull the name used in the bundler JAR name?

#

in the fork test, the name of the JAR is fork-bundler-1.21.4-R0.1-SNAPSHOT-mojmap.jar, but I can't figure out a way to change the fork name

#

I thought it pulled from the root project name, but even after changing it, the name is still fork (it could be that it is in cache somewhere and that's why it uses fork, but even after a ./gradlew clean it didn't work)

#

I'm stupid smh, that "fork" names comes from the val fork = forks.register("fork") { line in the server's build.gradle.kts SCmic

#

I may or may not have spent an ungodly amount of time trying to figure out where the name was coming from

lucid mulch
#

hi, im getting this error while im trying to modify the server's logo file. I was also getting it everytime while patching and rebuilding but it didnt cause the build to fail

grim mauve
#

this happened to me when I mistakenly asked to rebuild patches (iirc) when I was in the middle of a git am

#

what I did to """fix""" was to delete the folder and use applyAllPatches again

lucid mulch
#

now it rebuilds the patches but still prints the error and no patch is generated

smoky violet
#

you cannot edit binary files in a file patch, have to use a git patch

#

but there is no reason to patch the logo file

#

just add yours directly to your repo and change the refernce to use it's file name

#

or you can use the same file name and add it to the excludes in the patch set config

smoky violet
#

as in rebuild won't mess with the current repo state, just make patch files from it

#

currently it messes with the state for some AT-related stuff which will likely be moved to it's own task

void hill
#

Hey, am a bit confused. I get this error when using a third party plugin.
failed to register events for class me.albusthepenguin.skytester.Sky because me/albusthepenguin/api/events/SkylineSendArrowEvent does not exist.

#

I have only deployed the api pom.

#

the api pom looks

<?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>
    <parent>
        <groupId>me.albusthepenguin</groupId>
        <artifactId>Skyline</artifactId>
        <version>2.1.4</version>
    </parent>

    <distributionManagement>
        <repository>
            <id>github</id>
            <name>GitHub Maven Repository</name>
            <url>https://maven.pkg.github.com/AlbusThePenguin/Skyline</url>
        </repository>
    </distributionManagement>

    <packaging>jar</packaging>

    <artifactId>skyline-api</artifactId>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>```
lament scarab
#

I mean, that's just deploying it to a repo, it's not magically going to make it there for your plugin to use at runtime

#

or, well, not sure why you're talking about deploying the API pom

#

You need to make sure that the plugin is installed, and that you've depended on it inside of your plugin meta file

void hill
#

tried softdepend and depend. the issue might be that the project is multi module (api and core). the jar file project is in the /core module. do I depend on the root pom artifact id or the core module artifact?

bronze willow
#

now on 13

ripe plover
#

i'm using https://github.com/eldoriarpg/plugin-yml and was wondering a thing, currently using the following deps declaration, i can compile my kotlin plugin without issues.

dependencies {
    compileOnly("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT")

    val exposedVersion = "0.57.0"
    library("org.jetbrains.exposed:exposed-core:$exposedVersion")
    library("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")
}

i was wondering why the plugin compiles without all of this:

implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

implementation("org.jetbrains.exposed:exposed-core:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")

// Kotlin Support for MC
library(kotlin("stdlib"))
turbid moon
#

Make sure you are shading and using the shaded jar as well

ripe plover
#

i'm not using the shaded jar

#

and not shading

#

everything works, there are no issue, mine was only a question to know "how it works"

turbid moon
#

Ah

lament scarab
#

library supports transitive dependencies

#

I'd assume that that would pull in all of the other stuff you need

ripe plover
#
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

implementation("org.jetbrains.exposed:exposed-core:$exposedVersion")
implementation("org.jetbrains.exposed:exposed-jdbc:$exposedVersion")

are this only necessary if i'm making a standalone software?
(so this is not the case due to paper having alreadt all the deps and loading my plugin)

distant mango
#

you shouldn’t depend on paper having these

lament scarab
#

paper does not bundle the kotlin stdlib

grim mauve
#

if "everything works" without shading these libs, then it means that something else (another plugin) is providing these dependencies

distant mango
#

isn’t it included by some transitive dependency in the mojang server

grim mauve
#

or you are actually shading it in without knowing that it is being shaded (check the JAR file)

ripe plover
ripe plover
lament scarab
#

I would assume no

ripe plover
#

so i could just use library?

#

but leave the paper compileOnly dep

lament scarab
#

probably

ripe plover
#

we'll see then

bronze willow
#

How can i resolve failures like this?

static urchin
#

define the rejects folder in your fork and apply the rejected hunks manually

bronze willow
#

I dont have a rejects folder

#

Is it somewhere documented?

lucid mulch
#

im not sure the build should take this long..

#

on the fork-of-a-fork branch

bronze willow
#

Are you using wsl?

static urchin
#

windows moment

lucid mulch
#

i just wanted a task list for my pr-

bronze willow
static urchin
#

you need to configure that in your root build.gradle.kts

#

each patch set can have one

bronze willow
#

Like this?

static urchin
#

yea

bronze willow
#

And then?

static urchin
#

apply again

#

like, in this case you'd set it to wherever

#

obviously not just empty

bronze willow
#

Yeah

#

And then i have this file

static urchin
#

apply and the rejected hunks are emitted into that file

#

and now you get to manually apply the hunks

bronze willow
#

Manually manually or can i use the diff editor somehow

static urchin
#

manually manually

bronze willow
#

And can i somehow avoid this?

static urchin
#

no?

bronze willow
#

Why does it happen?

static urchin
#

because we changed our api file that you patch?

#

you are familiar with git right?

bronze willow
#

yeah but i thought i get this conflict gui

static urchin
#

thats with git patches, not with per-file patches those are just diffs.
But like, you are a fork dev, you should figure this out on your own.

bronze willow
#

yeah thank you

#

I was just very confused with the rej thing

#

So i applied the failed hunks to the build.gradle.kts´s, what do i do now, because if i rebuild, nothing happens

#

and i cant fix up my own server (forky-server), right?

lament scarab
#

for file patches, you deal with them, and then amend them into the commit with the file tag

bronze willow
#

But i dont have the updated patch

#

i need to convert the update file to the patch, right?

lament scarab
#

hm, actually, I have no idea how the build.gradle.kts for whatever you're looking at works, it will likely either require some task, or, commiting in some specific manner for the task to find it

bronze willow
bronze willow
#

I tried to copy the test plugin from paper and now i get this error if i refresh:

Property 'annotations' (JVM signature: getAnnotations()Ljava/util/List;) not resolved in class kotlin.reflect.jvm.internal.impl.serialization.deserialization.descriptors.DeserializedAnnotations
bronze ember
#

You really need to do some investigation yourself

#

These are advanced topics and we will not hold your hand

proud maple
#

updating my fork, is there a straightforward way to apply old patches that touch both paper and minecraft classes or will I have to split those manually

smoky violet
#

make two copies of the patch, and in one find/replace to remove the src/main/java prefix from file names

#

apply the replaced one as a mc feature patch, the normal one as paper-server feature patch

#

and ignore missing files (but double check it wasn't renamed or something)

#

you could probably further preprocess the hunks to remove irrelevant ones for each copy, but the amount of work to write that tool would probably not be worth it

proud maple
#

I see, ty

grim mauve
#

what I did was manually changing the "base directory" when applying the patch in IntelliJ IDEA for packages that target org.bukkit ... and etc classes

quasi marsh
#

hmm now that i have gradle 8.12 and paperweight 2.0.0 beta 13
i'm having this error

> Task :paperweightUserdevSetup
Skipping vanillaServerDownloads (up-to-date)
Skipping extractFromBundler (up-to-date)
Skipping remapMinecraft (up-to-date)
Skipping setupMacheSources (up-to-date)
Skipping applyPaperclipPatch (up-to-date)
Executing applyDevBundlePatches...

> Task :paperweightUserdevSetup FAILED

Execution failed for task ':paperweightUserdevSetup'.
> io.papermc.paperweight.PaperweightException: Exception executing applyDevBundlePatches

* 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 7s
1 actionable task: 1 executed
#

Operation has non zero exit code: 1

lament scarab
#

We'd need to see the full output, given that there is nothing useful in there

quasi marsh
#

hmm it’s the full output (ctrl + a and ctrl + c), maybe i can run with stacktrace

distant mango
#

What does this mean? I'm trying to import a project into IDEA. Building via terminal works fine

Cannot invoke "java.io.File.getPath()" because the return value of "org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters.getJavaHome()" is null
JAVA_HOME is set
java -version is Temurin-21.0.5+11
project module sdk is set correctly

buoyant heron
#

Hello, I'm trying to build my plugin against the Paper 1.21.4 API. I'm also using the latest versions of the plugins GradleUp Shadow, and Paperweight Userdev. I'm getting this error when trying to build it. I'm using the latest version (to my knowledge) of Java 21 and Gradle. Any ideas what I should do?

lament scarab
#

you're on the wrong tab, which is causing info to be truncated

buoyant heron
#

ah hold on

distant mango
#

you have a dependency on bukkit

#

or one of your dependencies has a depdency on bukkit

lament scarab
#

Yea, so, your issue is that you've got something that is pulling in a dep on bukkit which is causing the dep requirements to be busted

#

update the vault API in your project

buoyant heron
#

I don't think the Vault API has been updated in years...

lament scarab
#
configurations.all {
    resolutionStrategy {
        dependencySubstitution {
            substitute(module("org.bukkit:bukkit")).using(module("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT"))
        }
    }
}
#

1.7.1 is the latest vault API

buoyant heron
#

ah I think when I added that I just copied their github readme, which has 1.7, not knowing that the latest release is actually 1.7.1

#

changing to 1.7.1 has changed the error

lament scarab
#

Well, yea, that will mitigate one headache, you need to deal with the others

buoyant heron
#

It looks like WorldGuard API is providing stuff that is not needed?

lament scarab
#

it's pulling in stuff as a dependnecy which is conflicting with paper

#

that's why I used a dependency substitution

buoyant heron
#

I added this, seemed to fix it. Would this be correct? Or is there a shorter hand way of doing it

bronze willow
brave widgetBOT
bronze willow
#

Can somebody tell me why i get this error

#
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
    id("java")
    id("java-library")
    id("maven-publish")
    id("io.github.goooler.shadow") version "8.1.8"
}



allprojects {
    plugins.apply("java")
    plugins.apply("maven-publish")
    plugins.apply("java-library")
    plugins.apply("io.github.goooler.shadow")

    group = "de.varilx.coreapi"
    version = "${project.property("project_version")}"

    repositories {
        mavenCentral()
        maven("https://repo.papermc.io/repository/maven-public/")
        maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
        maven("https://jitpack.io")
        maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
        maven("https://repo.codemc.io/repository/maven-public/")
        maven("https://repo.alessiodp.com/releases/")
        maven("https://reposilite.varilx.de/releases") {
            credentials {
                username = System.getenv("VARILX_USER")
                password = System.getenv("VARILX_TOKEN")
            }
        }
    }

    dependencies {
        implementation("org.projectlombok:lombok:1.18.36")
        annotationProcessor("org.projectlombok:lombok:1.18.36")
        compileOnly("org.projectlombok:lombok:1.18.36")

        implementation("org.jetbrains:annotations:26.0.1")
    }

    tasks.register<Jar>("sourcesJar") {
        archiveClassifier.set("sources")
        from(sourceSets.main.get().allJava)
    }

    publishing {
        repositories {
            maven {
                name = "Reposilite"
                url = uri("https://reposilite.varilx.de/releases")
                credentials {
                    username = System.getenv("VARILX_USER")
                    password = System.getenv("VARILX_TOKEN")
                }
            }
        }
        publications {
            register<MavenPublication>("gpr") {
                groupId = "$group"
                version = "$version"
                artifact(tasks.named<ShadowJar>("shadowJar").get())
                artifact(tasks.named<Jar>("sourcesJar").get())
            }
        }
    }

    tasks {
        shadowJar {
            archiveClassifier.set("")
            if (project.name != "common") {
                mustRunAfter(":common:shadowJar")
            }
        }
        withType<JavaCompile>().configureEach {
            options.encoding = "UTF-8"
            options.release.set(21)
        }
    }

    java {
        toolchain.languageVersion.set(JavaLanguageVersion.of(21))
    }

}
``` This is my root file
#

minecraft is this:

plugins {
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.13"
}

dependencies {
    paperweight.devBundle("de.varilx.vaxspigot","1.21.4-R0.1-SNAPSHOT")
    compileOnly(project(":common"))
    compileOnly("me.clip:placeholderapi:2.11.6")
    implementation("de.tr7zw:item-nbt-api:2.14.0")
    implementation("com.google.code.gson:gson:2.11.0")
    compileOnly("com.github.LeonMangler:SuperVanish:6.2.18-3")
}
muted gazelle
#

Hello! I am trying to add paperweigh plugin to my project, but getting such an error:

distant mango
#

update gradle

bronze willow
brave widgetBOT
quasi marsh
smoky violet
#

the log pointed to in the exception message is the one that's useful

smoky violet
#

there's only one

quasi marsh
#

well i copied the whole log output, i don't really understand what you want sorry

brave widgetBOT
smoky violet
#

I guess I need to add some more debug logging, since the log that's actually relevant is the decompiler one

#

you probably are just using the wrong java toolchain though

quasi marsh
#

build.gradle.kts :

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(17)
    }
}
smoky violet
#

generally just use jdk 21 and set options.release to 17 on compile tasks

#

but technically you can set paperweight.javaLauncher to J21 separately

quasi marsh
#

hmm ok i'm gonna try

#

well thanks a lot!
it seems to work 👌
but i didn't understood the part with "paperweight.javaLauncher"

quasi marsh
# smoky violet generally just use jdk 21 and set options.release to 17 on compile tasks

ok now i'm having this error ... 😭

EPM-Core:main: Could not resolve io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT.
Required by:
    root project : > io.papermc.paper:dev-bundle:1.21.4-R0.1-SNAPSHOT:20250115.112334-112

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
winter glacier
lament scarab
#

I mean, either you have an environment issue, or, you broke the java compiler somehow

static urchin
#

net.minecraft.network.protocol.Packet not found
sounds sus

lament scarab
#

run a build and provide the full error

quasi marsh
lament scarab
#

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:20250115.112334-112' is only compatible with JVM runtime version 21 or newer.

quasi marsh
#

but ??

java {
    toolchain {
        languageVersion = JavaLanguageVersion.of(21)
    }
}
lament scarab
#

I mean, did you set the target to 17?

quasi marsh
#

shit, got it... first line

java.sourceCompatibility = JavaVersion.VERSION_17

#

thanks 👌

winter glacier
static urchin
#

Yea hence it is sus xD

#

but the error itself also looks worrying

winter glacier
#

i went from maven to gradle and now this error is there

#

maybe I broke something like electroniccat said

main mica
#

Is that the entire error? it really should tell you where it couldn't find that class 👀

winter glacier
#

yes it is the complete error

lament scarab
#

I mean, it usually would tell you when the issue is detected at the right phase

#

the issue here is that it wasn't detected at the right phase

quasi marsh
#

and now it's in conflict with openaudiomc ...

lament scarab
#

eeeer

#

if it's conflicting with their thing then they screwed up

quasi marsh
#

😭

winter glacier
distant mango
#

update gradle

lament scarab
#

latest IJ?

distant mango
#

yes

lament scarab
#

using WSL or something?

distant mango
#

yes

lament scarab
#

tried restarting WSL?

distant mango
#

It's set to use the WSL jdk

#

uh that not

lament scarab
#

I'd bet it's some weird path issue

distant mango
#

nope restarting didn't help

#

manually setting gradle java home doesn't either

smoky violet
#

what works is using linux or macos instead of windows

main mica
#

Does it show up in env in WSL?

distant mango
distant mango
static urchin
#

linux is free stonks

distant mango
#

i'm not going to dual boot

#

and using remote gateway works but isn't the greatest experience

smoky violet
main mica
#

oh sdkman, never tried that in WSL

#

Only thing I can really think of is that you shared the Windows java_home with WSL and now gradle is confused. though you iirc need to explicitly do that

distant mango
main mica
#

Seems like the IJ backend runs WSL without .bashrc stuff for some reason, so no env variables from IJ. I guess sharing with via WSLENV should work
Or fixing that yourself by editing the backend launch script at ~/.cache/JetBrains/RemoteDev/dist/somethingsomething/bin/idea.sh and putting the environment variable there. Which seems kinda like a cursed hack lol

#

And running IJ directly in WSL instead should work too I guess

proud lava
#

Hi, I can't get kotlin coroutines to work properly through 2 or more velocity plugins if I use a lib that has suspend functions.
I build with gradle shadow and to get you an overview of a possible project structure, I left a demo repo link for you here: https://github.com/rlqu/velocity-coroutine-problem

Would be great if I could get that to work. Thank you

fossil topaz
#

or don't shade it on the plugin depending on the library

#

I think if you'll still relocate to the same package as you're relocating in the library, even though you don't shade it, it'll still work

proud lava
fossil topaz
proud lava
proud lava
#

No

#

I already tested that

fossil topaz
proud lava
#

i just tested that

fossil topaz
proud lava
fossil topaz
#

"doesn't work" gives less than 0 information

proud lava
#

its the same error

#

as in the readme

#

i changed compileOnly to implementation in the library project

#

in the build.gradle.kts

fossil topaz
#

I said that you also need to change implementation to compileOnly in plugin + either remove relocation in both, either add same relocation in both

proud lava
#

have done that

#

forgot to say that

loud hawk
#

Does paperweight 2.0 supports userdev for pre hardfork versions? or should i use older version of paperweight?

static urchin
#

pw 2.0 supports older bundle versions yea

strong merlin
#

how to create build.gradle.kts.patch is it automatic or how to create it?

floral jackal
steep wyvern
#

hello, i keep getting a build faliure error for some reason
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.712 s
[INFO] Finished at: 2025-01-20T00:08:07+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project Trader: Execution default-compile of goal org.apache.maven.plugins:maven-com
piler-plugin:3.8.1:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile: org/codehaus/plexus/compiler/manager/NoSuchCompilerException

static urchin
#

"no such compiler exception" usually just means you are trying to compile to a java version that you do not have an up-to-date enough compiler for on your machine

#

e.g. you might have installed a JRE

steep wyvern
#

ah thanks was using a wrong version

strong merlin
#

when I do my own fork of divinemc that is fork from purpur and purpur is fork of paper
when patching myfork-server build script I should just add my config fork like it the example and not touch the config fork before right?

bronze willow
pallid elbow
#

Updated to latest fork-v2 paperweight, but getting this now

#

the patch looks? right but idk why it's not applying?

lament scarab
#

if the patch rejected then you'd need to redo it

pallid elbow
#

what task redoes it?

lament scarab
#

you

#

this is basically a dumber version of a merge conflict

pallid elbow
#

oh the Great Manual Apply

#

it appears i should wholly delete that patch from that folder as it's a bad patch

#

and then applyAllPatches just tries to reapply it and brick stuff

lament scarab
#

you'd need to fix it manually and then rebuild that patch

smoky violet
#

if you run into conflicts with single-file patches, you can try the fuzzy variant of their apply task before doing everything manually

bitter linden
#

Any idea how to fix Dependabot updating paperweight to a snapshot version? I'd be fine with it but it cant find it when I try to build

- Plugin Repositories (could not resolve plugin artifact 'io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-SNAPSHOT')
  Searched in the following repositories:
    Gradle Central Plugin Repository
bronze ember
#

the snapshot only exists on the paper repo

#

but: just dont merge it? lol

bitter linden
#

I have it automerge haha, but adding maven("https://repo.papermc.io/repository/maven-public/") to my repositories doesn't fix it either

#

How does it know if its not possible to find

bronze ember
#

its in maven-snapshots

#

not maven-public

#

but like, you should fix that dependabot merges broken code

#

not switch to snapshot versions of paperweight

#

don't you use github actions to verify that your PRs actually build and pass tests?

distant mango
#

maven-public includes snapshots?

smoky violet
#

you don't need paper in your plugin repos at all unless you're using snapshots

#

releases are on the gradle plugin portal

bitter linden
#

It doesn't build with maven-snapshots url either.

also I haven't really ran into a problem with automerge besides this paperweight updating to snapshot issue, usually just like viaversion or fawe dependency updates. and I have a few local dependencies that aren't hosted anywhere so can't have github actions autobuild before merge

pallid elbow
#

still explodes on me and reverts

#

I guess I just don't understand why the patches from the latest update are actually broken

#

unless it's not just me

smoky violet
#

maybe try rebuilding the patch instead of deleting it

pallid elbow
#

maybe i shouldn't be doing applyAllPatches?

lament scarab
#

did you rebuild the patch after fixing it?

pallid elbow
#

i couldn't really get the patch rebuild to work

#

it kept bitching about some context issue

#

will try again here in a sec

lament scarab
#

Then you should work out what is going on there instead of applying back over the thing

#

there was a task specifically for rebuilding the single file ones iirc

smoky violet
#

generally you need to update the build script patches before moving on to the rest

#

yes, all the tasks have descriptions, like I said before ./gradlew tasks is required reading

pallid elbow
#

I must've just gotten in a bad state, I more or less reverted to before the latest v2-fork update, did a proper merge from upstream then it seems to have worked

pallid elbow
#

Is there an "easy" way to rename bits of the forktest in order to not have it be fork.test namespace? It seems to be a lot of renaming modules and whatnot, unless i'm missing an easier way to do it

#

aka old fork of mine used to be com.lokamc.slice

#

In the meantime, paperweightDevBundle("fork.test", "1.21.4-R0.1-SNAPSHOT") gives me: ```A problem occurred configuring root project 'LokaLib'.

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.```

#

My "do everything" script does this, dunno if this is out of date now: bash ./gradlew applyAllPatches ./gradlew publishDevBundlePublicationToMavenLocal -PpublishDevBundle ./gradlew :fork-api:publishToMavenLocal

lament scarab
#

updated userdev on that plugin?

strong merlin
#

I have my fork in this configuration myfork - divinemc - purpur - paper
I think I have everything correct in the build script when I do applyAllPatches and wait for it I end up with folders for divinemc and paper server/api without purpur anywhere to be seen
so is there something I'm missing or? I did follow the example repo all the way

pallid elbow
#

Ok updated userdev, updated to paperweight.paperDevBundle("fork.test", "1.21.4-R0.1-SNAPSHOT"), now what is this wild ass path: ```* What went wrong:
A problem occurred configuring root project 'LokaLib'.

Could not resolve all files for configuration ':paperweightDevelopmentBundle'.
Unable to resolve a dev bundle, which is required for paperweight to function.
Could not find 1.21.4-R0.1-SNAPSHOT:dev-bundle:fork.test.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/1/21/4-R0/1-SNAPSHOT/dev-bundle/fork.test/dev-bundle-fork.test.pom
- file:/C:/Users/Tom/.m2/repository/1/21/4-R0/1-SNAPSHOT/dev-bundle/fork.test/dev-bundle-fork.test.pom
- https://maven.enginehub.org/repo/1/21/4-R0/1-SNAPSHOT/dev-bundle/fork.test/dev-bundle-fork.test.pom
- https://repo.papermc.io/repository/maven-public/1/21/4-R0/1-SNAPSHOT/dev-bundle/fork.test/dev-bundle-fork.test.pom
Required by:
root project :```

#

oh

#

args are backwards

pallid elbow
#

This is new...? ```Execution failed for task ':compileJava'.

Could not resolve all files for configuration ':compileClasspath'.
Could not resolve com.google.guava:guava:{strictly 32.1.3-jre}.
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 'com.google.guava:guava' that satisfies the version constraints:
Dependency path 'com.lokamc:LokaLib:2.9' --> 'fork.test:dev-bundle:1.21.4-R0.1-SNAPSHOT' (serverCompileClasspath) --> 'fork.test:fork-api:1.21.4-R0.1-SNAPSHOT' (apiElements) --> 'com.google.guava:guava:33.3.1-jre'
Constraint path 'com.lokamc:LokaLib:2.9' --> 'com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT' (apiElements) --> 'com.sk89q.worldguard:worldguard-core:7.1.0-SNAPSHOT' (apiElements) --> 'com.google.guava:guava:{strictly 32.1.3-jre}' because of the following reason: Mojang provides Guava
Constraint path 'com.lokamc:LokaLib:2.9' --> 'com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT' (apiElements) --> 'com.google.guava:guava:{strictly 32.1.3-jre}' because of the following reason: Mojang provides Guava
Dependency path 'com.lokamc:LokaLib:2.9' --> 'fork.test:dev-bundle:1.21.4-R0.1-SNAPSHOT' (serverCompileClasspath) --> 'io.papermc:mache:1.21.4+build.7' (serverCompileClasspath) --> 'com.google.guava:guava:33.3.1-jre'```

#

1.21.4 ships with a newer guava i guess?

lament scarab
#

yes

pallid elbow
#

what do?

lament scarab
#

resolve it

pallid elbow
#

do i just need to add the older guava to my own build gradle?

lament scarab
#

I personally just ended up adding in a dependency substitution to replace bukkit with paper

#

oh, for that plugin I just excploded those deps from WG

pallid elbow
#

what does that even mean?

lament scarab
#

excluded

#

dizzy

pallid elbow
#

how does one do that?

lament scarab
#
    compileOnly(libs.worldguard) {
        exclude(group = "com.google.code.gson")
        exclude(group = "com.google.guava")
        exclude(group = "it.unimi.dsi")
    }
turbid moon
#

💣 boom

harsh ore
#

Heya, I am using resource-factory by jmp to generate my plugin.yml however for some reason it complains that the apiVersion and the main is not set:

paperPluginYaml {
    name = project.name
    version = project.version.toString()
    description = project.description
    apiVersion = "1.21"
    author = "Simeon"
    main = "lol.simeon.questify.Questify"
    bootstrapper = "lol.simeon.questify.boot.QuestifyPluginBootstrapper"
    loader = "lol.simeon.questify.boot.QuestifyPluginLoader"
}```

`In plugin 'xyz.jpenilla.resourcefactory.ResourceFactoryPlugin_Decorated' type 'xyz.jpenilla.resourcefactory.ExecuteResourceFactories' property 'factories.$0.value.apiVersion' doesn't have a configured value.`

`  - In plugin 'xyz.jpenilla.resourcefactory.ResourceFactoryPlugin_Decorated' type 'xyz.jpenilla.resourcefactory.ExecuteResourceFactories' property 'factories.$0.value.main' doesn't have a configured value.`

does anyone have an idea why?
lament scarab
#

update the plugin and gradle

harsh ore
#

the plugin is on 1.2.0 which is the latest version according to the github page and my gradle is on 8.10.2

#

I will upgrade to 8.12 and see what happens

lament scarab
#

I mean, that's not the latest version of gradle

#

I remember most issues with that plugin being down to stuff being outdated, but, MahiruShrug

harsh ore
#

I am on 8.12 now and I am getting the same issue

lament scarab
#

with that excert, no idea

harsh ore
#

is there a ritual to summon jmp? :c

lament scarab
#

I mean, he generally lingers around; I'd imagine his thing will be the same, can't really say with truncated info

harsh ore
lament scarab
#

Nowhere in the documentation of resource factory does it show it being a root level thing

harsh ore
lament scarab
#

which uses conventions

#

well, I have no idea how that stuff works

#

I'd suggest just reading the desc of the plugin and using that to set it up

harsh ore
#

I mean I basically am. I am applying the plugin (instead of specifying the id directly I use my catalog) and then use paperPluginYaml to configure it.
I don't see any difference tbh

#

maybe interesting note: I use the exact setup on a different project and its working flawlessly.
It uses identical versions:
Plugin - 1.2.0
Grade - 1.10.2
Version - 1.21.4

lament scarab
#

I mean, the thing is generally upset because the first factory doesn't have that stuff set on it, so, all I can assume is that the way you've got it setup isn't actually modifying the resource factory

harsh ore
#

Yea that would also be my guess, but it doesn't quite make sense since I have a project in which it works without issues.

#

I think there is something I am missing here

#

I found the issue and I have more questions then answers.

#

this was in my imports:
import xyz.jpenilla.resourcefactory.paper.paperPluginYaml
once I removed it, it worked?

lament scarab
#

that import probably meant it was doing something else

harsh ore
#

yea, but its fixed now, I removed it and it works

#

weird tho

pallid elbow
#

Anyone know what this is all about? There is nothing at all interesting about line 128: Patch failed at 0009 Add PlayerData Events error: corrupt patch at line 128 error: could not build fake ancestor

turbid moon
lament scarab
#

the patch line number ignores the preamble

#

so, 128 is basically the last line

#

something messed with the newline?

violet depot
distant mango
#

just ./gradlew publishToMavenLocal in the root?

violet depot
#

I did, but it's not showing in my .m2/repository

distant mango
#

.m2/repository/even-more-fish/even-more-fish-addons-j17/unspecified/exists for me

#

looks like they don't (properly at least) specify a version

violet depot
#

hmm, could you help me fix that by any chance?

distant mango
#

specify a version in the root project, or create a gradle.properties and specify it there

#

or edit the publishing config and change it there

violet depot
#

Hmm okay

#

Thanks, I think that'll help me get it to work haha

novel tendon
#

while trying to build plugin with paperweight im getting this issue:

i already updated everything to latest versions, and removed gradle caches, tho i cant replicate this bug on any other machine, cause it looks like its only on this one
JDK:Temurin 21.0.5

drowsy pagoda
violet depot
#

I already got it working, thanks though

lament scarab
#

Basically, 'jdk/jfr/Event' is a class provided in the JDK; it not working would generally suggest that you're using a build environment which is misconfigured; i.e. JAVA_HOME still set to something like openj9

novel tendon
pallid elbow
#

getting this: ```Execution failed for task ':rebuildPaperApiFilePatches'.

io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false switch -```
but i am on latest paperweight: id("io.papermc.paperweight.patcher") version "2.0.0-beta.14"

static urchin
#

run with -Dpaperweight.debug=true

pallid elbow
#

fatal: cannot switch branch in the middle of an am session but i can't figure out where said am session is...

static urchin
#

paper api patches would be the paper-api git repo?

pallid elbow
#

i don't understand the question..

static urchin
#

not a question more a "idk where the issue in locating the am session is"

pallid elbow
#

oh

#

it literally told me where

#

one line up 😦

static urchin
pallid elbow
#

How does interactive rebasing work now?

#
fatal: invalid upstream 'base'
#

oh you do it in paper-api i guess

#

even though the patches go in fork-api 😭

pallid elbow
#

When doing ./gradlew publishDevBundlePublicationToMavenLocal -PpublishDevBundle, I get a weird compile error: ```> Task :fork-server:compileJava
/home/cryptite/dev/Slice/paper-server/src/main/java/io/papermc/paper/util/Holderable.java:39: error: illegal start of expression
case JsonObjectWrapper(final JsonObject element) -> {
^
/home/cryptite/dev/Slice/paper-server/src/main/java/io/papermc/paper/util/Holderable.java:39: error: ';' expected
case JsonObjectWrapper(final JsonObject element) -> {
^
/home/cryptite/dev/Slice/fork-server/src/minecraft/java/net/minecraft/world/item/crafting/Ingredient.java:98: error: illegal start of expression
case io.papermc.paper.inventory.recipe.ItemOrExact.Item(final Holder<Item> item) ->
^
/home/cryptite/dev/Slice/fork-server/src/minecraft/java/net/minecraft/world/item/crafting/Ingredient.java:98: error: ';' expected
case io.papermc.paper.inventory.recipe.ItemOrExact.Item(final Holder<Item> item) ->
^
/home/cryptite/dev/Slice/fork-server/src/minecraft/java/net/minecraft/world/item/crafting/Ingredient.java:99: error: not a statement
!this.isExact() && this.values.contains(item);
^
/home/cryptite/dev/Slice/fork-server/src/minecraft/java/net/minecraft/world/item/crafting/Ingredient.java:100: error: illegal start of expression
case io.papermc.paper.inventory.recipe.ItemOrExact.Exact(final ItemStack exact) ->
^
/home/cryptite/dev/Slice/fork-server/src/minecraft/java/net/minecraft/world/item/crafting/Ingredient.java:100: error: ';' expected
case io.papermc.paper.inventory.recipe.ItemOrExact.Exact(final ItemStack exact) ->
^
/home/cryptite/dev/Slice/fork-server/src/minecraft/java/net/minecraft/world/item/crafting/Ingredient.java:101: error: not a statement
this.isExact() && this.itemStacks.contains(exact);
^
8 errors

Task :fork-server:compileJava FAILED

[Incubating] Problems report is available at: file:///home/cryptite/dev/Slice/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':fork-server:compileJava'.

Compilation failed; see the compiler output below.
/home/cryptite/dev/Slice/paper-server/src/main/java/io/papermc/paper/util/Holderable.java:39: error: illegal start of expression
case JsonObjectWrapper(final JsonObject element) -> {
^
8 errors

pallid elbow
lament scarab
#

that was a bug in earlier versions of 21

#

was fixed in like 21.0.3 or something

pallid elbow
#

weird

main mica
#

How do I update the build.gradle.kts.patch? I was assuming that would use the minecraft patching tasks (because its in the <fork>-server directory), but fixupMinecraftSourcePatches & rebuildMinecraftPatches isn't doing anything to that patch

static urchin
#

single file patches tasks

main mica
#

thanks, that worked

autumn widget
#

hey. when building a custom paper fork, i keep getting this error

Execution failed for task ':applyServerPatches'.
io.papermc.paperweight.PaperweightException: Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard upstream/master

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 10s
37 actionable tasks: 4 executed, 33 up-to-date

what's up with this?
Gradle
Gradle | Search for Help with Gradle Build Tool
Image
Command finished with 128 exit code: git -c commit.gpgsign=false -c core.safecrlf=false reset --hard upstream/master
This too

torn sonnet
autumn widget
#

after looking

#

now i'm getting this

#

Task '.debug=true' not found in root project 'paper' and its subprojects.

  • Try:

Run gradlew tasks to get a list of available tasks.
For more on name expansion, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:name_abbreviation in the Gradle documentation.
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 2s

#

no idea what to do

#

any ideas?

#

@torn sonnet

torn sonnet
#

That feels like you wrote debug=true at the end of your gradle command instead of doing one of the flags suggested.

distant mango
#

if your on windows you need to use quotes iirc

autumn widget
plucky fractal
#

I've run into an issue when trying to patch a library in a fork of paper
After creating the patch, importing library files fails as the file already exists:

Caused by: java.nio.file.FileAlreadyExistsException: /home/booky10/Programming/paperweight-examples/fork-server/.gradle/caches/paperweight/taskCache/runForkSetup/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
        at io.papermc.paperweight.util.FileKt.copyRecursivelyTo(file.kt:127)
        at io.papermc.paperweight.core.tasks.SetupForkMinecraftSources.run(SetupForkMinecraftSources.kt:84)
        [...]

I can reproduce this using the paperweight examples project (https://github.com/booky10/paperweight-examples)
is there something obvious im missing here or should I open a paperweight github issue?

autumn widget
#

i’m having issues trying to do it

smoky violet
#

long term I might solve it a different way but ignoring existing files should be safe

formal sage
#

can someone help me turning commands on?

distant mango
#

what?

plucky fractal
old furnace
#

in Paper plugin ,i ‘ll send Http request to remote server ,what is my steps to do this,can you help me , please

old furnace
rotund bramble
#

So i keep having issues with paperweight, i keep getting these errors:

A problem occurred configuring root project 'WerewolfGame'.
> Could not resolve all files for configuration ':paperweightDevelopmentBundle'.
    Unable to resolve a dev bundle, which is required for paperweight to function.
   > Could not find io.papermc.paper:dev-bundle:1.21.4-R0.1-SNAPSHOT.
#

im using paperweight 2.0.0-beta-14 and paper version 1.21.4-r0.1-SNAPSHOT

lament scarab
#

see the full log

cerulean cypress
#

Is there any documentation about how to migrate from patches to hardfork in paperweight-patcher?

bronze ember
#

No

#

My general recommendation is to just start clean and manually redo patches

smoky violet
#

I gave some advice in response there

#

with that approach you basically ignore file patches until the end

#

once you've applied everything you can squash what you want into the file patches commit

#

there isn't really a completely straightforward process, it's going to depend on your patches

cerulean cypress
#

I think I understand.

smoky violet
#

I would see how far you get with my approach and if you run into too many conflicts or other issues just reapply manually like mini said

oblique sun
smoky violet
#

do you have a question?

oblique sun
#

forgot to press send

#

lmao

#

I was gonna ask I'm trying to update to 1.21.4 paperweight and i'm having a bit of an issue.

#

the error makes 0 sense to me atleast

smoky violet
#

it definitely does

#

sources and javadoc clearly won't contain anything useful for a classpath

oblique sun
#

h u h

smoky violet
#

so the important part is ```
- 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.12' and the consumer needed a component, as well as attribute 'org.gradle.plugin.api-version' with value '8.10'

#

now, why would your project be requiring a variant compatible with gradle api 8.10?

oblique sun
#

gradle needs updated posssibly?

smoky violet
#

yes

#

you are using gradle 8.10, so your project requires libraries to be compatible with that version

#

but paperweight declares it needs at least 8.12

oblique sun
#

I honestly forgot how to update gradle lol

oblique sun
#

can i use 8.12.1?

smoky violet
#

yes

#

the constraint is that resolved variants need to have <= the api version of the current project

oblique sun
#

I'm trying to update but one of the apis i'm using is physical and now i'm having issues so waiting for devs to respond on some help with it

smoky violet
#

run with --stacktrace and paste the log

oblique sun
smoky violet
#
Caused by: java.lang.IllegalStateException: Check failed.
    at org.jetbrains.kotlin.incremental.classpathDiff.DirectoryOrJarReader$Companion.create(ClasspathSnapshotter.kt:234)
``` this kind of smells like an invalid jar file
oblique sun
#

oh maybe i am stupid

#

lmao

#

forgot ../libs/....

#

Thanks JMP for helping me realize i have more than 2 braincells i can use

smoky violet
#

lol, yw

oblique sun
winter arch
#

I try to use Paperweigth with Groovy DSL and get this Error

smoky violet
#

read the conversation immediately above your message

winter arch
#

soooo just upgrading Gradle was it 😑

#

i hate myself rn

viscid jasper
#

hey this in its own is not directly about paper but i slowly drive myself into madness with this problem,
I'm trying to use HikariCP and for that i'm trying to shade the plugin with this dependency but for f- sake it just isnt working for some reasone. i'm compiling the jar with mvn clean package. If this is the wrong place to ask this kind of questions, pls tell where else to ask.

https://pastes.dev/XYwg6Kb7Y3

java.lang.NoClassDefFoundError: com/zaxxer/hikari/HikariDataSource

Edit: Fixed it, for anyone else having this problem just move the shade plugin to the child pom, aka. outside of the pluginManager than it will work, my bad :P

final viper
#

@oblique sun Please don't be rude to others

oblique sun
shrewd viper
#

Has someone ever had the issue that gradle wont recognize methods that do exists? I always get "cannot find symbol" even tho my idea doesnt find any errors and the method does indeed exist, please help i cant find any solutions

random cedar
#

Hello everyone. Tell me where I can find the source code for Pepper version 1.20.1?

main mica
#

please don't crosspost

random cedar
#

sorry

viral bluff
#

Is there something special I need to do with paperweight to access Folia specific classpaths?

zenith flower
#

just using foliaDevBundle instead of paperDevBundle should be enough

wild meteor
#

Hello there 👋
I'm trying to deploy a custom devbundle for a fork, however, I'm encountering issues 😅 (I've truncated some parts of the log to make it more readable)

./gradlew publishDevBundlePublicationToMavenRepository

Some problems were found with the configuration of task ':generateDevelopmentBundle' (type 'GenerateDevBundle').
  - In plugin 'io.papermc.paperweight.patcher' type 'io.papermc.paperweight.tasks.GenerateDevBundle' property 'atFile' doesn't have a configured value.
...
property 'decompiledJar' doesn't have a configured value.
property 'decompilerUrl' doesn't have a configured value.
property 'minecraftVersion' doesn't have a configured value.
property 'mojangMappedPaperclipFile' doesn't have a configured value.

I looked at https://github.com/PaperMC/paperweight-examples/blob/main/build.gradle.kts but there is no property corresponding to the needed values, so I don't really know what to put in nor where to configure them 😅

lament scarab
#

You’re not using the full command that was showcased

wild meteor
lament scarab
#

well, noting that if you're on 1.21.4, you should be using the v2 branch

wild meteor
#

I'm still on 1.21.1, should I try to update to the beta branch?

lament scarab
#

No idea

#

I mean, if the publish is failing, something likely went wrong with your config

#

make sure that you've got patches applied and such

#

outside of that, I don't have enough info to say what's going on

wild meteor
#

So, I tried to update to 2.0 beta, it broke everything 😅
As I'm creating a fork of a fork, the first upstream is not updated to work with that 😦
Here's my full build.gradle.kts, and the full log

brave widgetBOT
brave widgetBOT
polar edge
#

Maybe someone has any Gradle task written up to be able to download paper server, build the plugin and all dependencies and start the server with all those plugins?

grand niche
coarse ginkgo
#

is paperclip any different from bundler jar other than downloading the mojang jar instead of having it packaged into the build? which one should I usually prefer for using my fork on my own server, i.e. no distribution?

bronze ember
#

If you don't need public distribution there's no need for paperclip

#

That's the only reason it exists

polar edge
#

This shows red

#

And can't resolve

turbid moon
polar edge
#

Noup, still can't find it

turbid moon
#

Try to temporarly comment out the runServer part

#

reload your gradle

#

and then uncomment them

distant mango
#

try building from terminal

polar edge
#

When commented out refresh works

#

These things are also here

#

Ohh, I get it

#

So now minecraftVersion works, but velocity doesn't

#

I want to create a velocity server and two additional servers

#

How can I do that?

#

On runServer

turbid moon
#

Obviously, you should put the velocity version to 3.4.0-SNAPSHOT, since that is the latest

polar edge
#

Got it

#

How to define other path than inside module?

#

Would be perfect to have it in root directory

turbid moon
#

That I don't know. But in the end, does it really matter too much?

polar edge
#

Yea, it would generate up to 80 servers

#

Why, when it can be only one

turbid moon
#

In that case, instead of adding it to each submodule, just add the task to your root?

#

Also why the hell do you have 80 submodules

polar edge
#

And then how to build only that one plugin with it's dependancies? I don't need all 80 plugins in one server

turbid moon
#

Again, just the fact that you have 80 servers/submodules feels really weird

polar edge
#

I have a network, 7 servers and a proxy, plugins can be in one of them or all of them, it's best to have each plugin in each module and then distribute them to each server as needed

turbid moon
#

Mhm I see

#

I am not sure run-task really works for you then, but obviously only jmp would know

main mica
#

I just symlinked the folders together

polar edge
#

Yea, it does some kind of magic and won't work for me

#

So will need to go back and try to download the jar myself

steep lava
#

Would apreciate some help in improving my Maven configurations.
From a first look does it seem like that relocations aren't done properly? Like the defined shadedPath is there with the content, but at the same time does the original path also exist in the jar, which is rather confusing....

My current pom.xml files are found in the following locations:

glass warren
#

A bunch of people here are going to recommend switching to gradle probably . . .

steep lava
glass warren
#

Since all of our tooling is geared towards gradle now.

steep lava
polar edge
#

I thought that too, until after a full day of annoying errors and other extreamly tiresome crap I made it work. Now - it's way way way better than maven

#

Wait, i'm wrong, it took me two days to make it work

steep lava
#

Well, for me gradle remains bad. But I'm not here to debate that. I was redirected to here from #paper-dev in the hope to get help, so if your only goal is to tell me to switch, then please don't bother as I deliberately chose maven over Gradle here.

glass warren
static urchin
#

Well seems like they resolved it themselves prayge

steep lava
#

Partially.

#

Still have net.kyori being included despite excluding it... So still needs tinkering.

static urchin
#

honestly surprised cloud-paper even ships that?

#

they aren't relying on the adventure platform in there are they?

#

I guess they might for that sweet version compat

distant mango
#

minecraft extras

steep lava
# glass warren I'm guessing you didn't mean this to be as hostile / confrontational as it is, s...

Yeah, it wasn't meant to be hostile (And judging the tone of my messages is not as easy given english is not my first language here).
Tho, I'm getting tired of wanting to find help, being redirected to a different channel, stating my problem and then just being told "use gradle lol".
I can understand everyone and their grandmother loves gradle here, but I don't for multiple reasons including it completely breaking itself, not being able to properly load a normal gradle file when not touched for a while.

steep lava
#

It ships a MinecraftHelp tool that uses adventure under the hood.

glass warren
# steep lava Yeah, it wasn't meant to be hostile (And judging the tone of my messages is not ...

I'm not sure how many times you got redirected to a different channel, so I can't speak to that. I only saw the once.

We set this up for folks to get help with out tooling, but just like in #paper-dev or even #paper-help if you're doing non-standard stuff with some sort of custom setup then most people aren't going to be able to offer much advice.

No one here was aggressively pushing you to use gradle and no one said "use gradle lol".

I get that you apparently don't like gradle and it's a sore spot for you, but we prefer if folks generally stick to being respectful.

You aren't always going to get the help you want or the answer you'd like. Which is a drag, but such is life.

Your maven setup looks kinda funky, so I personally don't have any suggestions. If anyone else did they'd chime in. You can wait a bit and try again tomorrow or something and see if anyone has any other thoughts.

static urchin
#

Or maybe some unsung hero chimes in that mystically has maven knowledge

glass warren
#

Yeah if you solve it, post it up in case it helps others down the line.

steep lava
#

Well, I've been asking in the codingden discord and got some advice.
Also, adding a <exclude>net/kyori/**</exclude> entry to the Filter does remove it from the final jar by the looks of it.
Only thing I now want to find out is what other stuff I can safely exclude without breaking everything.... Like would javax.annotation be safe to exclude?
Is there perhaps an example plugin with common exclusions?

static urchin
#

given you can just use the runtime lib downloading these days, I am unsure how many people still care to optimize that

steep lava
#

Yeah, haven't played around with f.e. loading bstats via library loading. Cloud is shaded in because on velocity itself does it cause loading issues if I try to load it with libby rather than shade it in

cerulean cypress
#

I'm a little dumb.

steep lava
static urchin
#

All good, don't need to defend yourself for using maven unless you ask "how to access paper internals with maven"

#

Just the note that, people here probably have less idea on maven things than they'd have on gradle 😅

#

But if we are good rubberducks, that is also good enough

steep lava
#

Yeah, I'm not too interested in accessing internals... Trying to stick with proper API as much as I can, which right now is thankfully 100%

#

(Tho, I do have some cheap Class.forName stuff to support older builds of Paper and some other minor things)

glass warren
#

You just might not get as much help if you’re using maven or a non-standard setup

torn sonnet
#

@steep lava Using excludes in the shade plugin is typically a sign something's screwed up elsewhere. What if you exclude adventure in the dependency declarations bringing it in?

steep lava
#

Could try that. Tho, I wonder if I could define * as artifact else I would need to exclude like 5 individual libraries :P

#

Yeah, exclusion in the minecraft-extras works

torn sonnet
wise silo
#

Hi, I have a problem with Paperweight with versions lower than 1.20, the project is with Java 21.

This is the error: https://pastebin.com/21m1DixV

plugins {
id("blockify.common-conventions")
id("io.papermc.paperweight.userdev")
}

tasks {
assemble {
dependsOn(reobfJar)
}
}

dependencies {
pluginRemapper("net.fabricmc:tiny-remapper:0.11.0:fat")
paperweight.paperDevBundle("1.19.3-R0.1-SNAPSHOT")

compileOnly(project(":${rootProject.name}-adapt"))
}

lament scarab
#

Generally, make sure that you're using the correct version of java for that module

#

i.e. 1.19.x probably used java 17

smoky violet
#

start by updating paperweight to the latest 2.0.0 beta

wise silo
# smoky violet start by updating paperweight to the latest 2.0.0 beta

I already changed the respective version, but now I get this error:


  • What went wrong:
    Execution failed for task ':blockify-adapt-v1_17_1:compileJava'.

Could not resolve all files for configuration ':blockify-adapt-v1_17_1:compileClasspath'.
Could not resolve io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT.
Required by:
project :blockify-adapt-v1_17_1
Module 'io.papermc.paper:paper-api' has been rejected:
Cannot select module with conflict on capability 'io.papermc.paper:paper-mojangapi:1.21.4-R0.1-SNAPSHOT' also provided by [io.papermc.paper:paper-mojangapi:1.17.1-R0.1-SNAPSHOT(apiElements)]
Could not resolve io.papermc.paper:paper-mojangapi:1.17.1-R0.1-SNAPSHOT.
Required by:
project :blockify-adapt-v1_17_1
Module 'io.papermc.paper:paper-mojangapi' has been rejected:
Cannot select module with conflict on capability 'io.papermc.paper:paper-mojangapi:1.17.1-R0.1-SNAPSHOT' also provided by [io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT(apiElements)]
There is 1 more failure with an identical cause.

  • 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.

lament scarab
#

you have 1.21 leaking into the 1.17 module

#

don't do that

finite crow
#
dependencies {
    paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
    compileOnly(projects.hyperverseNmsCommon)
}

Currently have this and using paperweight 2.0.0-beta-14, gradle 8.12.1, java 21 but getting

Expected configuration ':hyperverse-nms-1-21-4:paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.
Any ideas how to fix

cerulean cypress
lament scarab
#

exact same way as you deal with conflicts normally?

#

you can tell git to generate reject files with --reject in order to get hunks that it failed to figure out into .rej files

cerulean cypress
#

I'll try this
Updated: Thank you, i really forgot that reject flag exists

finite crow
#

2.0.0-beta-14 is the latest release

turbid moon
plucky fractal
wet yarrow
#

Im trying to add nms to an existing paper project, but after 2 hours of agony I have nothing.... I tried changing java from 21 to 17, other versions of gradle but nothing works, the last result I achieved looks like this:

plugins {
    id 'java'
    id("io.papermc.paperweight.userdev") version "2.0.0-beta.14"
}

...

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

dependencies {
    paperweight.paperDevBundle("1.21.1-R0.1-SNAPSHOT")
    ...
}

def targetJavaVersion = 21
java {
    def javaVersion = JavaVersion.toVersion(targetJavaVersion)
    sourceCompatibility = javaVersion
    targetCompatibility = javaVersion
    if (JavaVersion.current() < javaVersion) {
        toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8'

    if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
        options.release.set(targetJavaVersion)
    }
}

processResources {
    def props = [version: version]
    inputs.properties props
    filteringCharset 'UTF-8'
    filesMatching('plugin.yml') {
        expand props
    }
}

// Local development
def serverPluginsDir = file('...')

tasks.register('localServerBuild', Copy) {
    from jar
    into serverPluginsDir
    rename { "plugin.jar" }
}

build.dependsOn localServerBuild

Ive worked with nms on spigot before and it worked for me, but for some reason I'm having trouble with paper. Here is the gradle log that comes out with build.gradle above.

brave widgetBOT
wet yarrow
finite crow
#

yea i spent 30 mins figuring that out earlier today haha

#

np

bronze ember
#

Gradle likes to hide the actual error in a giant haystack

#

It tells you why it's unhappy, not what you need to change, it's a bit meh

#

But just like women, over time you develop some form of understanding

turbid moon
#

The woman metaphor is actually really good

finite crow
#

lmao

foggy heart
#

How to properly make changes to myfork-(api/server)'s build.gradle.kts?
paper-api and paper-server have fixup tasks for file patches, is there something similar for the build files in myfork- projects?

static urchin
#

you dont commit these changes you just rebuild the single file patches

foggy heart
#

Yea, but e.g. fixupPaperApiFilePatches does not pickup changes to myfork-api/build.gradle.kts

#

It seems to only affect files in paper-api

#

(to clarify, I'm using a fork of a fork if that makes any difference, fixupPurpurApiFilePatches also seems to affect only purpur-api)

brisk belfry
lament scarab
#

I mean

#

if the tasks are only affecting their respective levels

#

one would guess that you're using the wrong levels

finite crow
#

its the typesafe project accessor for "hyperverse-nms-common"

#

all my NMS modules have a dep on it from 1.21.3, 1.21.1 etc, and those modules were/are fine

#

but its the 1.21.4 module which seems to be more troublesome

foggy heart
lament scarab
#

There will be a task for your fork

#

./gradlew tasks

foggy heart
#

Yea, can't find it
There are fixups for Paper and Pupur, but not for Myfork

lament scarab
#

fixupForkApiFilePatches - Puts the currently tracked source changes into the forkApi file patches commit

#

is there in the v2 fork of a fork example repo

#

the name is going to be derived from your build config iirc

foggy heart
#

Maybe missed something during inital setup, I see fixups for Paper, Purpur and Minecraft, but not for my fork
Will recheck again

static urchin
#

the gradle files are not part of the API per-file patches

#

they are a separate "set" of patches

lament scarab
#

oh, yea, that's a single file patch, note the exclusion

foggy heart
static urchin
#

Yes (dumb naming aside)

foggy heart
static urchin
#

there should be a task to re-generate the single file patches

#

read thought gradlew tasks

lament scarab
#

as said, single file patches

foggy heart
#

There is rebuild for single patches indeed, it worked
Thanks!

wise sky
lament scarab
#

make sure that your version of java is updated

#

oh, no, check your dependencies

#

you've likely got something pulling in an outdated version of annotations or something

wise sky
#

I'm assuming these are all pretty recent

wise sky
#

Why would the compiler even be complaining about the use of a double NotNull annotation when there's clearly only one?

smoky violet
#

bukkit.inventory. @org.jetbrains.annotations.NotNull() @org.jetbrains.annotations.NotNull() ItemStack...

wise sky
#

Yea, but when I open up the Player class to look at that piece of code I just see one annotation

#

default @NotNull PlayerGiveResult give(@NotNull ItemStack... items)

smoky violet
#

this is a new api I guess

#
    /**
     * Gives the player the items following full vanilla logic,
     * making the player drop the items that did not fit into
     * the inventory.
     *
     * @param items the items to give.
     * @return the result of this method, holding leftovers and spawned items.
     */
    default @NotNull PlayerGiveResult give(@NotNull final ItemStack @NotNull ... items) {
        return this.give(List.of(items));
    }
``` there are two annotations, the problem I think is that jb doesn't support annotating arrays properly
#

since it's type-use and parameter

#

so you end up with two on the param

#

@static urchin time to migrate that class to jspecify?

#

it's an api class too so the combined classes and sources jar for the server isn't the culprit - not sure exactly why it's using the api src for plugin javac

#

but we should probably fix the annotations regardless

wise sky
#

Ah I see, so there's not really a way for me to fix it myself?

smoky violet
#

I don't think so, but I'd be interested the args it's passing to javac to cause this

#

running with --info should print those I think

#

also if you're not using that API specifically, you could depend on a specific snapshot of the dev bundle/api from before it was added

static urchin
smoky violet
#

and changing the nullable import

static urchin
#

Well, transitioning nullable

#

yea

#

that should be about it

smoky violet
#

all the return type and param annotations have to be moved too

#

to be proper type use

#

fun

#

@static urchin am I supposed to migrate CraftPlayer too

#

I should probably do the whole hierarchy, right?

static urchin
#

Yea, doubt we wanna mix annotations there

smoky violet
#

and this is correct right

#
    public void setPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent @Nullable [] header, net.md_5.bungee.api.chat.BaseComponent @Nullable [] footer);
#

ie the array is nullable, not the elements

#

?

#

bungee chat api pepegaroll

static urchin
#

yea

smoky violet
#
    /**
     * Show the given title to the player, along with the last subtitle set, using the last set times
     *
     * @param title Title to set
     * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} or {@link #sendTitlePart(net.kyori.adventure.title.TitlePart, Object)}
     */
    @Deprecated
    public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent[] title);

    /**
     * Show the given title to the player, along with the last subtitle set, using the last set times
     *
     * @param title Title to set
     * @deprecated Use {@link #showTitle(net.kyori.adventure.title.Title)} or {@link #sendTitlePart(net.kyori.adventure.title.TitlePart, Object)}
     */
    @Deprecated
    public void showTitle(@Nullable net.md_5.bungee.api.chat.BaseComponent title);
#

I guess top one is nullable array and bottom one just nullable component? or is top nullable array and elements

#

ok the array is expected to be not null

#

the nullability on this bungee stuff is so all over the place

#

@static urchin the whole hierarchy would include Entity... should I just do Player, HumanEntity, OfflinePlayer, and the impls?

static urchin
#

@granite valve ping probably

smoky violet
#

are we planning to get rid of the qualified import spam in api

granite valve
#

Yeah. I’ll start just as soon as the checkstyle stuff is in.

smoky violet
#

I see the error in our src, but still not sure why it's not a compile error for us and is for plugins

#

but this will fix it...

granite valve
#

How is it breaking plugin compilation? The server compiles

smoky violet
#

not sure, but see the convo before I pinged lynx

granite valve
#

Are they using some non-Javac compiler?

smoky violet
#

in this channel

#

nope

smoky violet
granite valve
#

I feel like we do this pattern elsewhere already.

smoky violet
#

I can try to reproduce it locally I guess, not sure if there's anything extra I need to do

granite valve
#

Like double jb annotation on arrays/parametrized types

#

So maybe work up a regex to find those too?

smoky violet
#

I'll do that after I try and reproduce this issue

#

ok yeah I can't reproduce it, even with using the offending method

#

something must be weird with their setup

wise sky
smoky violet
#

what if you put options.isFork = true on compileJava

smoky violet
#

@NotNull [a-zA-Z]+ @NotNull \[\]

#

I guess it should account for combinations of nullable too

#

46 with @(NotNull|Nullable) [a-zA-Z]+ @(NotNull|Nullable) \[\]

#

only double-nullable and double-notnull would trigger this type of error though

#

but the others are still wrong because the param has nullable and notnull

wise sky
smoky violet
#

is your project public

#

if I can reproduce it locally that'd be the best way for me to figure it out

wise sky
#

Unfortunately not, sorry I'm not being super helpful... But just a random question, could this have anything to do with the fact that one of the repos of my dependencies hosts paper builds? I'm just trying to narrow things down since you were not able to reproduce it on your side

smoky violet
#

well, you can check that with a build scan

#

you go to dependencies and see where it's resolved from

#

to try and trigger it I just did --refresh-dependencies to pull latest and added ```java
public static void a(final Player player) {
player.getName();
player.give(ItemStack.of(Material.ACACIA_BOAT));
}

#

which didn't work, it compiled fine

wise sky
#

Yea, for some reason it's getting Paper from the EngineHub repo

smoky violet
#

try putting paper at the top of your repos list

wise sky
#

Thank you for trying to help, but I'm feeling a bit defeated right now. I've been trying to resolve this for almost 8 hours buffering

hardy tendon
#

Anyone have an idea why paperweight (beta.14) isn't pulling the latest API snapshot when cleaning caches/syncing a project? The mapped sources are AFAIK getting updated but the API artifact is very stale

lament scarab
#

did you use the gradle flag?

hardy tendon
lament scarab
#

other thing is generally going to be to make sure that you're not pulling the API from some stale repo

hardy tendon
#

Cached resource https://repo.papermc.io/repository/maven-public/io/papermc/paper/paper-api/1.21.4-R0.1-SNAPSHOT/paper-api-1.21.4-R0.1-20250129.015259-131.pom is up-to-date (lastModified: Wed Jan 29 03:53:05 EET 2025). I'm starting to feel like this is one of those "Invalidate caches and restart" button issues

hardy tendon
#

had to delete the whole paper-api directory from Gradle caches, idk why it thought the API artifact was up to date when it definitely wasn't

quaint marlin
#

Trying to get my plugin to work after switching to Gradle. I'm getting this error: Expected configuration ':paperweightDevelopmentBundle' to contain exactly one file, however, it contains more than one file.

turbid moon
quaint marlin
lament scarab
#

make sure that you're using the latest beta of paperweight

#

otherwise, there is no real actional info here

quaint marlin
turbid moon
quaint marlin
eternal pawn
#

I'm new to making plugins (paper, etc.)
I cloned a repo for CommandHook but I'm running into missing dependency issues:

import com.mojang.brigadier.StringReader;
import net.minecraft.commands.CommandSourceStack;
> Cannot resolve symbol 'mojang'
> Cannot resolve symbol 'minecraft'

From searching similar errors I've seen most people use paperweight or gradle and Maven isn't really supported, but I can't find any maven support community.. What can I do or where can I go to help resolve my errors?

#

Did the CommandHook developer not put the correct dependencies in the pom.xml files? (idk if java would still compile if dependencies aren't explicitly mentioned)
I'm using IDEA with the Minecraft Development plugin (latest version)

static urchin
#

can you share your pom.xml

echo kilnBOT
static urchin
#

They presumably just require you to install spigots mojang mapped artefact

devout ledge
eternal pawn
smoky violet
#

technically you can set paperweight.javaLauncher to 21 and continue using 17 for everything else, but why

eternal pawn
smoky violet
#

switching this to gradle would be easier than dealing with spigot tooling

eternal pawn
#

i'm only trying to make a pull request to fix a small issue, i don't want to rework the entire project immediately D:

smoky violet
#

imo they should at least provide a script to setup the project if they expect external contributors

#

while using subpar tooling

#

you can ask in spigot discord for help with making the spigot artifact available in your maven local

eternal pawn
#

Note: Plugin is not in active development, only bugfixes and ports to newer MC runtimes are done.
¯_(ツ)_/¯

smoky violet
#

paper already exposes brigadier to the API, that may be why

#

oh I didn't read what it is, I assumed it's a command framework

#

what are you trying to use it for

eternal pawn
#

It spams the (paper) server console (according to the admin of a server i staff on) and i get the feeling that wasn't the case in 1.21.0 (before we updated)

smoky violet
#

sure, I'm just curious about your use case of the plugin itself

#

since plugins can create commands with selectors using paper api directly

smoky violet
#

we don't use their tooling and so can't be of much help with it

eternal pawn
#

idk it's probably a dependency for another plugin

#

it's what lets us use things like the points or disguise commands in command blocks
- admin

smoky violet
#

that should work out of the box with paper iirc

#

that being executing plugin commands from command blocks

turbid moon
#

bukkit commands don't have that property afiak

smoky violet
#

they should work with command blocks

turbid moon
#

Really? Back when I tried to use bukkit commands with cmd blocks, it didn't work

smoky violet
#

legacy commands won't be able to access the extra context in the CommandSourceStack

#

but they should run

echo sapphire
#

A problem occurred configuring project ':souppvp'.

class io.papermc.paperweight.userdev.internal.setup.UserdevSetup$Inject cannot be cast to class io.papermc.paperweight.userdev.internal.setup.UserdevSetup (io.papermc.paperweight.userdev.internal.setup.UserdevSetup$Inject is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @7e48e35e; io.papermc.paperweight.userdev.internal.setup.UserdevSetup is in unnamed module of loader org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader @7bdfe801)

#

please help

#

@cosmic sigil

shrewd crestBOT
#

(679aa2736ed5010734cf1b1e) // @echo sapphire (@cruzapi / 253224110660780033) has been warned by @rapid fractal (177150983258767360)
Reason: do not randomly ping people for help. Wait patiently

echo sapphire
lament scarab
#

add paperweight to the parent with apply false

plucky stirrup
#

i am getting a lot of errors after adding some modules into my gradle project

brave widgetBOT
plucky stirrup
#

my submodules seem to build just fine the plugin one does not.

lament scarab
#

Generally, it tells you the issue

#

you'd need to look into providing a resolution strategy or excluding those transitives

echo sapphire
#

thank you

crude kernel
#

what task do I need to run to rebuild a fork's API buildscript? rebuildPaperApiPatches and rebuildPaperApiFilePatches didn't do so