Skip to content

Commit 6d7ae00

Browse files
committed
Update api info and features
1 parent 6fcffa2 commit 6d7ae00

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Spigot/CraftBukkit/Bukkit/BungeeCord plugin for [Slack](https://slack.com)
99
* Uses minecraft username and avatar as bot information
1010
* Blacklist players or commands from being sent to Slack
1111
* Use permissions to block messages to Slack
12-
* API to send custom events (coming soon)
13-
* BungeeCord support (coming soon)
12+
* API to send custom messages
13+
* BungeeCord support (partial)
1414
* See the console (coming soon)
1515
* Formatting (coming soon)
1616
* Send commands from Slack (coming soon)
@@ -57,17 +57,27 @@ default: no one
5757
**slack.hide.chat** - _does not post your chats to Slack._
5858
default: no one
5959

60-
##API
61-
**(not implemented yet)**
62-
Just
60+
##Custom Messages
61+
On the server, you may use
62+
**/slack send <username> <image URL> <message>**
63+
to send a custom message to Slack.
64+
65+
Programmatically, you can add the plugin as a dependency, and then import the API for the platform you're using (either Bukkit or BungeeCord)
66+
```java
67+
import us.circuitsoft.slack.api.BukkitPoster
68+
```
69+
or
6370
```java
64-
import static us.circuitsoft.slack.send
71+
import us.circuitsoft.slack.api.BungeePoster
6572
```
66-
into your plugin and add the plugin as a dependency.
6773

68-
The method to send a message to Slack is send(). Javadocs are included in the plugin about parameters.
74+
If you're using Bukkit,
75+
```java
76+
new BukkitPoster(m, p, i).runTaskAsynchronously(this);
77+
```
78+
where m is the message, p is the username, and i is the image URL. You can set i to null if p is a Minecraft player username.
6979

70-
The method returns true if the message was successfully sent to Slack, so you might want to do something if it returns false.
80+
If you're using BungeeCord, make a thread with the task BungeePoster. Same parameters as Bukkit.
7181

7282
##Support
7383
For support questions on how to use the plugin and troubleshooting, post a comment so if I am not available, other people can help you. Explain your problem and use the latest version before asking for help.

0 commit comments

Comments
 (0)