[Release] Slackr - Slack integration

Hello everyone! I am submitting Slackr and hope you enjoy it!

Slackr

  • Chat between Minecraft and Slack!
  • Send messages to the #admin channel in Slack from game - for getting a hold of a moderator quickly
  • Send Minecraft commands directly from Slack!
  • Currently working with SpongeAPI 4.2

Commands

  • /slack register <token> - Register you Slack user in Minecraft
  • /slack unregister [player] - Unregister your Slack user or the Slack user of another player (unregisterring another player requires the “slack.admin” permission)
  • /callmod <message> - Send a Slack message to the #admin channel in Slack. (the channel is configurable, requires “slack.callmod” permissions)

Permissions

  • “slack.use”
  • “slack.callmod”
  • “slack.admin”

Links

Video

Skip to 5:52 to see it in action

2 Likes

Looking over the code, I have a couple suggestions.

  • When a command should fail, one should throw CommandException rather than sending a message and returning CommandResult.empty(). empty() is for when the command was executed correctly, but simply did not actually affect anything.
  • Just an FYI, you can add an @First Optional<Player> player to the method arguments of onChatEvent, rather than using Cause#first() in the method body. If you make it just a Player, then not only will the player be provided, but the event won’t be called unless there’s one there.
click here for a nitpicky thing * Java conventions say that package names should always be lowercase.

Pretty awesome looking! :slight_smile: