-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
115 lines (87 loc) · 3.67 KB
/
README
File metadata and controls
115 lines (87 loc) · 3.67 KB
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
Minecraft Messenger (MinecraftIM)
Provides an Instant Messenger interface for your server
Intended for those who have a small server (like me) and want to know when a friend gets on
Features:
Single-user (for now?)
Supports: AIM, GTalk, Jabber
messages on player login & logoff
chat through IM
can send commands to the server
message queue, so can get messages if the recipiant is offline once they login
API :D
// to get plugin:
if (this.getServer().getPluginManager().isPluginEnabled("MinecraftIM")) {
MinecraftIM messenger = (MinecraftIM) this.getServer().getPluginManager().getPlugin("MinecraftIM");
}
// to send messages to the main user:
messenger.sendNotify("message"); // will automatically format color formatting :)
// to intercept chat messages (will need the plugin as a libary in your manifest):
(your class) implements ChatMessageHandler
public interface ChatMessageHandler {
/**
* Called when MinecraftIM receives a message from the authorized user
* @param message what was received
* @return if this method used the command, and don't do anything else
*/
public boolean messageHandled(String message);
/**
* Called after any message received
* @param fromUser what username this message came from
* @param message what was received
* @return if this method used the command, and don't do anything else
*/
public boolean messageHandled(String fromUser, String message);
}
// then:
messenger.registerMessageHandler(your class);
TODO:
add more protocols ?
more users to send notifications to ?
list of users to check for login (and ignore others) ?
custom player-created "pounces" to notify when a given player logs in (w/ permissions) ?
list of users to notify for login events? (and/or allow for chat, if not public)
don't send login events of admin to admin
custom block list (add/remove users without reloading)
Changelog:
Version 0.2.6 - 3/5/12
updated for new bukkit system
removed a mostly meaningless debug message
Version 0.2.5 - 1/15/12
fixed how lib extraction operates
( MSN messaging added via JML library - can't get it to work properly yet :/ )
Version 0.2b - 9/9/11
XMPP logout exception fixed
libraries now included seperately in jar & extracted at runtime
Version 0.2 - 8/11/11
AIM toc handler classes changed - now works with AIM again :D
- old method quit working about 7/20/11 17:10GMT for reasons still unknown
now chat ignores auto-responses
XMPP protocol added via the smack library.. for now, just GTalk & Jabber
- may add custom xmpp, if someone needs
Version 0.1.6 - 6/24/11
blocked aolsystemmsg
removed "from" from login notifications
changed offline message handling to allow condensed messages (instead of individual)
resolved (most) reconnect duplication errors & made more /reload friendly
added kick event notification (instead of logout)
added custom timestamp config, with custom timezone
Version 0.1.5 - 4/1/11
617 compatibility
Version 0.1.4 - 3/29/11
fixed double-newline
fixed null pointer exception on start
Version 0.1.3 - 3/28/11
removed some debug output
long (multi-line) messages condensed to single messages
messages longer than limit (1024 chars in aim) are split into multiple messages
color formatting is optional
fixed auto-response for public users
Version 0.1.2 - 3/27/11
the user set as sendTo can send commands as op and retrieve the output from the command
if chat is turned off, there is a configurable time after sending a chat message that you can recieve a reply
Version 0.1.1 - 3/25/11
a custom command register method added for API
message queue, so can get messages if the recipiant is offline once they login
figured out the missed message bug :)
Version 0.1 - 3/25/11
Initial Release