https://github.com/olillin/rainbowquartz
Easy to use Paper plugin for creating custom items
https://github.com/olillin/rainbowquartz
minecraft-plugin papermc
Last synced: 2 months ago
JSON representation
Easy to use Paper plugin for creating custom items
- Host: GitHub
- URL: https://github.com/olillin/rainbowquartz
- Owner: olillin
- Created: 2023-07-05T14:19:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T13:09:42.000Z (over 2 years ago)
- Last Synced: 2025-01-29T15:33:58.327Z (over 1 year ago)
- Topics: minecraft-plugin, papermc
- Language: Kotlin
- Homepage:
- Size: 503 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#
RainbowQuartz
[](https://github.com/olillin/RainbowQuartz/actions/workflows/build.yml)
[](https://app.codecov.io/gh/olillin/RainbowQuartz)
**RainbowQuartz** is an easy to use plugin for creating custom items.
## Features
- Creating custom items
- Editing basic properties of those items (name, lore, item type)
- Creating and editing recipes for those items
- Registering event handlers for custom items with API
### Planned features
- Live updates of pre-existing items on modification
- Registering event handlers in GUI
- Custom enchantments
- API support for registering custom recipe types
## Creating items
RainbowQuartz enables two ways of creating items: by [using the API in another plugin](#creating-items-with-the-api) or [with the in-game GUI](#creating-items-with-the-in-game-gui).
### Creating items with the API
Kotlin example
#### MyPlugin.kt
```kotlin
val builder = ItemBuilder(NamespacedKey(this, "emerald_pickaxe"))
.setName(Component.text("Emerald pickaxe")
.color(NamedTextColor.GREEN))
.addLore("Lorem ipsum")
.addRecipe(
ShapedRecipe("RRR", " S ", " S ")
.setIngredient('R', Material.EMERALD)
.setIngredient('S', Material.STICK))
RainbowQuartz.itemManager.registerDefault(builder.build())
```
Java example
#### MyPlugin.java
```java
ItemBuilder builder = new ItemBuilder(new NamespacedKey(this, "emerald_pickaxe"), Material.DIAMOND_PICKAXE, new ArrayList<>())
.setName(Component.text("Emerald pickaxe")
.color(NamedTextColor.GREEN))
.addLore("Lorem ipsum")
.addRecipe(
new ShapedRecipe("RRR", " S ", " S ")
.setIngredient('R', new Ingredient(Material.EMERALD, null))
.setIngredient('S', new Ingredient(Material.STICK, null)));
RainbowQuartz.Companion.getItemManager().registerDefault(builder.build());
```
For more examples using the API have a look at the [RainbowQuartzExample](https://github.com/olillin/RainbowQuartzExample) plugin.
### Creating items with the in-game GUI
The GUI is the selling feature of RainbowQuartz, allowing for the creation and modfication of custom items all without restarting the server.
1. Open the GUI with the `/rainbowquartz` command
2. Open the **Item Editor**

3. Click the **New item** button in the top left

4. Set your item id


5. Set your material by placing an item with the material from your inventory in the first slot.


6. Click the `Submit` button

7. Modify any additional properties
8. Click the `Back` button to save the item
9. You've created your first item! 🎉