diff --git a/src/main/java/net/thenextlvl/service/api/chat/ChatProfile.java b/src/main/java/net/thenextlvl/service/api/chat/ChatProfile.java index 602d248..2be26c9 100644 --- a/src/main/java/net/thenextlvl/service/api/chat/ChatProfile.java +++ b/src/main/java/net/thenextlvl/service/api/chat/ChatProfile.java @@ -1,6 +1,7 @@ package net.thenextlvl.service.api.chat; import net.thenextlvl.service.api.node.InfoNode; +import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Unmodifiable; import java.util.Optional; @@ -10,6 +11,14 @@ * The ChatProfile interface represents a chat profile for a user. */ public interface ChatProfile extends InfoNode { + /** + * Retrieves the display name associated with the chat profile. + * + * @return An Optional containing the display name of the chat profile. + * Returns an empty Optional if no display name is set. + */ + Optional getDisplayName(); + /** * Retrieves the name associated with the chat profile. * @@ -50,12 +59,20 @@ public interface ChatProfile extends InfoNode { @Unmodifiable Set getGroups(); + /** + * Sets the display name associated with the chat profile. + * + * @param displayName The display name to set for the chat profile, null to clear. + * @return true if the display name was successfully set, false otherwise. + */ + boolean setDisplayName(@Nullable String displayName); + /** * Sets the prefix associated with the chat profile. * * @param prefix The prefix to set for the chat profile. */ - default boolean setPrefix(String prefix) { + default boolean setPrefix(@Nullable String prefix) { return setPrefix(prefix, 0); } @@ -67,14 +84,14 @@ default boolean setPrefix(String prefix) { * @see ChatProfile#getPrefix() * @see ChatProfile#setPrefix(String) */ - boolean setPrefix(String prefix, int priority); + boolean setPrefix(@Nullable String prefix, int priority); /** * Sets the suffix associated with the chat profile. * * @param suffix The suffix to set for the chat profile. */ - default boolean setSuffix(String suffix) { + default boolean setSuffix(@Nullable String suffix) { return setSuffix(suffix, 0); } @@ -86,5 +103,5 @@ default boolean setSuffix(String suffix) { * @see ChatProfile#getSuffix() * @see ChatProfile#setSuffix(String) */ - boolean setSuffix(String suffix, int priority); + boolean setSuffix(@Nullable String suffix, int priority); }