所以我试图派球员,当他们键入大厅服务器“/大堂”通过使用此代码:通过蹦极
Bukkit.getServer().dispatchCommand((Player) player, "server lobby");
但在比赛中,则返回“未知命令。输入“/ help”寻求帮助。“ 我也看到了尝试这种代码,但我不知道要放什么东西来代替“A”,“B”和“C”
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("a");
out.writeUTF("b");
//applies to the player you send it to. aka Kick To Server.
Player player = Bukkit.getPlayerExact("c");
player.sendPluginMessage(this, "BungeeCord", out.toByteArray());
所以我的问题是,为什么不第一方法不起作用?另外,你如何使第二个解决方案的工作?我需要在蹦极服务器上放置代码吗?