Skip to content

Instantly share code, notes, and snippets.

@SupaHam
Last active August 29, 2015 14:01
Show Gist options
  • Save SupaHam/8dbd73a2b1a685779117 to your computer and use it in GitHub Desktop.
Save SupaHam/8dbd73a2b1a685779117 to your computer and use it in GitHub Desktop.
A POC of an implementation of SupaChatAPI's chat fix support (coming soon).
# prefixes will be ordered by lowest prefix-priority
# suffixes will be ordered by lowest prefix-priority
auto-whitespace: true # This will remove the need for '%W%' while keeping one whitespace between each chatfix.
players:
supaham:
prefix-priority: -10000 # prefixes will be ordered by lowest prefix-priority
suffix-priority: 10000 # suffixes will be ordered by lowest prefix-priority
prefix: '[Coolkid]'
suffix: '[YEP]'
groups:
admin:
prefix: '[Admin]'
suffix: 'wub the bass'
donor:
prefix: '[D]'
suffix: '[D]'
king:
priority: 1
world: world_uuid world_uuid2 # Or alternatively a String list.
prefix: '[King]'
worlds:
king_world:
groups:
king:
priority: 1 # Prefix and suffix priority
prefix: '[King]'
players:
supaham:
prefix-priority: -9999 # prefixes will be ordered by lowest prefix-priority
suffix-priority: 9999 # suffixes will be ordered by lowest prefix-priority
prefix: '[Coolking]'
suffix: ''
# chat-fixes.yml
# Any arguments that begin with $ are bukkit replaceables stuff.
# TODO figure out a way to append whitespace if there isn't one already
# So far I've come up with %W% (Too confusing?)
chat-format: '{prefix}{player.name}{suffix}%W%: ${message}'
prefix: '{groups.prefix}%W%{player.prefix}'
suffix: '{groups.suffix}'
# This defines per player prefixes
players:
# The Tilde (~) clears the general fix (prefix & suffix sections above)
uuid1:
prefix: '~${world} {group.admin.prefix}'
name: '<color id="3" onHover="show_text(''${uuid}'')">${name}</color>'
suffix: '~{group.admin.suffix}'
uuid2:
prefix: ''
worlds:
worldUuid:
prefix: '${world.name}'
# The higher the priority, the sooner it appears than other groups in the message
# In the case that a player is in both groups, the fixes will be displayed like this:
# prefix: [Admin] Donator
# suffix: coolkid yolo
groups:
admin:
priority: 1
prefix: '[Admin]%W%'
suffix: 'yolo%W%'
donor:
priority: 2
prefix: '[Donator]%W%'
suffix: 'coolkid%W%'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment