Skip to content

Message Shortener

Bernard edited this page May 26, 2017 · 3 revisions

Message Shortener

Message Shortener is believed a useful tool for players to chat quickly by typing the key of the real message. When submitted, the key is replaced with the corresponding message if granted. This page teaches you how to create shorten messages, and how to use them.

We are looking forward to create a message shortener which each player can have their own shorten message if granted, so it will make each player typing more convenient according to their typing habit.

Create A Shorten Message

Command

This section teaches you how to create a shorten message with commands in game. Make sure you have the permission chatassets.messageshortener.add, or it won't work.

  1. Issue /chatassets ms list to view what shorten messages saved, to confirm that the key you are about to register doesn't exists.
  2. Think of what message you want to be shorten and what key should it replace.
  3. Issue /chatassets ms add KEY. If the plugin reserves a key for your registration successfully, it will tell you to simply type the message.
  4. Type the message. It won't be received by other players and it will be saved as the shorten message. There you go!

Configuration

This section teaches you how to create a shorten message within the configuration file.

  1. Type the data. The format should be followed:
    message-shortener:
    messages:
    '1':
    key: "KEY"
    message: "MESSAGE"
    '2':
    key: "keysshouldnothavespace"
    message: "message can have spaces"
  • Key: the string replaced with message. Having spaces can cause an error.
  • Message: the shorten message. Spaces are allowed.
  1. Save config and reload the plugin with /chatassets reload. There you go!

Remove a Shorten Message

Command

This section teaches you how to remove a shorten message with commands in game. Make sure you have the permission chatassets.messageshortener.remove, or it won't work.

  1. Issue /chatassets ms list to view what shorten messages saved, to confirm that the key you are about to unregister exists.
  2. Issue /chatassets ms remove KEY. If the plugin finds the key, it will remove the key along with the shorten message. There you go!

Use a Shorten Message

Using a shorten message is easy. For example, you have a key shortkeyand a message longmessage. Then when you type shortkey is shorten and submit the message, the message sent is longmessage is shorten. The output of the message can be modified by other functions in this plugin, like AntiCurse.

Clone this wiki locally