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

38 lines
1.2 KiB
Java
Raw Normal View History

package com.gmail.nossr50.api;
import com.gmail.nossr50.mcMMO;
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) {
ChatManager chatManager = new ChatManager(mcMMO.p, sender, message);
chatManager.handlePartyChat(PartyManager.getInstance().getParty(party));
}
/**
* 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) {
ChatManager chatManager = new ChatManager(mcMMO.p, sender, message);
chatManager.handleAdminChat();
}
}