Maven Setup - TehBrian/RestrictionHelper GitHub Wiki

1. add the library to your project

RestrictionHelper is published on https://repo.thbn.me.

Replace [latest version] with the library's latest release.

<repository>
  <id>thbn</id>
  <url>https://repo.thbn.me/releases/</url>
</repository>

<dependency>
  <groupId>dev.tehbrian.restrictionhelper</groupId>
  <artifactId>restrictionhelper-spigot</artifactId>
  <version>[latest version]</version>
</dependency>

2. shade and relocate the dependency

Replace [your plugin package] with your plugin's package.

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-shade-plugin</artifactId>
      <version>3.2.4</version>
      <configuration>
        <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml
        </dependencyReducedPomLocation>
        <relocations>
          <relocation>
            <pattern>dev.tehbrian.restrictionhelper</pattern>
            <shadedPattern>[your plugin package].libs.restrictionhelper</shadedPattern>
          </relocation>
        </relocations>
      </configuration>
      <executions>
        <execution>
          <phase>package</phase>
          <goals>
            <goal>shade</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>
⚠️ **GitHub.com Fallback** ⚠️