Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net.kyori.adveture class conflicts #974

Open
verschuls opened this issue Aug 29, 2024 · 1 comment
Open

net.kyori.adveture class conflicts #974

verschuls opened this issue Aug 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@verschuls
Copy link

Describe the bug
com.github.retrooper:packetevents-bungeecord:2.5.0 includes net.kyori.adveture which is already provided by waterfall and creates conflicts with it.

Software brand
Waterfall 1.21-R0.1-SNAPSHOT

Plugins
Packetevents, Bungeeguard, Luckperms

How To Reproduce
Steps to reproduce the behavior:
Example:
In code create a packet that uses Component from the kyori adveture lib and try to send it, after that in console will appear erroros and player red message with error. Also there is a possbility that the error will be shown to the player when it kicks it and disable server.

Additional context
Also here is how i implement library.

<dependency>
            <groupId>com.github.retrooper</groupId>
            <artifactId>packetevents-bungeecord</artifactId>
            <version>2.5.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/libs/packetevents-bungeecord-2.5.0-SNAPSHOT.jar</systemPath>
</dependency>

Issue fix
In pom.xml just add this to the build and everyhting works fine:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.5.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <excludes>
                                    <exclude>net.kyori</exclude>
                                </excludes>
                            </artifactSet>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
@verschuls verschuls added the bug Something isn't working label Aug 29, 2024
@booky10
Copy link
Collaborator

booky10 commented Aug 30, 2024

If you are shading, make sure to to relocate like shown in the wiki or exclude it (like you did).
If you're not shading, packetevents provides the same jar for both bungee and waterfall, which means it has to include adventure for bungee to work.

I'm not sure if packetevents can do something to fix issues here, other than relocating adventure, which would break compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants