Skip to content

Commit 1977d34

Browse files
committed
minimessage formatting support
1 parent 88a3701 commit 1977d34

7 files changed

Lines changed: 129 additions & 67 deletions

File tree

CONFIG.md

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# Configuration Overview:
22

3+
## MiniMessage Format
4+
5+
All color and text formatting in this configuration uses **MiniMessage format**. This is a modern, flexible text formatting system that replaces legacy color codes.
6+
7+
### Common Colors
8+
9+
Named colors are the simplest way to add color:
10+
- `<red>` - Red text
11+
- `<green>` - Green text
12+
- `<blue>` - Blue text
13+
- `<yellow>` - Yellow text
14+
- `<aqua>` - Aqua/Cyan text
15+
- `<gray>` - Gray text
16+
- `<white>` - White text
17+
- `<black>` - Black text
18+
- `<dark_red>` - Dark red
19+
- `<dark_green>` - Dark green
20+
- `<dark_blue>` - Dark blue
21+
- `<dark_gray>` - Dark gray
22+
- `<dark_aqua>` - Dark aqua
23+
- `<gold>` - Gold/Orange
24+
25+
### RGB Colors
26+
27+
For precise color control, use RGB hex colors:
28+
- `<color:#FF0000>` - Red (RGB format: #RRGGBB)
29+
- `<color:#00FF00>` - Green
30+
- `<color:#0000FF>` - Blue
31+
- `<color:#FF6B35>` - Custom orange
32+
- `<color:#A0E7E5>` - Custom teal
33+
34+
### Text Formatting
35+
36+
Combine colors with formatting:
37+
- `<b>` - Bold text
38+
- `<i>` - Italic text
39+
- `<u>` - Underlined text
40+
- `<st>` - Strikethrough text
41+
- `<obf>` - Obfuscated text
42+
- `<reset>` - Reset formatting
43+
44+
### Examples
45+
46+
```
47+
<red>Error:</red> <gray>Something went wrong</gray>
48+
<green><b>Success!</b></green> Your kit has been saved.
49+
<color:#FF6B35><b>Important:</b></color> This is a custom orange color.
50+
<aqua>Type <u>/kit</u> to get started!</aqua>
51+
```
52+
53+
For a complete reference of all available options, see the [MiniMessage documentation](https://docs.papermc.io/adventure/minimessage/).
54+
55+
---
56+
357
### **Database Credentials**
458

559
Select either storage type. SQLite is recommended for small servers, while MySQL is recommended for larger servers or multi-server setups.
@@ -63,7 +117,7 @@ scheduled-broadcast:
63117
64118
### **Kit Room**
65119
66-
Defines kits and their visual representation in the UI. This section uses the old text formating using & color codes.
120+
Defines kits and their visual representation in the UI. Kit names are displayed in their default color.
67121
68122
```yaml
69123
kitroom:
@@ -89,20 +143,20 @@ kitroom:
89143
90144
### **Disabled Command Worlds**
91145
92-
Lists worlds where kit commands are disabled. Players in these worlds will see a custom error message if they attempt to use the commands. This section uses the old text formating using & color codes.
146+
Lists worlds where kit commands are disabled. Players in these worlds will see a custom error message if they attempt to use the commands. This section uses mini message format for styling.
93147
94148
```yaml
95149
disabled-command-worlds:
96150
- "example_world" # Add worlds where kit commands should be restricted.
97151

98-
disabled-command-message: "&cKits are disabled here!" # Message displayed to players in disabled worlds.
152+
disabled-command-message: "<red>Kits are disabled here!</red>" # Message displayed to players in disabled worlds (MiniMessage format).
99153
```
100154
101155
---
102156
103157
### **Public Kits**
104158
105-
Allows customization of publicly available kits. By default, this section is commented out and needs to be configured based on requirements. This section uses the old text formating using & color codes.
159+
Allows customization of publicly available kits. By default, this section is commented out and needs to be configured based on requirements. Kit names are displayed in their default color.
106160
107161
```yaml
108162
publickits:

src/main/java/dev/noah/perplayerkit/KitRoomDataManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public KitRoomDataManager(Plugin plugin) {
4242

4343

4444
ItemStack[] defaultPage = new ItemStack[45];
45-
defaultPage[0] = ItemUtil.createItem(Material.BLUE_STAINED_GLASS_PANE, "&bDefault Kit Room Item");
45+
defaultPage[0] = ItemUtil.createItem(Material.BLUE_STAINED_GLASS_PANE, "<aqua>Default Kit Room Item</aqua>");
4646
kitroomData.add(defaultPage);
4747
kitroomData.add(defaultPage);
4848
kitroomData.add(defaultPage);

src/main/java/dev/noah/perplayerkit/commands/RegearCommand.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
public class RegearCommand implements CommandExecutor, Listener {
2828

29-
public static final ItemStack REGEAR_SHULKER_ITEM = ItemUtil.createItem(Material.WHITE_SHULKER_BOX, 1, StyleManager.get().getPrimaryColor() + "Regear Shulker", "&7● Restocks Your Kit", "&7● Use " + StyleManager.get().getPrimaryColor() + "/rg &7to get another regear shulker");
30-
public static final ItemStack REGEAR_SHELL_ITEM = ItemUtil.createItem(Material.SHULKER_SHELL, 1, StyleManager.get().getPrimaryColor() + "Regear Shell", "&7● Restocks Your Kit", "&7● Click to use!");
29+
public static final ItemStack REGEAR_SHULKER_ITEM = ItemUtil.createItem(Material.WHITE_SHULKER_BOX, 1, StyleManager.get().getPrimaryColor() + "Regear Shulker", "<gray>● Restocks Your Kit</gray>", "<gray>● Use </gray>" + StyleManager.get().getPrimaryColor() + "<gray>/rg to get another regear shulker</gray>");
30+
public static final ItemStack REGEAR_SHELL_ITEM = ItemUtil.createItem(Material.SHULKER_SHELL, 1, StyleManager.get().getPrimaryColor() + "Regear Shell", "<gray>● Restocks Your Kit</gray>", "<gray>● Click to use!</gray>");
3131

3232
private final Plugin plugin;
3333
private final CooldownManager commandCooldownManager;

0 commit comments

Comments
 (0)