Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 days 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 (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-28T13:09:42.000Z (10 months ago)
- Last Synced: 2024-12-01T19:24:51.557Z (2 months 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
[![build](https://github.com/olillin/RainbowQuartz/actions/workflows/build.yml/badge.svg)](https://github.com/olillin/RainbowQuartz/actions/workflows/build.yml)
[![coverage](https://img.shields.io/codecov/c/github/olillin/RainbowQuartz?token=LKVYMULDYF)](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**
![Click on Item Editor in main menu](doc/main-menu-item-editor.png)3. Click the **New item** button in the top left
![ ](doc/item-editor-create-new-item.png)4. Set your item id
![Click on Set item id](doc/new-item-set-item-id.png)
![Enter your item id and click Submit](doc/item-id-submit.png)5. Set your material by placing an item with the material from your inventory in the first slot.
![Click on Set material](doc/new-item-set-material.png)
![Place your material in the first slot and click Submit](doc/material-submit.png)6. Click the `Submit` button
![Click on Submit](doc/new-item-submit.png)7. Modify any additional properties
8. Click the `Back` button to save the item
9. You've created your first item! 🎉