Slack
Slack
Link your server to Slack!
Features
- Send chat messages and commands to Slack
- Send login and quit messages to Slack
- Uses minecraft username and avatar as bot information
- Blacklist players or commands from being sent to Slack
- Use permissions to block messages to Slack
- API to send custom events
- BungeeCord support (partial)
- See the console (coming soon)
- Formatting (coming soon)
- Send commands from Slack (coming soon)
Download
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
Installation
- Drop the plugin in your server folder.
- Create a new incoming webhook and set it up however you would like.
- Start and stop the server.
- Copy the webhook URL and set webhook: in the config.yml to that.
- Start the server.
Verified compatible with CraftBukkit, Spigot, Spigot/CraftBukkit 1.8, and Glowstone. Probably works with any Bukkit API server.
Commands
/slack - reloads the config
permission: slack.reload
Configuration
version - the plugin's current version. Do not touch this.
debug - whether to post HTTP response codes to console
webhook - the incoming webhook URL for slack.
use-perms - whether to use permissions or not (for sending to Slack)
use-blacklist - whether to use the command blacklist or not
blacklist - list of commands you don't want to be sent to slack.
Permissions
slack.hide.command - does not post commands you do to Slack.
default: no one
slack.reload - allows you to reload the plugin's config using the command /slack
default: op
slack.hide.login - does not post to Slack when you login.
default: no one
slack.hide.logout - does not post to Slack when you login.
default: no one
slack.hide.chat - does not post your chats to Slack.
default: no one
Custom Events
On the server, you may use
/slack send
to send a custom message to Slack.
Programmatically, you can add the plugin as a dependency, and then import the API for the platform you're using (either Bukkit or BungeeCord)
import us.circuitsoft.slack.api.BukkitPoster
or
import us.circuitsoft.slack.api.BungeePoster
If you're using Bukkit,
new BukkitPoster(m, p, i).runTaskAsynchronously(this);
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.
If you're using BungeeCord, make a thread with the task BungeePoster. Same parameters as Bukkit.
Support
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.
For bug reports, please post an issue on Github. Just make sure to explain the problem, how to reproduce it, and make sure you are using the latest version.
If you get an error, please post it to https://gist.github.com/ and then post the URL here.
If you have a feature request, PM me, or code it yourself and pull request it on Github.
Help
I have admin but it says I'm new and I can't use commands can I be admin not new admin
@NinjaSplat
No problem. Any time!
@CircuitSoft
Oh, okay. Thanks.
@NinjaSplat
It is not possible yet. It will be added in 2.0.
@CircuitSoft
Okay, but how do I do that?
@NinjaSplat
Sorry for the late reply, I've been busy lately.
Anyway, that feature is in the works.
Hey, is it possible to make it when someone uses the channel, and the message be sent to the MC chat? That would be awesome!
This is really cool. Looking forward to being able to send messages from Slack! Another request for your backlog would be integrating messages from Dynmap in a browser. (Sending messages to Minecraft from viewing Dynamp in a browser and having those end up in Slack too, and reverse)
1.5.0-beta1 is available! https://github.com/CircuitSoftGroup/SlackMC/releases/tag/1.5.0
Fixed them. This is considered a dev build, so the normal precautions still apply. Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk. https://github.com/CircuitSoftGroup/SlackMC/blob/master/Slack.jar
I have verified a few weird bugs that have to do with debug mode and permissions. I will be fixing them shortly. Sorry about the delay.
First time I have set this up, im using Spigot 1.7.10 on my dev server as 1.4.3 only works with debug turned on. I havent tested an older version yet. Can't use this on my production as the debug messages filling up the log (Obs) From what I can see with this working, its absolutly superb recording commands & chat in-game. I would love it to be able to record more chat events, like people entering and leaving the server. Would it be possible to add in multiple hooks? So we could have /slack send message here, that could be sent to a custom group then we could have admins use this to set reminders for in-game
This could have so many options if people hooked into it! Like tickets being opened, or an event happening in-game, their plugin could send an event to slack!
@Grant1204
Ah okay, probably a bug then. I'll file a ticket for that one too then. Thanks for confirming :)
@VeggiePirate
I can't get it to post anything after I updated. Happened when I updated from 1.4.0 to 1.4.3.
EDIT: Turning on debug does fix the problem, but it should work with debug false :(
For some reason, mine only actually posts something to Slack when debug is set to true. Have I configured something wrong, or is that a bug?
Edit: Also, slack.hide.logout doesn't seem to be working. The rest work great though.
@Grant1204
Logically, Slack is supposed to be a server log and the reason why we display canceled events is to prevent griefers from hiding that you have a hacked plugin on your server.
Programmatically, Slack does not check if an event has been cancelled.
In 1.4.1, which is coming out today to fix a few bugs, I will add a config option to choose if you want to send cancelled messages to Slack.
@CircuitSoft
I'm not sure. I still don't understand why the Slack plugin considers it as chat, when it is cancelled before it shows up in chat. Shouldn't the plugin recognize that messages that don't show up in chat in-game are not chat messages that it should display in Slack?
@Grant1204
Ok, so what do you think I should do? Make a chat blacklist? I think that would just make everything weird and clunky.
@CircuitSoft
I have it set so that commands being sent to Slack are off for my server in the Slack plugin config. I would like it if there was a way to block those '!' effect commands from being considered chat by the plugin, since plugins like Herochat don't consider them chat/they are cancelled before chat is sent.