Ajneb97 / PlayerKits

https://www.spigotmc.org/resources/playerkits-fully-configurable-kits-1-8-1-17.75185/
MIT License
8 stars 13 forks source link

source code #2

Open Olzie-12 opened 2 years ago

Olzie-12 commented 2 years ago

just gonna put this out here if anyone else is having issues with the source code. Don't worry you're not the only one.

Make sure you include the players.yml and the kits.yml into the jar folder. The developer for some reason didn't use maven properly either, they didn't specify the resources folder and didn't have the main/java properly either and also forgot to put the dependencies in the pom

Here is the working pom file:

<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>
    <groupId>PlayerKits</groupId>
    <artifactId>PlayerKits</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.16.1-R0.1-SNAPSHOT</version>
            <systemPath>${basedir}/../lib/spigot.jar</systemPath>
            <scope>system</scope>
        </dependency>
        <dependency>
            <groupId>com.github.MilkBowl</groupId>
            <artifactId>VaultAPI</artifactId>
            <version>1.7</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>me.clip</groupId>
            <artifactId>placeholderapi</artifactId>
            <version>2.10.9</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>4.0.3</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
        <repository>
            <id>placeholderapi</id>
            <url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
        </repository>
    </repositories>
    <build>
        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <configuration>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <relocations>
                                <relocation>
                                    <pattern>com.zaxxer</pattern>
                                    <shadedPattern>pk.hikari</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.slf4j</pattern>
                                    <shadedPattern>pk.slf4j</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

and make sure you have the project structure like this: https://img.olziedev.com/q838355835H835GTmBz.png

thejbone commented 2 years ago

Oh my goodness. Thank you.