Skip to content

How to relocate?

Berke Akçen edited this page Dec 13, 2025 · 3 revisions

Important

The Wiki has been moved! You can now find it here: https://docs.despical.dev/command-framework/

This particulare page can be found here: https://docs.despical.dev/command-framework/relocate-the-framework/

Table of contents

How to relocate Command Framework?

You should need to relocate CommandFramework to avoid conflicts with other plugin JARs. Here is how you can do it using Maven or Gradle:

Maven

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-shade-plugin</artifactId>
   <version>3.4.1</version>
   <executions>
      <execution>
         <phase>package</phase>
         <goals>
            <goal>shade</goal>
         </goals>
         <configuration>
            <relocations>
               <relocation>
                  <pattern>dev.despical.commandframework</pattern>
                  <shadedPattern>your.package.here</shadedPattern>
               </relocation>
            </relocations>
         </configuration>
      </execution>
   </executions>
</plugin>

Gradle

plugins {
    id 'com.github.johnrengelman.shadow' version '8.1.1'
}

shadowJar {
    relocate 'dev.despical.commandframework', 'your.package.here'
}

Alternative Way

Add -Dcommandframework.suppress.relocation=true to your command line. This should only be used for testing purposes and not for production.

Clone this wiki locally