Skip to content

MessagingManager

DarthBoomerPlay edited this page Apr 13, 2020 · 1 revision

MessagingManager

This utility helps to work with bungeecord messages.
Version Support: 1.8 - 1.15.1

public void redirectPlayer(Player player, String server) // teleport player to server

public void sendMessage(String playerName, String message) // send message

public List<String> getOnlinePlayers(String server) // get online players

public int getOnlineCount(String server) // get online count

public void kickProxyPlayer(String playerName, String reason) // kick player

public int getOnlineSection(String section) // PLAYERBALANCER ADDON: get online section

//
// Example of usage:
//

DCore.getMessagingManager().redirectPlayer(player, "beta");
int online = DCore.getMessagingManager().getOnlineCount("ALL");
if(online >= 200) {
     DCore.getMessagingManager().kickProxyPlayer(player.getName(), "Server is full!");
}
Clone this wiki locally