Package dev.selena.luacore.utils.text
Class LuaMessageUtils
java.lang.Object
dev.selena.luacore.utils.text.ContentUtils
dev.selena.luacore.utils.text.LuaMessageUtils
Used for sending messages to both console and users
NOTE: ALL VERBOSE METHODS NEED
NOTE: ALL VERBOSE METHODS NEED
LuaCore.setVerbose(boolean) SET TO TRUE-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidSends a message to all online players.
NOTE: Any PAPI placeholders that are tied to a player will use the player its sent to.
If you would like PAPI to use the player who triggered it, please useannounce(Player, String...)static voidSends a message to all online players and uses the trigger Player for PAPI placeholders
If you would like PAPI to use the player who its being sent to, please useannounce(Object...)static voidannounceTo(Iterable<org.bukkit.entity.Player> players, String... message) Used for announcing a message to a series of players.
Each player will get the message with their own PAPI placeholdersstatic voidannounceTo(org.bukkit.entity.Player[] players, String... message) Used for announcing a message to a series of players.
Each player will get the message with their own PAPI placeholdersstatic voidannounceTo(org.bukkit.entity.Player trigger, Iterable<org.bukkit.entity.Player> players, String... message) Used for announcing a message to a series of players.static voidannounceTo(org.bukkit.entity.Player trigger, org.bukkit.entity.Player[] players, String... message) Used for announcing a message to a series of players.static voidconsoleError(Object content) Used for sending an error to the console.
This method usesCoreLogger.log(Level, String)onLevel.SEVEREstatic voidconsoleSend(Object content) Used for sending messages to the console.
This method usesCoreLogger.log(Level, String)onLevel.INFOstatic voidconsoleWarn(Object content) Used for sending a warning to the console.
This method usesCoreLogger.log(Level, String)onLevel.WARNINGstatic StringgetTrace(int traceIndex) Used for getting the call tracestatic <T> voidDumps a Java class to console
NOTE: THIS IS A VERBOSE METHOD AND NEEDSLuaCore.setVerbose(boolean)SET TO TRUEstatic <T> voidDumps a Java class to console
NOTE: THIS IS A VERBOSE METHOD AND NEEDSLuaCore.setVerbose(boolean)SET TO TRUEstatic <T> voidjson_dump(T cls) Dumps a Java class to console
NOTE: THIS IS A VERBOSE METHOD AND NEEDSLuaCore.setVerbose(boolean)SET TO TRUEstatic <T> voidDumps a Java class to console
NOTE: THIS IS A VERBOSE METHOD AND NEEDSLuaCore.setVerbose(boolean)SET TO TRUEstatic voidplayerSend(org.bukkit.entity.Player player, Object content) Sends a message to a Playerstatic voidplayerSend(org.bukkit.entity.Player player, Object... content) Sends a series of messages to a Playerstatic voidplayerSend(org.bukkit.entity.Player player, String content) Sends a message to a Playerstatic voidplayerSend(org.bukkit.entity.Player player, String... content) Sends a series of messages to a Playerstatic voidSends a series of messages to a CommandSenderstatic voidverboseError(String error) Used for sending a debug error to the console.
ifLuaCore.setDefaultErrorTrace(boolean)is set to true the call trace will be includedstatic voidverboseMessage(String message) Used for sending a debug message to the console.
ifLuaCore.setDefaultMessageTrace(boolean)is set to true the call trace will be includedstatic voidverbosePlayerSend(org.bukkit.entity.Player player, String content) Used for sending a debug message to a playerstatic voidverbosePlayerSend(org.bukkit.entity.Player player, String... content) Used for sending a series of debug messages to a playerstatic voidverboseSender(org.bukkit.command.CommandSender sender, String... content) Used for sending a series of debug messages to a CommandSenderstatic voidverboseTracedError(String error) Used for sending a debug error to the console with call trace
Example output: package.name.ClassName:methodName:lineNumber -> errorstatic voidverboseTracedMessage(String message) Used for sending a debug message to the console with call trace
Example output: package.name.ClassName:methodName:lineNumber -> messagestatic voidverboseTracedWarn(String warning) Used for sending a debug warning to the console with call trace
Example output: package.name.ClassName:methodName:lineNumber -> warningstatic voidverboseWarn(String warning) Used for sending a debug warning to the console.
ifLuaCore.setDefaultWarnTrace(boolean)is set to true the call trace will be includedMethods inherited from class dev.selena.luacore.utils.text.ContentUtils
capsFirst, color, colorArray, colorArray, colorList
-
Constructor Details
-
LuaMessageUtils
public LuaMessageUtils()
-
-
Method Details
-
json_dump
public static <T> void json_dump(T cls) Dumps a Java class to console
NOTE: THIS IS A VERBOSE METHOD AND NEEDSLuaCore.setVerbose(boolean)SET TO TRUE- Parameters:
cls- The Class instance you want to dump to console- See Also:
-
json_dump
Dumps a Java class to console
NOTE: THIS IS A VERBOSE METHOD AND NEEDSLuaCore.setVerbose(boolean)SET TO TRUE- Parameters:
cls- The Class instance you want to dump to console- See Also:
-
json_dump
Dumps a Java class to console
NOTE: THIS IS A VERBOSE METHOD AND NEEDSLuaCore.setVerbose(boolean)SET TO TRUE- Parameters:
prefix- The prefix you want to add before the json dumpcls- The Class instance you want to dump to console- See Also:
-
json_dump
Dumps a Java class to console
NOTE: THIS IS A VERBOSE METHOD AND NEEDSLuaCore.setVerbose(boolean)SET TO TRUE- Parameters:
prefix- The prefix you want to add before the json dumpcls- The Class instance you want to dump to consoletype- The type of the class you want to dump- See Also:
-
consoleSend
Used for sending messages to the console.
This method usesCoreLogger.log(Level, String)onLevel.INFO- Parameters:
content- The message you want to send to the console- See Also:
-
consoleWarn
Used for sending a warning to the console.
This method usesCoreLogger.log(Level, String)onLevel.WARNING- Parameters:
content- The warning message you want to send to the console- See Also:
-
consoleError
Used for sending an error to the console.
This method usesCoreLogger.log(Level, String)onLevel.SEVERE- Parameters:
content- The error message you want to send to the console- See Also:
-
playerSend
Sends a series of messages to a Player- Parameters:
player- The Player you want to send the messages tocontent- The messages you want to send to the Player- See Also:
-
playerSend
Sends a series of messages to a Player- Parameters:
player- The Player you want to send the messages tocontent- The messages you want to send to the Player- See Also:
-
playerSend
Sends a message to a Player- Parameters:
player- The Player you want to send the message tocontent- The message you want to send to the Player- See Also:
-
playerSend
Sends a message to a Player- Parameters:
player- The Player you want to send the message tocontent- The message you want to send to the Player- See Also:
-
sender
Sends a series of messages to a CommandSender- Parameters:
sender- The CommandSender you want to send the messages tocontent- The messages you want to send to the CommandSender- See Also:
-
announce
Sends a message to all online players.
NOTE: Any PAPI placeholders that are tied to a player will use the player its sent to.
If you would like PAPI to use the player who triggered it, please useannounce(Player, String...)- Parameters:
message- The message you want to send to all players.- See Also:
-
announce
Sends a message to all online players and uses the trigger Player for PAPI placeholders
If you would like PAPI to use the player who its being sent to, please useannounce(Object...)- Parameters:
trigger- The Player who triggered thismessage- The message you want to send to all players.
-
announceTo
public static void announceTo(org.bukkit.entity.Player trigger, org.bukkit.entity.Player[] players, String... message) Used for announcing a message to a series of players.- Parameters:
trigger- The player that triggered it for placeholders (It will be the player used for PAPI placeholders)players- The array of players you want to send the announcement tomessage- The message you want to send to the players.
-
announceTo
public static void announceTo(org.bukkit.entity.Player trigger, Iterable<org.bukkit.entity.Player> players, String... message) Used for announcing a message to a series of players.- Parameters:
trigger- The player that triggered it for placeholders (It will be the player used for PAPI placeholders)players- The iterable of players you want to send the announcement tomessage- The message you want to send to the players.
-
announceTo
Used for announcing a message to a series of players.
Each player will get the message with their own PAPI placeholders- Parameters:
players- The array of players you want to send the announcement tomessage- The message you want to send to the players.
-
announceTo
Used for announcing a message to a series of players.
Each player will get the message with their own PAPI placeholders- Parameters:
players- The iterable of players you want to send the announcement tomessage- The message you want to send to the players.
-
verboseTracedWarn
Used for sending a debug warning to the console with call trace
Example output: package.name.ClassName:methodName:lineNumber -> warning- Parameters:
warning- The warning message you want to send- See Also:
-
verboseWarn
Used for sending a debug warning to the console.
ifLuaCore.setDefaultWarnTrace(boolean)is set to true the call trace will be included- Parameters:
warning- The warning you want to send- See Also:
-
verboseTracedError
Used for sending a debug error to the console with call trace
Example output: package.name.ClassName:methodName:lineNumber -> error- Parameters:
error- The error message you want to send- See Also:
-
verboseError
Used for sending a debug error to the console.
ifLuaCore.setDefaultErrorTrace(boolean)is set to true the call trace will be included- Parameters:
error- The error you error to send- See Also:
-
verboseTracedMessage
Used for sending a debug message to the console with call trace
Example output: package.name.ClassName:methodName:lineNumber -> message- Parameters:
message- The message you want to send- See Also:
-
verboseMessage
Used for sending a debug message to the console.
ifLuaCore.setDefaultMessageTrace(boolean)is set to true the call trace will be included- Parameters:
message- The message you want to send- See Also:
-
verbosePlayerSend
Used for sending a series of debug messages to a player- Parameters:
player- The Player you want to send the messages tocontent- Array of messages you want to send to the Player- See Also:
-
verbosePlayerSend
Used for sending a debug message to a player- Parameters:
player- The Player you want to send the message tocontent- The message you want to send to the player- See Also:
-
verboseSender
Used for sending a series of debug messages to a CommandSender- Parameters:
sender- The CommandSendercontent- The array of messages you want to send the CommandSender- See Also:
-
getTrace
Used for getting the call trace- Parameters:
traceIndex- What trace index you want
NOTE: TheThread.getStackTrace()will be the 0th trace index and this method will be the 1st trace index so start at the 2nd index- Returns:
- The call trace in the format of 'package.name.ClassName:methodName:lineNumber'
-