BeeCloudAPI

Experimental BeeCloudAPI 1.0.5

Compatible API Versions
1.0.0
Sourcecode
https://github.com/BeeCloudMC/BeeCloud-Proxy
Contributors
FillAmeaPixel Network Developer Team
BeeCloud Proxy
BeeCloud Minecraft Bedrock Edition proxy server software with UDP protocol.

简体中文

How to use?
Download the proxy file and use "java -jar beecloud(fileName).jar" to run the proxy.Download BeeCloudAPI plugin and put it into your nukkit servers.

Java CI: http://bbs.fapixel.com:8080 Download BeeCloudAPI: https://github.com/rainbow188/BeeCloudNukkitAPI

Implement functions
  • The number of multiple Nukkit servers is synchronized.
  • Develop BeeCloud Proxy's own plug-in.
  • A plurality of Nukkit servers send DataPacket to each other and carry out string communication.
How to use BeeCloud plugins?
  • put all plugins into BeeCloud/plugins/ and run your proxy server.
  • Make sure that your plugin has a plugin.yml file in your first packege folder but not src folder.
name:ExamplePlugin
main:net.fap.beecloud.example.Main

For developer
Plugin for Nukkit
Depend your Nukkit plugins on BeeCloudAPI and use Event Listener (@BeeCloudPacketEvent) to send packet and get back the packet.

Plugin for BeeCloud Proxy
ExamlplePlugin: https://github.com/rainbow188/ExamplePlugin

Example Main class
Extends your main class with PluginBase and implements PluginCase Use function:

  • public void onLoad();
  • public void onEnable();
package net.fap.beecloud.example;

import net.fap.beecloud.Server;
import net.fap.beecloud.console.ServerLogger;
import net.fap.beecloud.plugin.PluginBase;
import net.fap.beecloud.plugin.PluginCase;

/**
* BeeCloud 实例插件
*
* @author catrainbow
*/

//插件必须 implements PluginCase 并调用onLoad和onEnable入口方法
//插件可以 extends PluginBase 并使用相关方法
public class Main extends PluginBase implements PluginCase {

/**
* 当插件被加载时会触发
*/
public void onLoad()
{
ServerLogger.info("开始加载插件");
Server server = this.getServer();

/**
* 自定义命令
* @SEE MyCommand
*/
server.registerCommand(new MyCommand());

/**
* 自定义监听器方法一
*
* 覆写核心自带监听器
* Server.reloadListener(Listener);
*
* @SEE MyListener
*/
//server.reloadListener(new MyListener());

/**
* 自定义监听器方法二
* 多开监听器方法
*
* Server.registerListeners(Listener)
*
* @SEE MyListener
*/
server.registerListeners(this,new MyListener());



}

/**
* 当插件被开启时会触发
*/
public void onEnable()
{
ServerLogger.info("欢迎使用!!!");
}

}
Custom Command
Extends your class with CommandHandler And register it by "Server.getServer.register(CommandHandler);"

package net.fap.beecloud.example;

import net.fap.beecloud.console.ServerLogger;
import net.fap.beecloud.console.simple.CommandHandler;

/**
* 自定义命令
*/

public class MyCommand extends CommandHandler {

public MyCommand()
{
commandStr = "mycmd";
commandUsage = "自定义命令";
this.setCommandStr(commandStr,commandUsage);
}

@Override
public void setCommandStr(String commandStr, String commandUsage) {
super.setCommandStr(commandStr, commandUsage);
}

@Override
public void runCommand() {

ServerLogger.info("自定义命令执行成功");

super.runCommand();
}
}
Custom Listener
package net.fap.beecloud.example;

import net.fap.beecloud.console.ServerLogger;
import net.fap.beecloud.event.Event;
import net.fap.beecloud.event.Listener;
import net.fap.beecloud.event.player.PlayerJoinEvent;

/**
* 自定义监听器类
* 用于监听服务器事件
*/

public class MyListener implements Listener {

public void call(Event event)
{
if (event instanceof PlayerJoinEvent)
{
SynapsePlayer player = SynapsePlayer.getPlayer(((PlayerJoinEvent) event).getPlayer());
player.sendMessage("§c欢迎来到我们服务器!!!");
player.sendTitle("§c生存服务器","§b大区1",2,200,2);
}
}

}

