📌  相关文章
📜  bukkit java 将播放器连接到 bungeecord 中的另一台服务器 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:30.188000             🧑  作者: Mango

代码示例1
//onEnable in Main class
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");

//When you want to connect the player
//"server" is the server name the player should connect to
//the variable "player" is the player you want to connect
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Connect");
out.writeUTF("server");
player.sendPluginMessage(main, "BungeeCord", out.toByteArray());