Package me.totalfreedom.utils.logging
Class FreedomLogger
java.lang.Object
me.totalfreedom.utils.logging.FreedomLogger
- All Implemented Interfaces:
net.kyori.adventure.audience.Audience,net.kyori.adventure.pointer.Pointered
-
Method Summary
Modifier and TypeMethodDescriptionvoidThis method allows you to log a debug message to the console.net.kyori.adventure.text.ComponentThis method allows you to log a debug message to the console, while also returning a Component that could be used to message a player.debugComponent(Supplier<net.kyori.adventure.text.Component> component) This method allows you to log a debug component to the console, while also returning a String representation of the debug component.debugComponent(net.kyori.adventure.text.Component component) This method allows you to log a debug component to the console.voidThis method logs an error message to the console.voidThis method allows you to log an exception directly to the console.net.kyori.adventure.text.ComponentThis method allows you to log an error message to the console, while also returning a Component that could be used to message a player.errorComponent(Supplier<net.kyori.adventure.text.Component> component) This method allows you to log an error component to the console, while also returning a String representation of the error component.errorComponent(net.kyori.adventure.text.Component component) This method logs an error component to the console.static FreedomLoggervoidThis method allows you to log a message to the console.net.kyori.adventure.text.ComponentThis method allows you to log a message to the console, while also returning a Component that could be used to message a player.infoComponent(Supplier<net.kyori.adventure.text.Component> component) This method allows you to log a component to the console, while also returning a String representation of the componentinfoComponent(net.kyori.adventure.text.Component component) This method allows you to log a component to the console.voidsendMessage(@NotNull net.kyori.adventure.chat.SignedMessage signedMessage, @NotNull net.kyori.adventure.chat.ChatType.Bound boundChatType) voidsendMessage(@NotNull net.kyori.adventure.text.Component message) voidsendMessage(@NotNull net.kyori.adventure.text.ComponentLike message) voidsendMessage(@NotNull net.kyori.adventure.text.ComponentLike message, @NotNull net.kyori.adventure.chat.ChatType.Bound boundChatType) voidsendMessage(@NotNull net.kyori.adventure.text.Component message, @NotNull net.kyori.adventure.chat.ChatType.Bound boundChatType) voidsetDebugMode(boolean debug) voidThis method allows you to log a warning to the console.voidwarnComponent(net.kyori.adventure.text.Component component) This method allows you to log a warning to the console.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.audience.Audience
clearTitle, deleteMessage, deleteMessage, filterAudience, forEachAudience, hideBossBar, openBook, openBook, playSound, playSound, playSound, resetTitle, sendActionBar, sendActionBar, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendMessage, sendPlayerListFooter, sendPlayerListFooter, sendPlayerListHeader, sendPlayerListHeader, sendPlayerListHeaderAndFooter, sendPlayerListHeaderAndFooter, sendTitlePart, showBossBar, showTitle, stopSound, stopSoundMethods inherited from interface net.kyori.adventure.pointer.Pointered
get, getOrDefault, getOrDefaultFrom, pointers
-
Method Details
-
getLogger
-
setDebugMode
public void setDebugMode(boolean debug) -
info
This method allows you to log a message to the console, while also returning a Component that could be used to message a player.- Parameters:
message- The message to send.- Returns:
- A component representation of the message.
-
infoComponent
This method allows you to log a component to the console, while also returning a String representation of the component- Parameters:
component- The component to send.- Returns:
- A string representation of the message.
-
infoComponent
This method allows you to log a component to the console.- Parameters:
component- The component to send.- Returns:
- A plain text representation of the message
-
info
This method allows you to log a message to the console.- Parameters:
message- The message to send.
-
warn
This method allows you to log a warning to the console.- Parameters:
message- The message to send.
-
warnComponent
public void warnComponent(net.kyori.adventure.text.Component component) This method allows you to log a warning to the console.- Parameters:
component- The component to send.
-
error
This method logs an error message to the console. It is highly recommended to deconstruct the stack trace and pass it in a more readable format to this method.- Parameters:
message- The message to send.
-
error
This method allows you to log an exception directly to the console.- Parameters:
th- The exception to log.
-
error
This method allows you to log an error message to the console, while also returning a Component that could be used to message a player. It is highly recommended that you deconstruct and limit the stack trace before passing it to this method, if you are intending to use it for player communication.- Parameters:
message- The message to send.- Returns:
- A component representation of the message.
-
errorComponent
This method allows you to log an error component to the console, while also returning a String representation of the error component.- Parameters:
component- The component to send.- Returns:
- A String representation of the component.
-
errorComponent
This method logs an error component to the console.- Parameters:
component- The message to send.
-
debug
This method allows you to log a debug message to the console, while also returning a Component that could be used to message a player. This method will only log if debug mode is enabled. If debug mode is not enabled, this method will return an empty component.- Parameters:
message- The message to send.- Returns:
- A component representation of the message.
-
debugComponent
This method allows you to log a debug component to the console, while also returning a String representation of the debug component.- Parameters:
component- The component to send.- Returns:
- A String representation of the message.
-
debugComponent
This method allows you to log a debug component to the console. This method will only log if debug mode is enabled.- Parameters:
component- The component to send.
-
debug
This method allows you to log a debug message to the console. This method will only log if debug mode is enabled.- Parameters:
message- The message to send.
-
sendMessage
public void sendMessage(@NotNull @NotNull net.kyori.adventure.text.ComponentLike message) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience
-
sendMessage
public void sendMessage(@NotNull @NotNull net.kyori.adventure.text.Component message) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience
-
sendMessage
public void sendMessage(@NotNull @NotNull net.kyori.adventure.text.Component message, @NotNull net.kyori.adventure.chat.ChatType.Bound boundChatType) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience
-
sendMessage
public void sendMessage(@NotNull @NotNull net.kyori.adventure.text.ComponentLike message, @NotNull net.kyori.adventure.chat.ChatType.Bound boundChatType) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience
-
sendMessage
public void sendMessage(@NotNull @NotNull net.kyori.adventure.chat.SignedMessage signedMessage, @NotNull net.kyori.adventure.chat.ChatType.Bound boundChatType) - Specified by:
sendMessagein interfacenet.kyori.adventure.audience.Audience
-