|
@@ -105,4 +105,40 @@ public final class ChatAPI {
|
|
|
public static boolean isUsingAdminChat(String playerName) {
|
|
|
return UserManager.getPlayer(playerName).getAdminChatMode();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Toggle the party chat mode of a player.
|
|
|
+ *
|
|
|
+ * @param player The player to toggle party chat on.
|
|
|
+ */
|
|
|
+ public static void togglePartyChat(Player player) {
|
|
|
+ togglePartyChat(player.getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Toggle the party chat mode of a player.
|
|
|
+ *
|
|
|
+ * @param playerName The name of the player to toggle party chat on.
|
|
|
+ */
|
|
|
+ public static void togglePartyChat(String playerName) {
|
|
|
+ UserManager.getPlayer(playerName).setPartyChat(!isUsingPartyChat(playerName));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Toggle the admin chat mode of a player.
|
|
|
+ *
|
|
|
+ * @param player The player to toggle admin chat on.
|
|
|
+ */
|
|
|
+ public static void toggleAdminChat(Player player) {
|
|
|
+ toggleAdminChat(player.getName());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Toggle the admin chat mode of a player.
|
|
|
+ *
|
|
|
+ * @param playerName The name of the player to toggle party chat on.
|
|
|
+ */
|
|
|
+ public static void toggleAdminChat(String playerName){
|
|
|
+ UserManager.getPlayer(playerName).setAdminChat(!isUsingAdminChat(playerName));
|
|
|
+ }
|
|
|
}
|