ContextManager lists
------------------------------

Purpose variable chat manager, nice API, other contexts too.

FEATURES
----------------------------
- PermissionsEx prefixes with respecting groups weights.
- Set recipients for chat, ignore players, chat channels, tell shortcut.
- mcMMO party chat is recognized and logged.
- Annoucements with Commands or shortcut ! (channel wide) or !! (global).
    Possible from of mcMMO party chat
- Tell-style comamnd + shortcut (@ ...).
- Fully asynchronous chat (tell and announce are scheduled as commands).
- Region finder
- ChestShop finder.

UNDER REVIEW / ISSUES
----------------------------

Currently ContextManager is being restructured slightly.

- mcMMO party chat is only logged, the configuration has no effect, 
    except for use-event. Announcements should work.
- Soon/later: Vault support for prefixes.
- Soon/later: Support for not having any plugin for prefixes.
- mcMMO admin chat is not yet treated in any way.

COMMANDS
----------------------------

Normal chat:
* @ <player> ....<message>... | @<player> ...<message>...
    Like tell.
    Can be disabled in the shortcuts section,
    maps to the command /tellplayer (tellp, tell).
    NEEDS: contextmanager.cmd.tellplayer
    
Administrative chat:
* !...
    Channel wide announcement.
    Can be disabled in the shortcuts section,
    maps to the command /tellchannel (tellchan, tellch, tellc).
    NEEDS: contextmanager.chat.announce
* !!....
    Global announcement
    Can be disabled in the shortcuts section,
    maps to the command /tellall (tella).
    NEEDS: contextmanager.chat.announce


Normal Context commands:
* context ...
    aliases: cx
    Various sub commands for managing or setting contexts.
    For most sub commands there are shorter verions,
    like rec or even r for recipients.

* cx ignore ...
    Aliases: cxign
    Ignore players chat.
    Add the player names, to remove a single player add a "-",
    like: /cxign -Notch 
    
* cx recipients ...
    Aliases: cxr
    Add recipients of chat, only these people can hear you,
    you can only hear them, they might hear others.
    If you have permission for /cx greedy , then you can use that
     to still here the normal chat.
    Add names of players, or -<name> to remove one single player,
    like: /cxr -Notch
    
* cx channel
    Show available chat channels.
* cx channel <channle name>
    Aliases: cxc
    Switch to the chat chanel.
    You can only hear others inside of the channel, and vice versa.
    You can still hear other channels if you have /cx greedy !

* cx greedy | cx greedy channel
    Still get chat of other channels even if in /cxr mode or 
     in another channel.
    contextmanager.cmd.greedy
    contextmanager.greedy.default
    contextmanager.greedy.channel
    contextmanager.greedy.party
    contextmanager.greedy.private
        
* cx reset
    Aliases: cx clear | cx cl | cxcl
    Reset contexts such as channels and recipients 
* cx reset all
    Aliases: see cx reset
    Reset contexts and ignored players.
* cx reset recipients
    Aliases: see cx reset
    Reset recipients.
* cx reset channel
    Reset channel to default.
* cx reset ignore
    Reset ignored players
    
* cx find ...
    Aliases: cx f ...
    Find stuff, this is the general shortcut which will delegate  
     to all available services.
    it will work for regions and for items (ChestShop).
    However there is permission setup necessary, or configuration to make these work!
 
Region service:
* cx region find <region name>
You can always use this to find regions youre owner or member of.
    regions.find.w.<world>.r.<region>
    Abbreviate for a world: regions.find.w.<world>.*
    Use lower case world and region names for permissions!
 
ChestShop service:
This only works if filters are set (filter.yml)!
The filters contain lists of regions for each world section.
Any region that is inside of such a filter region will
be added to the shop finder when shops are used on it.
So shops do need extra regions inside of the filter regins.  
* cx shop <region name or item name>
    Show items and prices of recently bought or sold stuff.
    Or show which shops sell  or buy it.
* cx shopp info <region name>
    Show items (...).
* cx shop find <item>
    Show regions that sell the items
* cx shop find <region name>
    Show distance to shop, should work for all shops that match the fiters.

Administrative context commands:
* cx history | cx history <number>
    Shortcut: cx h ...
    Show chat history (last 50 or number ... number + 50).
    contextmanager.admin.cmd.history
    contextmanager.history.display.channel
    contextmanager.history.display.default
    contextmanager.history.display.private
    contextmanager.history.display.party
* cx services
    Show available mix-in in services (ChestShop, region finding). 
    
Administrative commands:
* cmreload 
    Reload configuration (s).
    contextmanager.admin.cmd.reload
* mute <player> | mute <player> <minutes>
    contextmanager.admin.cmd.mute
    contextmanager.admin.cmd.mute.mild <- for 20 minutes mute
* unmute <player>
    contextmanager.admin.cmd.unmute
* muted
    List of muted players.
    contextmanager.admin.cmd.muted


OTHER PERMISSIONS
----------------------------

CONFIGURATION
----------------------------


CONFIGURATION FOR ChestShop HOOK
-----------------------------------
under hooks/ChestShop

settings.yml:
* add-unowned
    If false it will not add shops from unowned regions.
* use-filter
    If to use the WorldGuard region filter, i.e. that shops only get
    added if they are inside of a filter region (usually the town region).
* expiration-duration
    Expiration time in days, for when to invalidate shop entries.
* reverse buttons
    Used for sell/buy if you reversed the buttons in the 
    ChestShop configuration.
    Not sure this is still used, have to check it ....

filter.yml:

This file contains the filter setup (see above: use-filter).
In the section allow-regions you can enter a list of regions in
a section for each world, example:

allow-regions:
  mainworld:
  - maintown

STACK
------------------

- !(add) permissions for muting "newbies" + interfacing for playing time
- !(add) custom context to define what to hear + /cx reset
- !(add) replace tell for the case of offline or hidden players or players that ignore the telling player
- !(add) /ignore command (player, *)

!(add) Tag for global shout ?

record + cx inspect ?

!(add) hear all switch ? 
! replace global by a preset or even configurable name !

!(add) World aliases (translate just the format part)
!(add) Map context to integers ! For fastest comparison !

! (add) context all (hear all, speak to all)
! (add) context world ! [for mods: also other worlds! ]
! (add) context with [to switch to the same context]


! (add) context channel [with permissions!, from config]



! (add) Message on empty recipients !


! (add) mute for a certain context !


***
- ! add better party details on history, maybe list recipients


- !(add) cx with ?

- ? add silent flag ?
- ? greedy flag ?
- ! say (server) log it
***

! group invitations ?

! add flag for: listen to party, private but not to main chatter
! add history -> browser ? + certain types only (not tell for instance)


! (add) ping player [+ deactivatable] + ping mods or so
! keep track of mods and make them pingable (cx mod) + ping task (permission => ping)
! warn on new players 

! listening instead of players (channel info)
! add greedy chat -> hear all channels

? (add) permission for getting heard from channels out


? prefixing concept =? your name mentioned ...

! subscribe feature for channels (different types: announcement, region dependent announcement, distance-dependent announcements) maybe schedule message with random delay.


! (add) greedy for tell too ? TODO: Use extra ENUM for greedy ! (small-channel, all_channels, private, tell , etc.)

!(add) Better context handling: keep sets with players that are in certain channels and for greedy, so that getting the players can be made much faster.


*** 

* FUTURE:
- ?(refactor) For use without regions at all ?

* OPT:
- !(add) ChestShop: even more colors !
- !(add) CommandAliasMapper (for convenient setup with a String[][] presets)

* FEATURE:
?(add) ChestShop3: only process valid transactions ?
!(add) option to add admin shops
- ?(add) AccessMap3d for shop positions -> shop list return Set of shops within 50 blocks?
- !(add) Shopfinder: +add statistics or reliability values.

* MANAGEMENT:


!(add) option to test if shops really exist on chunkload (older than xy shops).
!(add) exclude-filter option (exclude region from adding).


*** 


***

? (add) Player prefixing + online list service.

!(add) greedy: channel+default vs ALL_CHANNELS 

***
- ? add onReload for hooks ?
- ?(add) recheck data command ?
- ?(add) Browsing functionality to contextmanager ?
- !(add) commands to manage adding filters (shop)

? (add) BlockBreak: signs

?(add) region finder ServiceHook for regions that one is owner or member of.

?(add) Conversations with history ? or channel history 


!(add) Browser central !

****

!(add) mild unmute perm


? add: staff calls (+ location) + tp ther ?



***

ChestShop: Out of stock / chest full problem: ? expiration for shops (7das or so ).

? channel specific formats + flag if to show channel name !?
? add something for restricted channels (only group x can hear) ?
? add some default greedy states ? (admin / mod channel)
consider: party chat : replace party chat (!).


*** API / interfaces for other perm/group plugins ?

- > VAULT support

*** Tweaks / adjustments
! Handle cmMMO admin chat
! Handle the /me command (history + recipients) ! [configurable: if top test an extra permission for it.]
! configurable: allow tell
! maptotell in config (pre process).
? distribute updateing players over time better.
! make duration for getting infos configurable ! (something more sophisticated?)
! add prefix to format descriptions ?
? OPT: avoid synchronized stuff for hotspots, use setting the whole set/map on changes instead. 
? add reply command (tell or recipients? + timestamp)

*** Completely async chat !
? add stats especially for async chat, but maybe for commands too?
? add greedy Party ?

!add ranged mode (how ? rec + send?) <- per channel + channel availability settings (worlds etc., needs config change, needs concept for auto changing the channel)

!configurable messages: "You are talking to yourself!" <- DOCUMETN IN LISTS !

!add perm for short term muting


