-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathREADME
226 lines (210 loc) · 9.28 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
=============
Updates
=============
Please visit http://forum.thedgtl.net for all updates and support!
=============
Description
=============
Custom chat formatting.
Based on the idea of iChat v1.5 by Nijikokun.
Includes code and concepts from mChat by MiracleM4n <https://github.com/MiracleM4n/mChat/>
Download (Direct JAR): http://thedgtl.net/bukkit/iChat.jar
Source: https://github.com/TheDgtl/iChat
=============
Features
=============
Supports Permissions (Both 2.0 and 2.1), and SuperPerms handlers (PermissionsBukkit, bPermissions, GroupManager, Privileges and PermissionsEx).
Allows you to specify a prefix/suffix/variable for users and groups.
A user-specific prefix/suffix/variable will take priority over a group prefix/suffix/variable.
Unlimited amount of custom variables for use in chat format.
Colors are supported in all parts of the formatting and chat text.
Usable health bar and health amount in the formatting.
Support for formatting of /me
Support for timezone offsets
=============
Formatting
=============
Message formatting is defined in the file plugins/iChat/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 iChat 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
Example (Default):
iname-format: '[+prefix+group+suffix&f] +displayname'
message-format: '+iname: +message'
me-format: '* +name +message'
date-format: 'HH:mm:ss'
handle-me: true
As of iChat 2.4.0 there have been a few changes in the way variables and groups are handled.
==========
Groups
==========
As of iChat 2.4.3 native groups are supported in Permissions 2.x/3.x, PermissionsBukkit, bPermissions, and PermissionsEx.
As of iChat 2.6.2 native groups are supported in Privileges
==========
Variables
==========
Variables are now defined in variables.yml in the iChat 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.
This example will show the users health where +{var1} is located:
variables.yml:
---------------------
groups:
admins:
prefix: ''
suffix: ''
var1: '[+health]'
config.yml:
---------------------
message-format: '[+group&f] +{var1} +displayname: +message
=============
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)
me-permissions - Whether to require ichat.me to use /me
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.
=============
Permissions
=============
ichat.format.color - Allow this group/user to use color in their chat messages.
ichat.format.formatting - Allow this group/user to use formatting in their chat messages.
ichat.color - Allow this group/user to use both color and chat formatting in their chat messages (Legacy)
ichat.reload - Allow reloading the iChat config
=============
Commands
=============
/ichat reload - Reload the iChat config file.
=============
Changes
=============
[Version 2.6.2]
- Added support for Privileges
- Added support for a timezone offset
- Added MCStats metrics tracking
[Version 2.6.1]
- Resolve issue where I accidentally cancel all plugin tasks. Oops.
[Version 2.6.0]
- Implemented the AsyncPlayerChatEvent.
- Resolved issues with interaction between iChat and plugins such as Factions.
- More strict caching of data
- Implemented a time-based cache refresh. This is due to not being able to make the calls I require in an ASync event.
- The refresh rate of the cache is configurable in the config.yml. It is not recommended to set this any lower than 100 ticks (5 seconds).
[Version 2.5.10]
- Added more output to /debug
[Version 2.5.9]
- Revert changes to VariableHandler
- Revert to using PlayerChatEvent as Bukkit itself is not thread safe
- Add /me permission/config
- Hopefully resolve NPE in loadConfig of VH
- Add support for GroupManager
[Version 2.5.8]
- Add ichat.format.color/formatting permissions for more customization
- Switch to the new "AsyncPlayerChatEvent"
- Thread-safe VariableHandler
- Build against 1.3.1
[Version 2.5.7]
- Fixed issue with players saying +m in chat duplicating chat message
[Version 2.5.6]
- Implemented my own dYamlConfiguration class for loading variables.yml, this is required as Bukkit's config class lacks Unicode support
- Use Bukkit's implementation of addColor, as it's faster than the RegEx I was using
[Version 2.5.5]
- Color the rest of the "should not exist" color spectrum
[Version 2.5.4]
- Added new &k color code
- Color codes now case insensitive
[Version 2.5.3]
- Updated iChatMeEvent for new event system
[Version 2.5.2]
- Updated for bPermissions 2.9.0 (Requires 2.8.0 or later)
[Version 2.5.1]
- Quick update to event handling for 1.1-R5 spec
[Version 2.5.0]
- Added world variables for further customization
- Updated event handling to 1.1-R3 spec
[Version 2.4.5]
- Fixed reload command not reloading config properly
[Version 2.4.4]
- Updated to new FileConfiguration class
- Fixed bypass exploit for colors in messages
- Multi-world support for variables.yml
[Version 2.4.3]
- Permissions overhaul. No longer require group.{name} node unless not using a permissions handler
[Version 2.4.2]
- Fixed issue with inheritance in Permissions
- Implemented start of online time variable. Need output format.
[Version 2.4.1]
- Remove plugin-specific group referencing. All groups are now managed via group.* nodes,
the exception being pure Permissions 2.x/3.x
- Fixed /ichat reload not reloading variables.yml
- Updated /me to use BroadcastMessage
[Version 2.4.0-final]
- Took out variable caching, there's no hook for PermissionChange.
- Updated README to include info on group.* nodes
[Version 2.4.0-beta]
- Merged all branches into one
- Supports Perms 2.x/3.x, SuperPerms, GroupManager
- Added a more advanded API based on the mChat API
- Massive thanks to MiracleM4n for code and concepts
- All variables are now retrieved from variables.yml instead of Permissions
- Removed censor code
[Version 2.3.3]
- Added Permissions as a dependency
- Added "/ichat reload" command
[Version 2.3.1]
- Added iChat.ichat.parseChat(Player, String, Format) API
- Added hook for /me chat formatting using the "me-format" config option
[Version 2.3.0]
- Added external iChat.ichat.parseChat(Player, String) API
[Version 2.2.3]
- Added +displayname/+d for player.getDisplayName()
[Version 2.2.2]
- Updated to latest RB
[Version 2.2.1]
- Updated how Permissions is loaded
[Version 2.2.0]
- Added the ability to have an unlimited amount of variables in message-format
- Changed version numbering
[Version 2.11]
- Now uses per-world permissions information
[Version 2.10]
- Allow admins to enable color on a permissions basis
[Version 2.09]
- Another small update to Permissions (Returned false when I should have returned true)
[Version 2.08]
- Updated Permissions version detection to only count the first two parts of the version (x.x, not x.x.x)
[Version 2.07]
- Added +time/+t tag for timestamp
[Version 2.06]
- Added +world/+w tag
[Version 2.05]
- Core GM support removed, depends on FakePermissions if you use GM.
[Version 2.04]
- Re-arranged variables, you can now use everything in the suffix/prefix
[Version 2.03]
- Verify that all available variables aren't null before calling parse
- Fixed crash caused by color code at end of message (Basic fix, added a space)
[Version 2.02]
- Fix a NPE someone was getting
[Version 2.01]
- There's a bug in Permissions 2.1 in getPermissionString, switched to getUserPermissionString
[Version 2.00]
- Initial re-write of Niji's plugin.
- Added Permissions 2.0/2.1, and GroupManager support.