Skip to content
Huynh Tien edited this page May 8, 2025 · 2 revisions

Add Dependency

You can check this site for the lines to add the uni-item-all dependency for your built too

Relocate

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.6.0</version>
    <configuration>
        <relocations>
            <relocation>
                <pattern>io.github.projectunified.uniitem</pattern>
                <shadedPattern>YOUR_PACKAGE.uniitem</shadedPattern>
            </relocation>
        </relocations>
    </configuration>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Basic Usage

AllItemProvider provider = new AllItemProvider();

ItemStack item = provider.item(new ItemKey("ia", "my_item")); // Get item from key, can be null
ItemKey key = provider.key(item); // Get key from item, can be null

More methods can be found here

Clone this wiki locally