What is this?
This API allows you to send notifications to any user that has the notification extension installed.They don’t have to be on the server. This is still a huge WIP and nothing is public yet and code has yet to be uploaded to GitHub. In this example I’ve written a simple /requestadmin command, which is the desktop variant of Essentials’ /helpop command.
Preview
Example uses:
Request staff members on the server (as seen in the video)
Integrate some kind of PM system outside minecraft
Get notified when somebody get’s banned
Factions (get notified when you’re getting raided)
Get notified when your server is offline (as shown in the video)
Buycraft notifications
Determining if a player should be allowed to join a whitelisted server. (Allow, or kick with predefined message.)
The server has crashed, would you like to bring it back online? (May not be possible.)
A player has been banned by a new moderator that you may not trust, should we go through with this ban?
How is this done?
I’ve been working on a simple API that connects a chrome extension to your Minecraft server through web-sockets so you can receive notifications even when you’re not online on your server. In the video, I’m using running Craftbukkit (Spigot) and a plugin compiled with the Bukkit API (planning to port to Sponge) and the WebSocket client made by TooTallNate
.
Do you guys have any suggestion/opinions on this? Would you guys use this, and if so, about what would you want to get notified?
@kuro_chou
That would be an interesting feature which I’ll definately look into in, but that would involve using an SMS service, which isn’t free (in most cases). You’d have to pay a couple of cents for each 10 msg’s or so.
@Treblue
Thanks for telling me, I fixed the video now.
Most major carriers actually have a free email to sms function.
That is, your server would send free smtp email to [playerPhone]@[carrierEmail].com, and they send the SMS for you.
Something to look into.
Yeah I’ve been planning that. The issue is that there isn’t a textbox in Chrome’s Notification API (there is support for buttons if you’d look at https://developer.chrome.com/apps/richNotifications). If that’s requested a lot, I might add a popup that allows for text input
I really like the idea of using a chrome extension and websockets to ‘hijack’ the desktop notifications, that’s super neat. You probably want to use twilio for SMS which costs only $0.0075 per message; it would cost around $30/mo to send 4000 messages. I could see you turning this into a service of some kind.
Here are some thoughts if you want to pursue this idea further to turn it into a service.
Yes, websockets are really neat but server owners won’t want to use them because they take up bandwith(and servers are sometimes charged based on that). Seeing as how push notifications are pretty much one way, there’s no need for bi-directional communication and, in consequence, web sockets are not needed. Instead have your service available from a webhook endpoint so that plugins can make HTTP requests instead.
If you wish to move on to other notification delivery systems(ios, android, growl, etc) you’re going to need an intermediary that can store and deliver them. I would code up a server with the above-mentioned webhook as well as configurable delivery systems for the future, this could even be offered as a SaaS.
If you go the SaaS route, you can have a Sponge plugin that provides a simple Java API to post notifications so that plugins don’t have to manually create http requests. How cool would it be if a plugin developer could do:
Notification.push(players, new TextNotification("Requested from ..."));
The possibilities are pretty much endless this way, for plugins and for server owners.
I’m totally up for turning this in a service but I’m not sure if there would be a lot of people requesting this? Do you have any idea if there would be a lot of interest?