What is a Cloud Plugin?
What is a Cloud Plugin?
A cloud plugin expands the function of the cloud and can add new mechanisms.
Where can I get a cloud plugin from?
Cloud Plugins can be downloaded from our Plugin Center at https://plugins.cavecloud.net/. All you have to do is log in with your account, choose a plugin and click on "Download".
There you get a Cloud Command with which you can easily download and activate the plugin.
Can I make a cloud plugin myself?
Yes, and it's very simple. Plugins are programmed in Java.
Create a new Java project in your pre-built IDE and add the Cloud.jar
as library. Now you can access all functions of the CloudAPI.
You can find all further information here: CloudAPI
Plugin States
A plugin uploaded to our Plugin Center is assigned a status. Here is a list of all.
State | Developed by | Checked | Automatically activated If enabled | Automatic updates If enabled | Sicherheitsgarantie |
CaveCloud | Yes Developed by CaveCloud | Yes | Yes | 100% | |
User | Yes Checked by CaveCloud | Yes | Yes | 90% | |
User | No | No You have to activate it. | No You have to activate it. | 0% |
Development States
Status | Beschreibung | Sichtbar im Plugin Center |
Once your plugin has been uploaded, this status will be set. We will check your plugin and group it manually. | No | |
As soon as we check your plugin, this status will be set. | No | |
If we have something wrong with your plugin, it gets this status. Tip: You will of course get a detailed description of what the problem was. | No | |
As soon as we have checked your plugin and have nothing wrong with it, it gets this status. Your plugin is now visible to everyone in the Plugin Center. | Yes | |
This plugin can only be downloaded by people who have the link for it. | No, only direct links | |
Only you can download the plugin with your account. | No |
CloudAPI
Examples
Demo Cloud Plugin on GitHub: https://bitbucket.cavefire.net/projects/CC2/repos/cavecloud-demo-plugin/browse
CloudAPI JavaDocs
Look at our JavaDocs here: CloudAPI JavaDocs
SpigotAPI
Examples
Demo SpigotAPI Plugin: https://bitbucket.cavefire.net/projects/CC2/repos/cavecloud-addon/browse
Set Server Data
Tip: Use this, to set the Sign Data. More Information: Change text on Server Signs
Server self = SpigotApi.getSelfServer();
self.getServerData()
.setPlayers(Bukkit.getOnlinePlayers().size())
.setGameState(SpigotApi.getGamestate(this.gamestate))
.setMaxplayers(this.maxPlayers)
.setMotd(motd);
SpigotApi.updateSelfServerData();
Send custom data to the cloud
If you want to send data to the cloud, you can use this code. For the cloud to do something, you need to develop a plugin for the cloud that has a registered listener.
PacketDataConstructor packetDataConstructor = new PacketDataConstructor();
packetDataConstructor.add("key", "value");
OutgoingDataPacket outgoingDataPacket = new OutgoingDataPacket(packetDataConstructor);
SpigotApi.sendMessageToCloud(outgoingDataPacket);
Events
All these events are registered as normal events (like the PlayerJoinEvent) in your spigot plugin.
To receive messages from your cloud plugin, you need to register a listener with the following event:
CloudMessageReciveEvent
To see when a server's data has changed, you can use this event:
ServerDataChangeEvent
To see when a server is offline, you can use this event:
ServerRemoveEvent
JavaDocs
Here you find the JavaDocs: SpigotAPI JavaDocs
BungeeAPI
Set fallback / default server
ServerInfo serverInfo;
BungeeCordApi.setFallbackServer(serverInfo);
Send user-defined data to cloud
If you want to send data to the cloud, you can use this code. For the cloud to do something, you need to develop a plugin for the cloud that has a registered listener.
PacketDataConstructor packetDataConstructor = new PacketDataConstructor();
packetDataConstructor.add("key", "value");
OutgoingDataPacket outgoingDataPacket = new OutgoingDataPacket(packetDataConstructor);
SpigotApi.sendMessageToCloud(outgoingDataPacket);
Events
All these events are registered as normal events (like the PlayerJoinEvent) in your spigot plugin.
To receive messages from your cloud plugin, you must register a listener with the following event:
BungeecordMessageReciveEvent
To see when a server's data was changed, you can use this event:
ServerAddEvent
To see when a server is offline, you can use this event:
ServerRemoveEvent
JavaDocs
Here you find the JavaDocs: BungeeAPI JavaDocs