|
@@ -1,5 +1,7 @@
|
|
package com.gmail.nossr50.api;
|
|
package com.gmail.nossr50.api;
|
|
|
|
|
|
|
|
+import org.bukkit.plugin.Plugin;
|
|
|
|
+
|
|
import com.gmail.nossr50.party.PartyManager;
|
|
import com.gmail.nossr50.party.PartyManager;
|
|
import com.gmail.nossr50.util.ChatManager;
|
|
import com.gmail.nossr50.util.ChatManager;
|
|
|
|
|
|
@@ -11,10 +13,27 @@ public final class ChatAPI {
|
|
* </br>
|
|
* </br>
|
|
* This function is designed for API usage.
|
|
* This function is designed for API usage.
|
|
*
|
|
*
|
|
|
|
+ * @param plugin The plugin sending the message
|
|
|
|
+ * @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
|
|
|
|
+ */
|
|
|
|
+ public static void sendPartyChat(Plugin plugin, String sender, String party, String message) {
|
|
|
|
+ ChatManager.handlePartyChat(plugin, PartyManager.getParty(party), sender, message);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Send a message to all members of a party
|
|
|
|
+ * </br>
|
|
|
|
+ * This function is designed for API usage.
|
|
|
|
+ *
|
|
|
|
+ * @deprecated Replaced by sendPartyChat(Plugin, String, String, String)
|
|
|
|
+ *
|
|
* @param sender The name of the sender to display in the chat
|
|
* @param sender The name of the sender to display in the chat
|
|
* @param party The name of the party to send to
|
|
* @param party The name of the party to send to
|
|
* @param message The message to send
|
|
* @param message The message to send
|
|
*/
|
|
*/
|
|
|
|
+ @Deprecated
|
|
public static void sendPartyChat(String sender, String party, String message) {
|
|
public static void sendPartyChat(String sender, String party, String message) {
|
|
ChatManager.handlePartyChat(PartyManager.getParty(party), sender, message);
|
|
ChatManager.handlePartyChat(PartyManager.getParty(party), sender, message);
|
|
}
|
|
}
|
|
@@ -24,9 +43,25 @@ public final class ChatAPI {
|
|
* </br>
|
|
* </br>
|
|
* This function is designed for API usage.
|
|
* This function is designed for API usage.
|
|
*
|
|
*
|
|
|
|
+ * @param plugin The plugin sending the message
|
|
|
|
+ * @param sender The name of the sender to display in the chat
|
|
|
|
+ * @param message The message to send
|
|
|
|
+ */
|
|
|
|
+ public static void sendAdminChat(Plugin plugin, String sender, String message) {
|
|
|
|
+ ChatManager.handleAdminChat(plugin, sender, message);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Send a message to administrators
|
|
|
|
+ * </br>
|
|
|
|
+ * This function is designed for API usage.
|
|
|
|
+ *
|
|
|
|
+ * @deprecated Replaced by sendAdminChat(Plugin, String, String)
|
|
|
|
+ *
|
|
* @param sender The name of the sender to display in the chat
|
|
* @param sender The name of the sender to display in the chat
|
|
* @param message The message to send
|
|
* @param message The message to send
|
|
*/
|
|
*/
|
|
|
|
+ @Deprecated
|
|
public static void sendAdminChat(String sender, String message) {
|
|
public static void sendAdminChat(String sender, String message) {
|
|
ChatManager.handleAdminChat(sender, message);
|
|
ChatManager.handleAdminChat(sender, message);
|
|
}
|
|
}
|