javadocs again

This commit is contained in:
Draycia committed 2021-05-11 23:16:02 -07:00
1 parent ab23703b4a
commit c26938a63c
5 files changed
+17 -1

No files matched your search

@@ -28,6 +28,8 @@ public class CarbonChatEvent extends CancellableCarbonEvent {
}
/**
* The renderer used to construct components for each player in recipients.
*
* @return The per-player component renderer.
*/
public @NonNull PlayerComponentRenderer renderer() {
@@ -37,6 +39,7 @@ public class CarbonChatEvent extends CancellableCarbonEvent {
/**
* The players that will receive the message.
* List is mutable and players may be added/removed.
*
* @return The players that will receive this message.
*/
public @NonNull List<@NonNull CarbonPlayer> recipients() {
@@ -11,18 +11,24 @@ import java.util.UUID;
public interface CarbonPlayer extends Audience, Identified {
/**
* Gets the player's username.
*
* @return The player's username.
*/
@NonNull String username();
/**
* @return The player's display name, shown in places like chat and tab menu.
* Gets the player's display name, shown in places like chat and tab menu.
*
* @return The player's display name.
*/
@NonNull Component displayName();
void displayName(final @Nullable Component displayName);
/**
* Gets the player's UUID.
*
* @return The player's UUID.
*/
@NonNull UUID uuid();
@@ -9,14 +9,18 @@ public interface UserManager {
/**
* Loads and returns a {@link CarbonPlayer} with the given {@link UUID}.
*
* @param uuid The player's UUID.
*
* @return The {@link CarbonPlayer}, or null if the player doesn't exist.
*/
@Nullable CarbonPlayer carbonPlayer(final @NonNull UUID uuid);
/**
* Loads and returns a {@link CarbonPlayer} with the given username.
*
* @param username The player's username.
*
* @return The {@link CarbonPlayer}, or null if the player doesn't exist.
*/
@Nullable CarbonPlayer carbonPlayer(final @NonNull String username);
@@ -5,6 +5,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
/**
* An extension of the DefaultedRegistryGetter that declares a defaultValue method
*
* @param <K> the key type
* @param <V> the value type
*/
@@ -10,9 +10,11 @@ public interface PlayerComponentRenderer {
/**
* Renders a Component for the specified recipient.
*
* @param sender The player that sent the message.
* @param recipient The player receiving the message.
* @param message The message being sent.
*
* @return The component to be shown to the recipient,
* or null if the recipient should not receive the message.
*/