BeeCloud Proxy
基于UDP协议的Minecraft基岩版Nukkit服务器群组软件
English
怎么使用
下载服务端并使用命令 "java -jar beecloud(文件名).jar" 去运行它并安装BeeCloudAPI到所有Nukkit子服务器上面
Java CI: http://bbs.fapixel.com:8080 下载 BeeCloudAPI: https://github.com/rainbow188/BeeCloudNukkitAPI
实现功能
  • 群组服务器人数同步
  • 开放的开发环境,可以为BeeCloud自创扩展插件
  • 多个Nukkit服务器之间相互发送数据包并进行字符串通信
怎么使用 BeeCloud 的插件?
  • 放所有插件到 BeeCloud/plugins/ 并运行你的服务器
  • 确保你的插件的主包下有plugin.yml而不是在src目录下
name:ExamplePlugin
main:net.fap.beecloud.example.Main

对于开发者
开发Nukkit插件
将你的插件依赖到 BeeCloudAPI 并 使用监听器 (@BeeCloudPacketEvent) 去发送 和接收数据包
开发 BeeCloud Proxy 插件
例子插件: https://github.com/rainbow188/ExamplePlugin
主类例子
继承到 PluginBase 并 implements PluginCase 使用函数:
  • public void onLoad();
  • public void onEnable();
package net.fap.beecloud.example;

import net.fap.beecloud.Server;
import net.fap.beecloud.console.ServerLogger;
import net.fap.beecloud.plugin.PluginBase;
import net.fap.beecloud.plugin.PluginCase;

/**
* BeeCloud 实例插件
*
* @author catrainbow
*/

//插件必须 implements PluginCase 并调用onLoad和onEnable入口方法
//插件可以 extends PluginBase 并使用相关方法
public class Main extends PluginBase implements PluginCase {

/**
* 当插件被加载时会触发
*/
public void onLoad()
{
ServerLogger.info("开始加载插件");
Server server = this.getServer();

/**
* 自定义命令
* @SEE MyCommand
*/
server.registerCommand(new MyCommand());

/**
* 自定义监听器方法一
*
* 覆写核心自带监听器
* Server.reloadListener(Listener);
*
* @SEE MyListener
*/
//server.reloadListener(new MyListener());

/**
* 自定义监听器方法二
* 多开监听器方法
*
* Server.registerListeners(Listener)
*
* @SEE MyListener
*/
server.registerListeners(this,new MyListener());



}

/**
* 当插件被开启时会触发
*/
public void onEnable()
{
ServerLogger.info("欢迎使用!!!");
}

}
自定义命令
继承类到 CommandHandler 并使用 "Server.getServer.register(CommandHandler);" 注册命令
package net.fap.beecloud.example;

import net.fap.beecloud.console.ServerLogger;
import net.fap.beecloud.console.simple.CommandHandler;

/**
* 自定义命令
*/

public class MyCommand extends CommandHandler {

public MyCommand()
{
commandStr = "mycmd";
commandUsage = "自定义命令";
this.setCommandStr(commandStr,commandUsage);
}

@Override
public void setCommandStr(String commandStr, String commandUsage) {
super.setCommandStr(commandStr, commandUsage);
}

@Override
public void runCommand() {

ServerLogger.info("自定义命令执行成功");

super.runCommand();
}
}
自定义监听器
package net.fap.beecloud.example;

import net.fap.beecloud.console.ServerLogger;
import net.fap.beecloud.event.Event;
import net.fap.beecloud.event.Listener;
import net.fap.beecloud.event.player.PlayerJoinEvent;

/**
* 自定义监听器类
* 用于监听服务器事件
*/

public class MyListener implements Listener {

public void call(Event event)
{
if (event instanceof PlayerJoinEvent)
{
SynapsePlayer player = SynapsePlayer.getPlayer(((PlayerJoinEvent) event).getPlayer());
player.sendMessage("§c欢迎来到我们服务器!!!");
player.sendTitle("§c生存服务器","§b大区1",2,200,2);
}
}

}
Author
catrainbow
Downloads
111
Views
366
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from catrainbow

Latest updates

  1. Support the newest BeeCloud Proxy

    InventoryPacket Permission
  2. Support the newest BeeCloud Proxy

    - CommandPacket - CommandRegisterPacket - BeeCloud Plugin Command API
  3. Supoort the newest BeeCloud Proxy

    Supoort

Latest reviews

A new attempt to build a group server!Although it's not perfect, I still believe in the capabilities of CAT and hope to use the perfect Beecloud soon.
Top