CraftVentory
  • Welcome
  • get started
    • Inventory configuration
      • Item actions
    • Initialize the library
    • Declare an inventory
    • Open a inventory
  • Advanced concepts
    • Placeholders
    • Pagination
    • Data storage
    • Enhancements
    • Hooks
    • Custom item actions
    • Context
    • I18n
Powered by GitBook
On this page
  • What is CraftVentory?
  • Features
  • Setup
  • Useful links
  • Example
Export as PDF

Welcome

Welcome to the CraftVentory wiki.

NextInventory configuration

Last updated 6 months ago

What is CraftVentory?

CraftVentory is a Java / Spigot library that facilitates the development of Minecraft inventories. It enables developers to define fully configurable inventories in configuration files and provide them with Java code in their plugins.

This library was developed to facilitate the development of in-game inventories. Indeed, making them fully configurable is an important feature for server administrators but this process is very tedious without an appropriate tool. CraftVentory solves this problem by providing a lot of built-in features to help developers implement fully customizable inventories very easily.

Features

CraftVentory comes with the following features:

  • Fully customizable inventories / items / paginations from configuration files (YAML support).

  • Fully customizable actions when clicking on items like sending messages / sounds, executing commands, inventory navigation, etc.

  • Paginations to paginate a large list of results in an inventory.

  • Placeholders to display custom values in texts (inventory title, item name / lore, etc.).

  • Inventory history to enable players to easily navigate between inventories (home, backward, forward).

  • I18n support.

  • Enhancements to dynamically modify inventory properties with Java code.

  • Hooks to execute custom Java code for an inventory when specific events happen.

Setup

To use CraftVentory, you can directly include the JAR file as a dependency of your plugin. This JAR file can be downloaded on the of the GitHub repository of the project.

The library can also be included in your project by using a dependency manager like Maven or Gradle.

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.Syr0ws</groupId>
    <artifactId>CraftVentory</artifactId>
    <version>{VERSION}</version>
    <scope>compile</scope>
</dependency>
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

dependencies {
    implementation 'com.github.Syr0ws:CraftVentory:{VERSION}'
}

Useful links

Example

Configuration :

id: "warp-inventory"

type: "CHEST_9x6"

title: "&6Warps"

pattern:
  - "OOOOOOOOO"
  - "OYYWWWYYO"
  - "OY1W2W3YO"
  - "OYW4W5WYO"
  - "OYYWWWYYO"
  - "OOOOOOOOC"

content:
  orange-stained-glass:
    item:
      type: ORANGE_STAINED_GLASS_PANE
      name: " "
    symbol: "O"
  yellow-stained-glass:
    item:
      type: YELLOW_STAINED_GLASS_PANE
      name: " "
    symbol: "Y"
  white-stained-glass:
    item:
      type: WHITE_STAINED_GLASS_PANE
      name: " "
    symbol: "W"
  warp-world:
    item:
      type: GRASS_BLOCK
      name: "&aOverworld"
      lore:
        - ""
        - "&fClick to be teleported to the overworld."
    symbol: "1"
    actions:
      close:
        type: "CLOSE"
      player-command:
        type: "PLAYER_COMMAND"
        command: "warp overworld"
  warp-nether:
    item:
      type: NETHERRACK
      name: "&cNether"
      lore:
        - ""
        - "&fClick to be teleported to the nether."
    symbol: "2"
    actions:
      close:
        type: "CLOSE"
      player-command:
        type: "PLAYER_COMMAND"
        command: "warp nether"
  warp-end:
    item:
      type: END_STONE
      name: "&5End"
      lore:
        - ""
        - "&fClick to be teleported to the End."
    symbol: "3"
    actions:
      close:
        type: "CLOSE"
      player-command:
        type: "PLAYER_COMMAND"
        command: "warp end"
  warp-mining:
    item:
      type: "IRON_ORE"
      name: "&7Mining"
      lore:
        - ""
        - "&fClick to be teleported to the mining world."
    symbol: "4"
    actions:
      close:
        type: "CLOSE"
      player-command:
        type: "PLAYER_COMMAND"
        command: "warp mining"
  warp-enchant:
    item:
      type: ENCHANTING_TABLE
      name: "&5Enchantment"
      lore:
        - ""
        - "&fClick to be teleported to the enchantment room."
    symbol: "5"
    actions:
      close:
        type: "CLOSE"
      player-command:
        type: "PLAYER_COMMAND"
        command: "warp enchant"
  close:
    item:
      type: BARRIER
      name: "&cClose"
    symbol: "C"
    actions:
      close:
        type: "CLOSE"

After being added as a dependency, you must initialize the library by following this .

Releases page
tutorial
GitHub
Spigot
Discord