mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 22:16:22 +00:00
don't persist temporary nicknames
This commit is contained in:
1 parent
3b1987b5a2
commit
f866157d97
5 files changed
+61
-3
No files matched your search
@@ -27,6 +27,13 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
*/
|
||||
String username();
|
||||
|
||||
/**
|
||||
* Checks if the player has a display name set through {@link CarbonPlayer#displayName(Component)}
|
||||
*
|
||||
* @return if the player has a display name set through {@link CarbonPlayer#displayName(Component)}
|
||||
*/
|
||||
boolean hasCustomDisplayName();
|
||||
|
||||
/**
|
||||
* Gets the player's display name, shown in places like chat and tab menu.
|
||||
*
|
||||
@@ -44,6 +51,17 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
*/
|
||||
void displayName(final @Nullable Component displayName);
|
||||
|
||||
/**
|
||||
* Temporarily sets the player's display name.<br>
|
||||
* Setting null is equivalent to setting the display name to the username.
|
||||
* If the player logs off or is otherwise disconnected from the server,
|
||||
* their temporary display name will be reset.
|
||||
*
|
||||
* @param displayName the new display name
|
||||
* @since 2.0.0
|
||||
*/
|
||||
void temporaryDisplayName(final @Nullable Component displayName);
|
||||
|
||||
/**
|
||||
* The player's UUID, often used for identification purposes.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user