Class Chat
java.lang.Object
studio.magemonkey.codex.mccore.chat.Chat
Main helper method for the chat resources including accessing
player data and sending messages to target groups
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearPluginPrefixes(String pluginName) Clears the plugin prefix for all playersstatic ChatDatagetPlayerData(String playerName) Retrieves the player with the given namestatic voidremovePrefix(String pluginName, String prefix) Removes the prefix for all playersstatic voidsendMessage(String permission, String message) Sends a message to all players with the given permissionstatic voidsendMessage(org.bukkit.Location center, int radius, boolean sphere, String message) Sends a message to all players within the defined sphere or cylinderstatic voidsendMessage(org.bukkit.Location point, int width, int height, int depth, String message) Sends a message to all players within the defined cuboidstatic voidsendMessage(org.bukkit.Location point1, org.bukkit.Location point2, String message) Sends a message to all players within the defined cuboidstatic voidunlockPrefix(Prefix prefix, boolean apply) Unlocks the prefix for all players
-
Constructor Details
-
Chat
public Chat()
-
-
Method Details
-
getPlayerData
Retrieves the player with the given name- Parameters:
playerName- name of the player- Returns:
- chat data associated with the player
-
unlockPrefix
Unlocks the prefix for all players- Parameters:
prefix- the prefix to unlockapply- whether or not to automatically apply it
-
removePrefix
Removes the prefix for all players- Parameters:
pluginName- name of the plugin with the prefixprefix- the text of the prefix (with or without color)
-
clearPluginPrefixes
Clears the plugin prefix for all players- Parameters:
pluginName- name of the plugin with the prefix
-
sendMessage
Sends a message to all players with the given permission- Parameters:
permission- permission required to get the messagemessage- message to send
-
sendMessage
public static void sendMessage(org.bukkit.Location point1, org.bukkit.Location point2, String message) Sends a message to all players within the defined cuboid- Parameters:
point1- the first pointpoint2- the second pointmessage- the message to be sent
-
sendMessage
public static void sendMessage(org.bukkit.Location point, int width, int height, int depth, String message) Sends a message to all players within the defined cuboid- Parameters:
point- the initial pointwidth- width of the cuboid (x direction)height- height of the cuboid (y direction)depth- depth of the cuboid (z direction)message- message to be sent
-
sendMessage
public static void sendMessage(org.bukkit.Location center, int radius, boolean sphere, String message) Sends a message to all players within the defined sphere or cylinder- Parameters:
center- the center of the regionradius- radius of the sphere/cylindersphere- sphere if true, cylinder if false (cylinder contains all y within the defined circle)
-