kangarko / Foundation

Foundation™ helps you create highly customized Minecraft plugins (based on Spigot/Paper API) that support multiple MC versions.
https://mineacademy.org
305 stars 63 forks source link

1.20.1: How to use WorldEdit and other plugins in Foundation? #293

Closed xromen closed 3 months ago

xromen commented 3 months ago

I want to use WorldEdit api with Foundation. I downloaded the plugin template from https://github.com/kangarko/PluginTemplate and edited pom.xml My pom.xml - https://pastebin.com/vvLfY91u My code in main class - https://pastebin.com/NQycDEaf Error from console - https://pastebin.com/QnKp41wc I'm new to plugin programming, please tell me what I'm doing wrong?

kangarko commented 3 months ago

Remove

org.mineacademy.plugin:WorldEdit*
                        <include>org.mineacademy.plugin:Vault*</include>

From your pom.xml

Because otherwise you are including a full copy of worldedit in your plugin .jar and it will break

xromen commented 3 months ago

I removed these lines and another error appeared https://pastebin.com/sRJ2vEwr.

kangarko commented 3 months ago

You also need to delete

 <relocation>
                            <pattern>com.sk89q</pattern>
                            <shadedPattern>${project.groupId}.${project.artifactId}.lib</shadedPattern>
                        </relocation>

Basically rollback your changes in the shade plugin and use the shade from plugintemplate