Giter Club home page Giter Club logo

chatmanager's Introduction

ChatManager

ChatManager, introduced in PEX 1.13, offers reliable "out of the box" functionality of a conventional chat plugin like a iChat or HeroChat. ChatManager offers basic chat customization such as chat colours and prefixes/suffixes, as well as a per user/group message format and a ranged chat with global chat mode.

ChatManager now supports Multiverse fancy world aliases in chat!

Configuration

ChatManager is disabled by default

To enable ChatManager after it is installed, you will need to edit the default config.yml in the ChatManager directory and set enable to true.

An example ChatManager config file:

enable: true
chat-range: 100.0
display-name-format: '%prefix%player%suffix'
global-message-format: <%prefix%player%suffix> &e%message
message-format: <%prefix%player%suffix> %message
ranged-mode: false

Configuration properties

PropertyDefault ValueDescription
enablefalseDetermines if ChatManager is enabled or not
ranged-modefalse Enables Ranged Mode, a special mode in which chat messages have limited range. For more details look at the Ranged Mode section
chat-range100 Amount of blocks in which a chat message can be heard. Only used if ranged mode is enabled
message-format<%prefix%player%suffix> %message Default message format. For placeholders look into Message Format Placeholders section.
global-message-format<%prefix%player%suffix> &e%message Message format for Global Messages. For more details, look at the Ranged Mode section.
**NOTE: If you remove the < and > from the lines for the messages, the new message format must be in quotes as YAML can not parse the % characters. For example, `<%prefix%player%suffix> &e%message` becomes `"%prefix%player%suffix &e%message"`**

User/Group options

It's also possible to specify user/group specific settings. For example, for only specific groups, you can enable Ranged Mode, change their chat range, or specify their message format. They are almost identical to Configuration properties. If not specified than values from configuration file would be used.

OptionDescription
force-ranged-mode Enables Ranged Mode for specific user/group.
chat-range Chat range for user/group, in blocks.
message-format Default message format
global-message-format Message format for global messages.

Example

/pex group Admins set message-format "&4[admin] &f%player: %message"

This will set message-format for group Admins (and subgroups) only to &4[admin] &f%player: %message.

Permissions (top)

ChatManager also has a few permissions:

PermissionDescription
chatmanager.chat.global Permission to send global messages when ranged mode enabled.
chatmanager.chat.color Permission to use color codes in chat message. Example: Hi &5There!
chatmanager.chat.magic Permission to use the 'magic' &k color code in chat message. Example: &kWTF
chatmanager.chat.bold Permission to use the &l color code to embolden text. Example: &lBoldly going nowhere!
chatmanager.chat.strikethrough Permission to use the &m color code to strikethrough text. Example: &mStrike
chatmanager.chat.underline Permission to use the &n color code to underline text. Example: &nThis text is underlined
chatmanager.chat.italic Permission to use the &o color code to italicize text. Example: &oEmphasised text
chatmanager.override.ranged Permission to override/ignore the ranged chat setting. If this is not explicitly disabled for groups that have * permissions, all chat messages will be sent globally (but will not be coloured as such)

Ranged Mode

ChatManager contains a Ranged Mode feature. When this mode is enabled, any message is limited by the specified range (default range is 100 blocks). What this means is that a message can be seen only if a player is with the specified range of the player who typed the message (think of someone who too far away to hear someone else talking).

ChatManager also includes a Global Message feature which requires a special permission (chatmanager.chat.global) node to use this ability. Global Messages are messages that are not limited by range.

To send a global message, you have to type the exclamation "!" mark (otherwise known as a bang) before the message text. Example: !Hi everyone, i have good news for you!.

Global Messages also have their own message format and are colured orange by default. Check global-message-format configuration property for details.

Message Format Placeholders (top)

These are the placeholders/server variables that PEX supports and assumes are available. If another plugin offers others, such as essentials nickname function (%displayname), they can be added to the config file.

Placeholder Description
%message Message text
%player Sender name
%prefix Sender prefix
%suffix Sender suffix
%world World the sender is in. If Multiverse is enabled, the colored alias of the world will be used.

Time placeholders

ChatManager also has time placeholders which are based on the php date() function. Note that only the time related placeholders are implemented.

