Sign Edit
Edit signs with custom formatted text
Sign Edit
This data pack allows you to add custom formatted text to signs.
This datapack uses the formatting from https://www.birdflop.com/resources/rgb/, specifically the `&#rrggbb` format, along with style indicators (bold, italic, underline, etc.)
Functions
`/function #editsign:edit {line:<1-4>,msg:"<text>"}`
Adds the given text format string to the given line of the sign you are looking at
`/function #editsign:lock`
Waxes the sign you are looking at
`/function #editsign:unlock`
Unwaxes the sign you are looking at
---
(the following functions require %%MD0%% to work)
`/function #editsign:copy {line:<1-4>}`
Copy the formatted text from the given line on the sign you are looking at
`/function #editsign:paste {line:<1-4>}`
Paste the most recently copied text onto the given line of the sign you are looking at
Custom Commands
if you are using the mod Melius Commands, here is a config file to create a `/sign` command
``` { "id": "sign", "literals": [ { "id": "edit", "literals": [ { "id": "1", "arguments": [ { "id": "text", "type": "brigadier:string quotable_phrase", "executes": [ { "command": "function editsign:edit/main {line:1,msg:${text}}", "as_console": false, "op_level": 4 } ] } ] }, { "id": "2", "arguments": [ { "id": "text", "type": "brigadier:string quotable_phrase", "executes": [ { "command": "function editsign:edit/main {line:2,msg:${text}}", "as_console": false, "op_level": 4 } ] } ] }, { "id": "3", "arguments": [ { "id": "text", "type": "brigadier:string quotable_phrase", "executes": [ { "command": "function editsign:edit/main {line:3,msg:${text}}", "as_console": false, "op_level": 4 } ] } ] }, { "id": "4", "arguments": [ { "id": "text", "type": "brigadier:string quotable_phrase", "executes": [ { "command": "function editsign:edit/main {line:4,msg:${text}}", "as_console": false, "op_level": 4 } ] } ] } ] }, { "id": "copy", "literals": [ { "id": "1", "executes": [ { "command": "function editsign:copy/main {line:1}", "as_console": false, "op_level": 4 } ] }, { "id": "2", "executes": [ { "command": "function editsign:copy/main {line:2}", "as_console": false, "op_level": 4 } ] }, { "id": "3", "executes": [ { "command": "function editsign:copy/main {line:3}", "as_console": false, "op_level": 4 } ] }, { "id": "4", "executes": [ { "command": "function editsign:copy/main {line:4}", "as_console": false, "op_level": 4 } ] } ] }, { "id": "paste", "literals": [ { "id": "1", "executes": [ { "command": "function editsign:paste/main {line:1}", "as_console": false, "op_level": 4 } ] }, { "id": "2", "executes": [ { "command": "function editsign:paste/main {line:2}", "as_console": false, "op_level": 4 } ] }, { "id": "3", "executes": [ { "command": "function editsign:paste/main {line:3}", "as_console": false, "op_level": 4 } ] }, { "id": "4", "executes": [ { "command": "function editsign:paste/main {line:4}", "as_console": false, "op_level": 4 } ] } ] }, { "id": "lock", "executes": [ { "command": "function editsign:lock/main", "as_console": false, "op_level": 4 } ] }, { "id": "unlock", "executes": [ { "command": "function editsign:unlock/main", "as_console": false, "op_level": 4 } ] }, { "id": "help", "executes": [ { "command": "function editsign:help/main", "as_console": false, "op_level": 4 } ] } ] } ```