mcMMO/src/main/java/com/gmail/nossr50/api/ChatAPI.java

34 lines
1010 B
Java
Raw Normal View History

package com.gmail.nossr50.api;
import com.gmail.nossr50.party.PartyManager;
import com.gmail.nossr50.util.ChatManager;
2012-06-06 22:03:15 +02:00
public final class ChatAPI {
private ChatAPI() {}
/**
* Send a message to all members of a party
* </br>
* This function is designed for API usage.
*
* @param sender The name of the sender to display in the chat
* @param party The name of the party to send to
* @param message The message to send
*/
2012-06-06 22:03:15 +02:00
public static void sendPartyChat(String sender, String party, String message) {
2013-01-26 23:01:55 +01:00
ChatManager.handlePartyChat(PartyManager.getParty(party), sender, message);
}
/**
* Send a message to administrators
* </br>
* This function is designed for API usage.
*
* @param sender The name of the sender to display in the chat
* @param message The message to send
*/
2012-06-06 22:03:15 +02:00
public static void sendAdminChat(String sender, String message) {
2013-01-26 23:01:55 +01:00
ChatManager.handleAdminChat(sender, message);
}
}