public class BeansLogger extends Object
| Constructor and Description |
|---|
BeansLogger(BeansLib lib) |
| Modifier and Type | Method and Description |
|---|---|
void |
doLog(org.bukkit.command.CommandSender sender,
String... lines)
Sends requested information to a
CommandSender using the plugin's
logger and its prefix. |
void |
doLog(String... lines)
Sends requested information to a
CommandSender using the plugin's
logger and its prefix. |
void |
mixLog(org.bukkit.command.CommandSender sender,
String... lines)
Sends information choosing which of the two main methods will be used in each line.
|
void |
mixLog(String... lines)
Sends information choosing which of the two main methods will be used in each line.
|
void |
playerLog(org.bukkit.entity.Player player,
String... lines)
Sends information to a player using the
MessageSender object. |
void |
rawLog(String... lines)
Sends requested information using
Bukkit.getLogger() to the console,
avoiding the plugin prefix. |
public BeansLogger(BeansLib lib)
public void playerLog(org.bukkit.entity.Player player,
String... lines)
MessageSender object.player - a valid playerlines - the information to sendpublic void rawLog(String... lines)
Bukkit.getLogger() to the console,
avoiding the plugin prefix.lines - the information to sendpublic void doLog(org.bukkit.command.CommandSender sender,
String... lines)
CommandSender using the plugin's
logger and its prefix.
If the sender is a Player and it's not null, it will also send
the information to the player using playerLog(Player, String...).
sender - a valid sender, can be the console, a player or nulllines - the information to sendNullPointerException - if the plugin is nullpublic void doLog(String... lines)
CommandSender using the plugin's
logger and its prefix.lines - the information to sendNullPointerException - if the plugin is nullpublic void mixLog(org.bukkit.command.CommandSender sender,
String... lines)
rawLog, doLog)
If the line does not start with a boolean value or that value is false,
it will use the doLog method, otherwise
will use the rawLog method.
"My information for the console" >> // Uses "doLog"
"true::My basic log information" >> // Uses "rawLog"
"false::Some plugin's information" >> // Uses "doLog"
"" or null >> // Uses "doLog", 'cause is empty/null
sender - a valid sender, can be the console, a player or nulllines - the information to sendpublic void mixLog(String... lines)
rawLog, doLog)
If the line does not start with a boolean value or that value is false,
it will use the doLog method, otherwise will use the
rawLog method.
"My information for the console" >> // Uses "doLog"
"true::My basic log information" >> // Uses "rawLog"
"false::Some plugin's information" >> // Uses "doLog"
"" or null >> // Uses "doLog", 'cause is empty/null
lines - the information to sendCopyright © 2023. All rights reserved.