Open UsainSrht opened 1 month ago
AnvilGUI version: 1.9.4-SNAPSHOT Heres the shade config
Please see #327, this has been discussed before. You need to ensure that Paper remaps your plugin. Unfortunately there is no way to "tell" Paper to only re-map certain classes (i.e. Anvil-GUI classes). Are you using Paperweight?
I am not using paperweight or any nms related things in those plugins.
Check your server log file that your plugin gets remapped by paper.
Deleted the .paper-remapped
folder and started the server again, both of my plugins didn't get remapped (SCClaims & SCCore)
What are the contents of the MANIFEST.MF file in your plugin's .jar file?
Manifest-Version: 1.0
Created-By: Maven Jar Plugin 3.2.0
Build-Jdk-Spec: 21
Where is SSCore located? Is it a normal spigot plugin inside the plugins folder? There must be a reason why it doesn't get remapped by Paper.
yes both sccore and scclaims are in plugins folder, they have paper plugin.ymls also i just saw that mentioned in the other issue
Apparently you can't shade the class files of AnvilGUI into a Paper Plugin, it assumes the NMS code to be mojang-mapped, so it doesn't do any remapping, I just asked on their Discord.
You can use my gradle version of AnvilGUI tho that has mojang mappings in it: https://github.com/mastercake10/AnvilGUI/tree/no_relocation
uhh how exactly? system scope?
by building the jar and shading it into your plugin
edit: you can also use the .jar on my repo: https://repo.spaceio.xyz/#browse/browse:maven-public:net%2Fwesjd%2Fanvilgui%2F1.9.5-SNAPSHOT%2F1.9.5-20240510.204921-4%2Fanvilgui-1.9.5-20240510.204921-4.jar
I mean, how is this possible?
try this in your pom.xml:
<!-- AnvilGUI -->
<dependency>
<groupId>net.wesjd</groupId>
<artifactId>anvilgui</artifactId>
<version>1.9.5-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
Worked thanks. Are you guys going to publish a separate jar for mojang mappings?
The jar you're using right now (my no-relocation branch) has both mappings in it, so it works on both paper and spigot. I don't know if there is any advantage in distributing two jar files. With both mappings in it, one could target paper and spigot at the same time.
I didn't know that these paper plugins were a thing, so I think I will create a PR soon for my fork.
Lets leave this issue open until its officially resolved.
@UsainSrht As far as I've understood, you should be able to use the official AnvilGUI version in a Paper plugin as long as you set the paperweight-mappings-namespace
to spigot
in your MANIFEST.MF
file. Have you tried that?
Taken from this information in the dev-announcements
channel in the PaperMC Discord server:
Default Mappings Assumption
- By default, all Spigot/Bukkit plugins will be assumed to be Spigot-mapped if they do not specify their mappings namespace in the manifest. Conversely, all Paper plugins will be assumed to be Mojang-mapped if they do not specify their mappings namespace in the manifest.
- Spigot-mapped plugins will need to be deobfuscated on first load, Mojang-mapped plugins will not.
Manual Manifest Configuration
- For more complex setups, you can manually set the
paperweight-mappings-namespace
attribute in the manifest. Acceptable values aremojang
,mojang+yarn
(treated the same asmojang
), orspigot
.
The official AnvilGUI version is only compatible with Spigot-mapped plugins, which is why you will need to configure your manifest manually if you are creating a Paper plugin.
It's probably worth adding this information to the AnvilGUI README, if this solves your issue.
@UsainSrht did the above solve your issue? if so we should add to README
Helped in my case, thank you! Maybe also a helpful Link for anybody, who is running into the same issue: https://docs.papermc.io/paper/dev/project-setup#spigot-mappings
Just upgraded server version and anvilgui and now I can't use it.
Version
This server is running Paper version 1.20.6-112-master@347bbe3 (2024-05-26T22:17:48Z) (Implementing API version 1.20.6-R0.1-SNAPSHOT) You are running the latest version Previous version: 1.20.6-90-b149584 (MC: 1.20.6)
Error
Code