|
1 | | -# Scriptive |
| 1 | + |
| 2 | + |
| 3 | +<p align="center">Java Implementation for Minecraft Java Edition Chat Component Format.</p> |
| 4 | + |
| 5 | +<p align="center"> |
| 6 | + <img src="https://img.shields.io/github/license/machinemc/scriptive?style=for-the-badge&color=107185" alt="LICENSE"> |
| 7 | + <img src="https://img.shields.io/github/v/release/machinemc/scriptive?style=for-the-badge&color=edb228" alt="RELEASE"> |
| 8 | +</p> |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +Since version 1.7.2, Minecraft has two separate text formatting systems. |
| 13 | +The newer text component system is used in many specific |
| 14 | +contexts expecting formatted text, including chat messages, |
| 15 | +written books, death messages, window titles, and the like. |
| 16 | + |
| 17 | +Scriptive is a library for easy creation and serialization |
| 18 | +of such text components with support for the latest Minecraft |
| 19 | +versions. |
| 20 | + |
| 21 | +### Features |
| 22 | + |
| 23 | +- *Comprehensive support for all formating options* |
| 24 | +- Lightweight and intuitive |
| 25 | +- Supports new NBT serialization introduced in *1.20.3* version of Minecraft |
| 26 | +- Supports JSON serialization |
| 27 | +- Provides [custom format](scriptive-formatify) of components suitable for *user-input* |
| 28 | +- Supports terminal format |
| 29 | + |
| 30 | +### Modules |
| 31 | + |
| 32 | +- [`scriptive-core`](scriptive-core) - Core of the Scriptive library |
| 33 | +- [`scriptive-gson`](scriptive-gson) - JSON serialization of text components using GSON library |
| 34 | +- [`scriptive-nbt`](scriptive-nbt) - NBT serialization of text components using Machine's [NBT](https://github.com/MachineMC/NBT) library |
| 35 | +- [`scriptive-formatify`](scriptive-formatify) - Custom human-readable format for components |
| 36 | + |
| 37 | +### Importing |
| 38 | + |
| 39 | +#### Gradle |
| 40 | + |
| 41 | +```kotlin |
| 42 | +repositories { |
| 43 | + maven { |
| 44 | + name = "machinemcRepositoryReleases" |
| 45 | + url = uri("https://repo.machinemc.org/releases") |
| 46 | + } |
| 47 | +} |
| 48 | + |
| 49 | +dependencies { |
| 50 | + implementation("org.machinemc:scriptive-core:VERSION") |
| 51 | +} |
| 52 | +``` |
| 53 | + |
| 54 | +#### Maven |
| 55 | + |
| 56 | +```xml |
| 57 | +<repositories> |
| 58 | + <repository> |
| 59 | + <id>machinemc-repository-releases</id> |
| 60 | + <name>MachineMC Repository</name> |
| 61 | + <url>https://repo.machinemc.org/releases</url> |
| 62 | + </repository> |
| 63 | +</repositories> |
| 64 | + |
| 65 | +<dependencies> |
| 66 | + <dependency> |
| 67 | + <groupId>org.machinemc</groupId> |
| 68 | + <artifactId>scriptive-core</artifactId> |
| 69 | + <version>VERSION</version> |
| 70 | + </dependency> |
| 71 | +</dependencies> |
| 72 | +``` |
| 73 | + |
| 74 | +Other modules can be added as another dependency. |
| 75 | + |
| 76 | +### License |
| 77 | +Scriptive is free software licensed under the [MIT license](LICENCE). |
0 commit comments