ChatEditor is a plugin that gives you a text editor withing the minecraft chat. Copy, cut, paste, open files and save them. Lint JSON and HOCON and more. Just install the plugin and type
/editor to get started. To se the position in the editor, click and shift click on the text.
ChatEditor requires requires KatLib 1.1.0.
/editorOpens a new editor
/editor file <path> <createIfNotFound>Opens a new editor with the content of a file on the server
The majority of ChitChat is accessed through the editor. The editor itself is made up of many smaller behaviors that dictate what will happen when you use editor commands (more on that in a second) and when you enter text.
The Text behavior
A text behavior is something that affects what happens when you enter your text. Does your text have different lines, or is it all on one line? That’s what the text behavior decides. There currently exist two text behaviors.
The cursor behavior: The cursor behavior is very much like how you enter text in minecraft normally. You have one line where all the text is inserted. You can click on the around the text to set your position, and shift click to select text.
The line behavior: Unlike the cursor behavior, the line behavior allows you to have text on multiple lines. When in line behavior, the editor only cares about each line, not what’s on it. If you start writing something on a line where you already have some text, the new text will override the old text. You can hit space to get the content of your current line. As with the cursor behavior, you can select lines with clicking and shift clicking. New lines can be inserted by having
\n in the message.
The end behavior
The end behavior is what decides what happens when you exit the editor. Here are some of the end behaviors currently implemented.
Chat: Just sends your text to the chat. This allows you to send messages longer than the chat limit.
Command: Sends the text as a command. This allows you to use commands with text longer than the chat limit.
Command block: Sends the text to a command block that you have specified. This can be though of as a safe way to allow non ops to edit command blocks as a permission check is made first before setting the command to make sure the player is allowed to use that command. This mode can also be started by shift clicking a command block.
NOOP/Cancel: Simply does nothing
Save: If you have a file open, this will save the file for you
When in an editor you normal commands won’t work. To do more interesting stuff than just adding or selecting text with your editor you can use editor commands. All editor commands begins with
!. Editor commands have partial support for tab complete.
!addLineAdds a new line if the text behavior is line
!endEnds the editor
!helpGets help about an editor command
!setEndAllows you to set a new end behavior
!setTextAllows you to set a new text behavior
!viewSimply views the text
!copyCopies the selected text to the clipboard
!cutCuts the selected text to the clipboard
!pastePastes the selected text from the clipboard
!lintHoconVerifies that the text in the editor is valid HOCON
!lintJsonVerifies that the text in the editor is valid JSON
!prettifyHoconTries to prettify the text in the editor as HOCON
!prettifyJsonTries to prettify the text in the editor as JSON
!reloadReloads the currently open file
!saveSaves the currently open file
- Less bugs
- Support for mojangson
- More editor commands
- More end behaviors
!chatEditor command to allow you to chat to the outside world while in an editor
!commandEditor command to allow you to use a command while in an editor