Code Description
%H 24-hour format of an hour with leading zeros: 00-23
%i Minutes with leading zeros: 00-59
%h 12-hour format of an hour with leading zeros: 01-12
%s Seconds, with leading zeros: 00-59
%G 24-hour format of an hour without leading zeros: 0-23
%a Lowercase Ante meridiem and Post meridiem: am or pm
%g 12-hour format of an hour without leading zeros: 1-12
%A Uppercase Ante meridiem and Post meridiem: AM or PM

chatmanager's People

Contributors

dionrhys avatar t3hk0d3 avatar winzlebee avatar zml2008 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatmanager's Issues

Bug - Unexpected world prefix inheritance? / Feature - Inherit prefix/suffix shortcut

ChatManager v1.15 (this is the latest version)
CraftBukkit 1337
PermissionsEx v1.16

PEX Backend; SQL

chat-range: 100.0
display-name-format: ''
global-message-format: (%world)%prefix%displayname%suffix &e%message
enable: true
message-format: '%prefix%displayname%suffix %message'
ranged-mode: false

Testing:
pex group GParent create
pex group GParent add modifyworld.chat
pex group GChild create
pex group GChild parents set GParent
pex group GChild parents set GParent
pex group GParent prefix "<<<"
pex group GParent prefix "{{{" city
pex group GChild prefix "---"
pex user Psithief group set GParent

(say test in world 'city')
{{{Psithief test
(as expected)

pex user Psithief group set GChild

(say test in world 'city')
---Psithief test
(wrong? I expected the same output as above.)

How can I get the more specific parent case to override the child's general case, or is this not possible?

See https://github.com/t3hk0d3/PermissionsEx/issues/113

Where Can I download the Jar?

Since PEX has removed there chat prefixes I don't know what plugin to use for my chat...
Which one can I get that is as easy as PEX Prefix Chat?

Local listen for moderator

Hello its no bug, but very need permission in plugin that give for moderator listen local chat everywere.

Привет, это не баг, но очень нужно разрешение в плагин, которое дает модераторам слушать локальный чат везде.
Спасибо за плагин!

Weird prefixes|suffixes when ranged-mode enabled

I am using only ChatManager to handle the chat and all prefixes and suffixes are set in group permissions.
When ranged mode was disabled, everything worked great.
But then I tried the ranged mode, and it works, but plugin doesn't seem to parse prefixes and suffixes.
More than that some players have strange prefix|suffix, that aren't set anywhere, like so:

&e[????]Sato: &6message

When without ranged-mode it normally looks like so:

[&6Admin&f] &bSato: &emessage

my ChatManager config.yml:

enable: true
message-format: '%prefix%player&f: %suffix%message'
global-message-format: '[&aG&f] %prefix%player&f: %suffix%message'
ranged-mode: true
chat-range: 150.0

PEX 1.19.2
CB 1.2.5-R1.3

Essentials nick names do not work with CM.

Nicknames show up on /list, and any other plugins that deals with names and chat.

however they dont work with ChatManager in chat.

PEX latest as of today
Bukkit 1.2.5 RB
Chat manager - PEX
Essentials latest DEV as of today.

%group placeholder

It would be useful to have a %group placeholder. This would allow a similar format to that currently used with iChat so that only the colour is held in %prefix. This then allows coloured names in plugins like MCDocs.

Cheers,
Nick

Player Prefix - Group Prefix

Hello. I would like more options in the config.

for example %pp where it puts the players prefix and then %gp where it puts the group prefix.

Then i can have everything in the group prefix displayed before anything in the player prefix or the other way around etc. Im not sure how it works now.

I tried setting a player prefix, and it overrode what was in the group prefix

Factions in Prefix

I recently got factions on my server and it took a bad turn with my chat formatting. If you've got a faction it won't let you talk, I think it's because the faction name isn't included in the message format. How can I fix it?

My Chat Manager config:

" enable: true
message-format: '%displayname &8: &6%message'
global-message-format: '%displayname : &6%message'
ranged-mode: false
chat-range: 100.0 "

Event priority

Please specify event priorities to your listeners, because other plugins, (such as chat logger) can't pass the modified chat colours and others. I think chat color and prefix priorities should be "HIGHEST". Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.