Configuration

Configuration

Formatting

Message formatting is defined in the file plugins/SupaChat/config.yml The message formats can contain characters, color codes, and variables. To use colors use the standard Minecraft color codes found here: http://www.minecraftwiki.net/wiki/Classic_Server_Protocol#Color_Codes

Available variables:
+prefix - The prefix for this user, or this users group if they don't have one defined.
+suffix - The suffix for this user, or this users group if they don't have one defined.
+name - The users name
+displayname - The users display name (Set by plugins such as Towny)
+iname - The SupaChat formatted player name (Defined by iname-format)
+group - The users group
+healthbar - A visual health bar for this user
+health - The users current health value (Between 0 and 20)
+message - The message the player typed
+world - What world the player is currently in
+time - Timestamp, configurable in config.yml. Uses the format for SimpleDateFormat - http://bit.ly/dscw40
{factions_relcolor} -The relation color between the sender and the recipient.
+factions_roleprefix - The sender’s role prefix. Would be “-”, “+”, “*” or “”. Nothing is printed if the player has no faction.
+factions_name - The name of the sender’s faction. Nothing is printed if the player has no faction.
+factions_title - The sender’s faction title.
+factions_role - The sender’s role. Would be “Recruit”, “Member”, “Officer” or “Leader”.

Example (Default):

handle-me: true
date-format: HH:mm:ss
message-format: '+iname: +message'
me-format: '* +name +message'
iname-format: '{+w}[+prefix+group+suffix&f] +name'
me-permissions: false
variable-refresh: 100

Example date-format (Default): date-format: 'HH:mm:ss'

As of SupaChat 2.4.0 there have been a few changes in the way variables and groups are handled.

Groups

As of SupaChat 2.4.3 native groups are supported in PermissionsBukkit, bPermissions, and PermissionsEx. As of SupaChat 2.6.2 native groups are supported in Privileges

Variables

Variables are now defined in variables.yml in the SupaChat directory. This includes prefixes, suffixes, and custom variables. You can define an unlimited number of custom variables for groups and users, if these variables contain the static variables such as +prefix, +suffix, +health, etc then those variables will be replaced with their respective values. If a variable does not exist then it will be replaced with a blank string.

As of SupaChat 2.4.4 you can now specify world-specific variables. To specify a per-world group or user variable (Prefix, suffix, or variable) you just specify it under the world as shown in the 'world' example in the default variables.yml below. Anything specified in the parent 'users' or 'groups' nodes will be considered global for all worlds. As of SupaChat 2.5.0 there are now world-wide variables, these are loaded first, and overwritten by group/user specific variables. To specify a world-wide variable just specify it under the world as shown in the 'world' example below.

Default variables.yml:

# SupaChat Variable Config
# This is now the only method for defining variables
users:
  javoris767:
    prefix: '&e'
groups:
  Admin:
    prefix: '&c'
    suffix: ''
  Default:
    prefix: ''
    suffix: ''
world:
  users:
    javoris767:
      prefix: '&a'
  wName: '[World] '

Default config.yml

handle-me: true
date-format: HH:mm:ss
message-format: '+iname: +message'
me-format: '* +name +message'
iname-format: '+{wName}[+prefix+group+suffix&f] +displayname'
me-permissions: false
variable-refresh: 100

Examples

To make a group colored: variables.yml:

groups:
    Default:
        prefix: '&4'
        suffix: ''

config.yml:

message-format: '[+prefix+group&f] +name: +message'

To make a single username colored: variables.yml:

users:
    javoris767:
        prefix: ''
        suffix: '&1'

config.yml

message-format: '[+prefix+group&f] +suffix+name&f: +message'

As you can see, suffixes and prefixes can be used anywhere, in any combination. In this example we use prefix as a method for coloring group names, while suffix is used to color individual users. On our server we have prefixes such as "&f[&2Mod&f] " so that we can have custom tags per group instead of just the groups name. There is no end to the combination of things you can do, please TRY things before you come asking for someone else to do it for you. There are too many combinations of things for me to answer every question about how to color specific things. I will not be offering answers to questions such as "How do I color names?" or really anything else to do with specifics of formatting. It's pretty straightforward what you can do, and if you can't take the time to experiment then I'm not going to take the time to answer your questions.

Configuration

iname-format - The format used for +iname (Default: '[+prefix+group+suffix&f] +displayname')
message-format - The format used for basic chat (Default: '+iname: +message')
date-format - The format used for +date (Default: 'HH:mm:ss')
me-format - The format used for /me commands (Default: '* +name +message')
handle-me - Whether to handle /me commands (Default: true)
time-offset - If defined, will offset the time by that many hours from GMT. This is not an offset from your current timezone.
              For example, having the value as -1 will set the timestamps to use GMT-1. Not having this line will set the timestamps
              to be your servers current timezone. (Default: Not set)

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes