|
@@ -1,7 +1,7 @@
|
|
|
package com.gmail.nossr50.api;
|
|
|
|
|
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
|
|
-import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|
|
+import com.neetgames.mcmmo.player.OnlineMMOPlayer;
|
|
|
import com.gmail.nossr50.mcMMO;
|
|
|
import org.bukkit.entity.Player;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
@@ -16,11 +16,11 @@ public final class ChatAPI {
|
|
|
*
|
|
|
* @param player target player
|
|
|
* @return true if the player is targeting the party chat channel
|
|
|
- * @deprecated Use {@link #isUsingPartyChat(McMMOPlayer)} instead
|
|
|
+ * @deprecated Use {@link #isUsingPartyChat(OnlineMMOPlayer)} instead
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static boolean isUsingPartyChat(@NotNull Player player) {
|
|
|
- McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
|
|
+ OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
|
|
|
|
|
if(mmoPlayer != null)
|
|
|
return mmoPlayer.getChatChannel() == ChatChannel.PARTY;
|
|
@@ -29,12 +29,12 @@ public final class ChatAPI {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Check if a {@link McMMOPlayer} is in the Party chat channel
|
|
|
+ * Check if a {@link OnlineMMOPlayer} is in the Party chat channel
|
|
|
*
|
|
|
* @param mmoPlayer target player
|
|
|
* @return true if the player is targeting the party chat channel
|
|
|
*/
|
|
|
- public static boolean isUsingPartyChat(@NotNull McMMOPlayer mmoPlayer) {
|
|
|
+ public static boolean isUsingPartyChat(@NotNull OnlineMMOPlayer mmoPlayer) {
|
|
|
return mmoPlayer.getChatChannel() == ChatChannel.PARTY;
|
|
|
}
|
|
|
|
|
@@ -43,7 +43,7 @@ public final class ChatAPI {
|
|
|
*
|
|
|
* @param playerName The name of the player to check
|
|
|
* @return true if the player is using party chat, false otherwise
|
|
|
- * @deprecated use {@link #isUsingPartyChat(McMMOPlayer)} instead for performance reasons
|
|
|
+ * @deprecated use {@link #isUsingPartyChat(OnlineMMOPlayer)} instead for performance reasons
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static boolean isUsingPartyChat(String playerName) {
|
|
@@ -59,11 +59,11 @@ public final class ChatAPI {
|
|
|
*
|
|
|
* @param player target player
|
|
|
* @return true if the player is targeting the admin chat channel
|
|
|
- * @deprecated Use {@link #isUsingAdminChat(McMMOPlayer)} instead
|
|
|
+ * @deprecated Use {@link #isUsingAdminChat(OnlineMMOPlayer)} instead
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static boolean isUsingAdminChat(@NotNull Player player) {
|
|
|
- McMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
|
|
+ OnlineMMOPlayer mmoPlayer = mcMMO.getUserManager().queryPlayer(player);
|
|
|
|
|
|
if(mmoPlayer != null)
|
|
|
return mmoPlayer.getChatChannel() == ChatChannel.ADMIN;
|
|
@@ -72,12 +72,12 @@ public final class ChatAPI {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Check if a {@link McMMOPlayer} is in the Admin chat channel
|
|
|
+ * Check if a {@link OnlineMMOPlayer} is in the Admin chat channel
|
|
|
*
|
|
|
* @param mmoPlayer target player
|
|
|
* @return true if the player is targeting the admin chat channel
|
|
|
*/
|
|
|
- public static boolean isUsingAdminChat(@NotNull McMMOPlayer mmoPlayer) {
|
|
|
+ public static boolean isUsingAdminChat(@NotNull OnlineMMOPlayer mmoPlayer) {
|
|
|
return mmoPlayer.getChatChannel() == ChatChannel.ADMIN;
|
|
|
}
|
|
|
|
|
@@ -86,7 +86,7 @@ public final class ChatAPI {
|
|
|
*
|
|
|
* @param playerName The name of the player to check
|
|
|
* @return true if the player is using admin chat, false otherwise
|
|
|
- * @deprecated use {@link #isUsingAdminChat(McMMOPlayer)} instead for performance reasons
|
|
|
+ * @deprecated use {@link #isUsingAdminChat(OnlineMMOPlayer)} instead for performance reasons
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static boolean isUsingAdminChat(String playerName) {
|
|
@@ -98,11 +98,11 @@ public final class ChatAPI {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Toggle the party chat channel of a {@link McMMOPlayer}
|
|
|
+ * Toggle the party chat channel of a {@link OnlineMMOPlayer}
|
|
|
*
|
|
|
* @param mmoPlayer The player to toggle party chat on.
|
|
|
*/
|
|
|
- public static void togglePartyChat(@NotNull McMMOPlayer mmoPlayer) {
|
|
|
+ public static void togglePartyChat(@NotNull OnlineMMOPlayer mmoPlayer) {
|
|
|
mcMMO.p.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.PARTY);
|
|
|
}
|
|
|
|
|
@@ -110,7 +110,7 @@ public final class ChatAPI {
|
|
|
* Toggle the party chat mode of a player.
|
|
|
*
|
|
|
* @param player The player to toggle party chat on.
|
|
|
- * @deprecated use {@link #togglePartyChat(McMMOPlayer)}
|
|
|
+ * @deprecated use {@link #togglePartyChat(OnlineMMOPlayer)}
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static void togglePartyChat(Player player) throws NullPointerException {
|
|
@@ -121,7 +121,7 @@ public final class ChatAPI {
|
|
|
* Toggle the party chat mode of a player.
|
|
|
*
|
|
|
* @param playerName The name of the player to toggle party chat on.
|
|
|
- * @deprecated Use {@link #togglePartyChat(McMMOPlayer)} instead
|
|
|
+ * @deprecated Use {@link #togglePartyChat(OnlineMMOPlayer)} instead
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static void togglePartyChat(String playerName) throws NullPointerException {
|
|
@@ -129,11 +129,11 @@ public final class ChatAPI {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Toggle the admin chat channel of a {@link McMMOPlayer}
|
|
|
+ * Toggle the admin chat channel of a {@link OnlineMMOPlayer}
|
|
|
*
|
|
|
* @param mmoPlayer The player to toggle admin chat on.
|
|
|
*/
|
|
|
- public static void toggleAdminChat(@NotNull McMMOPlayer mmoPlayer) {
|
|
|
+ public static void toggleAdminChat(@NotNull OnlineMMOPlayer mmoPlayer) {
|
|
|
mcMMO.p.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.ADMIN);
|
|
|
}
|
|
|
|
|
@@ -141,7 +141,7 @@ public final class ChatAPI {
|
|
|
* Toggle the admin chat mode of a player.
|
|
|
*
|
|
|
* @param player The player to toggle admin chat on.
|
|
|
- * @deprecated Use {@link #toggleAdminChat(McMMOPlayer)} instead
|
|
|
+ * @deprecated Use {@link #toggleAdminChat(OnlineMMOPlayer)} instead
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static void toggleAdminChat(Player player) throws NullPointerException {
|
|
@@ -152,7 +152,7 @@ public final class ChatAPI {
|
|
|
* Toggle the admin chat mode of a player.
|
|
|
*
|
|
|
* @param playerName The name of the player to toggle party chat on.
|
|
|
- * @deprecated Use {@link #toggleAdminChat(McMMOPlayer)} instead
|
|
|
+ * @deprecated Use {@link #toggleAdminChat(OnlineMMOPlayer)} instead
|
|
|
*/
|
|
|
@Deprecated
|
|
|
public static void toggleAdminChat(String playerName) throws NullPointerException {
|