mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 14:38:49 +00:00
Update since tags
This commit is contained in:
16 files changed
+61
-61
No files matched your search
@@ -61,7 +61,7 @@ public interface CarbonChat {
|
||||
* The user manager.
|
||||
*
|
||||
* @return the user manager
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
UserManager<?> userManager();
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public interface ChannelRegistry {
|
||||
* <p>Registrations will persist when reloading Carbon's configuration.</p>
|
||||
*
|
||||
* @param channel the channel to register
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void register(ChatChannel channel);
|
||||
|
||||
@@ -49,7 +49,7 @@ public interface ChannelRegistry {
|
||||
*
|
||||
* @param key the channel's key
|
||||
* @return the channel
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@Nullable ChatChannel channel(Key key);
|
||||
|
||||
@@ -57,7 +57,7 @@ public interface ChannelRegistry {
|
||||
* Gets the key for the default channel.
|
||||
*
|
||||
* @return the default key
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@NonNull Key defaultKey();
|
||||
|
||||
@@ -65,7 +65,7 @@ public interface ChannelRegistry {
|
||||
* Gets the default channel.
|
||||
*
|
||||
* @return the default value
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@NonNull ChatChannel defaultChannel();
|
||||
|
||||
@@ -73,7 +73,7 @@ public interface ChannelRegistry {
|
||||
* Gets the list of registered channel keys.
|
||||
*
|
||||
* @return the registered channel keys
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@NonNull Set<Key> keys();
|
||||
|
||||
@@ -83,7 +83,7 @@ public interface ChannelRegistry {
|
||||
*
|
||||
* @param key the channel key
|
||||
* @return the channel, or the default one
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
ChatChannel channelOrDefault(Key key);
|
||||
|
||||
@@ -94,7 +94,7 @@ public interface ChannelRegistry {
|
||||
* @param key channel key
|
||||
* @return channel
|
||||
* @throws NoSuchElementException when no matching channel is found
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
ChatChannel channelOrThrow(Key key);
|
||||
|
||||
@@ -105,7 +105,7 @@ public interface ChannelRegistry {
|
||||
* <p>When new channels are registered, the action will be invoked again for each new channel.</p>
|
||||
*
|
||||
* @param action action
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void allKeys(Consumer<Key> action);
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ public interface ChatChannel extends Keyed, ChatComponentRenderer {
|
||||
* Return of '-1' means there is no radius.
|
||||
*
|
||||
* @return the channel radius
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
double radius();
|
||||
|
||||
@@ -124,7 +124,7 @@ public interface ChatChannel extends Keyed, ChatComponentRenderer {
|
||||
* If the empty receipt message should be sent to the sender.
|
||||
*
|
||||
* @return Returns true if the channel should display a message when a player is out of range.
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
boolean emptyRadiusRecipientsMessage();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ package net.draycia.carbon.api.event;
|
||||
/**
|
||||
* Marks an event as cancellable.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
public interface Cancellable {
|
||||
|
||||
@@ -30,7 +30,7 @@ public interface Cancellable {
|
||||
* Gets if the event is cancelled.
|
||||
*
|
||||
* @return if the event is cancelled
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
boolean cancelled();
|
||||
|
||||
@@ -38,7 +38,7 @@ public interface Cancellable {
|
||||
* Sets the cancelled state.
|
||||
*
|
||||
* @param cancelled new cancelled state
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void cancelled(boolean cancelled);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
* The {@link CarbonEventHandler} is responsible for managing {@link CarbonEventSubscription event subscriptions}
|
||||
* and emitting {@link CarbonEvent events}.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface CarbonEventHandler {
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
* An EventSubscriber.
|
||||
*
|
||||
* @param <T> CarbonEvent implementations
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface CarbonEventSubscriber<T extends CarbonEvent> {
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
* A subscription to a specific event type.
|
||||
*
|
||||
* @param <T> event type
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface CarbonEventSubscription<T extends CarbonEvent> {
|
||||
@@ -35,7 +35,7 @@ public interface CarbonEventSubscription<T extends CarbonEvent> {
|
||||
* Gets the event type.
|
||||
*
|
||||
* @return the event type
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Class<T> event();
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface CarbonEventSubscription<T extends CarbonEvent> {
|
||||
* Gets the {@link CarbonEventSubscriber subscriber}.
|
||||
*
|
||||
* @return the subscriber
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
CarbonEventSubscriber<T> subscriber();
|
||||
|
||||
@@ -52,7 +52,7 @@ public interface CarbonEventSubscription<T extends CarbonEvent> {
|
||||
*
|
||||
* <p>The subscriber held by this subscription will no longer receive events.</p>
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void dispose();
|
||||
|
||||
|
||||
+3
-3
@@ -35,7 +35,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
* is provided as a helper for when knowledge of all registered channels
|
||||
* is needed.</p>
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface CarbonChannelRegisterEvent extends CarbonEvent {
|
||||
@@ -44,7 +44,7 @@ public interface CarbonChannelRegisterEvent extends CarbonEvent {
|
||||
* Gets the channel registry.
|
||||
*
|
||||
* @return the channel registry
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
ChannelRegistry channelRegistry();
|
||||
|
||||
@@ -52,7 +52,7 @@ public interface CarbonChannelRegisterEvent extends CarbonEvent {
|
||||
* Gets the key(s) that were registered to trigger this event.
|
||||
*
|
||||
* @return key(s) registered
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Set<Key> registered();
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public interface CarbonChatEvent extends CarbonEvent, Cancellable {
|
||||
* If the message is being previewed by the player.
|
||||
*
|
||||
* @return if the message is being previewed
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@MonotonicNonNull SignedMessage signedMessage();
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
/**
|
||||
* Called whenever a player privately messages another player.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface CarbonPrivateChatEvent extends CarbonEvent, Cancellable {
|
||||
@@ -39,7 +39,7 @@ public interface CarbonPrivateChatEvent extends CarbonEvent, Cancellable {
|
||||
*
|
||||
* @param message the new message
|
||||
* @throws NullPointerException if message is null
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void message(Component message);
|
||||
|
||||
@@ -47,7 +47,7 @@ public interface CarbonPrivateChatEvent extends CarbonEvent, Cancellable {
|
||||
* The message that will be sent.
|
||||
*
|
||||
* @return the message
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Component message();
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface CarbonPrivateChatEvent extends CarbonEvent, Cancellable {
|
||||
* The message sender.
|
||||
*
|
||||
* @return the sender of the message
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
CarbonPlayer sender();
|
||||
|
||||
@@ -63,7 +63,7 @@ public interface CarbonPrivateChatEvent extends CarbonEvent, Cancellable {
|
||||
* The message recipient.
|
||||
*
|
||||
* @return the recipient of the message
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
CarbonPlayer recipient();
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
/**
|
||||
* Called when a player is added to a {@link Party}.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface PartyJoinEvent extends CarbonEvent {
|
||||
@@ -41,7 +41,7 @@ public interface PartyJoinEvent extends CarbonEvent {
|
||||
* especially if the change needs to propagate cross-server.</p>
|
||||
*
|
||||
* @return player id
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
UUID playerId();
|
||||
|
||||
@@ -51,7 +51,7 @@ public interface PartyJoinEvent extends CarbonEvent {
|
||||
* <p>{@link Party#members()} will reflect the new member.</p>
|
||||
*
|
||||
* @return party
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Party party();
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
/**
|
||||
* Called when a player is removed from a {@link Party}.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface PartyLeaveEvent extends CarbonEvent {
|
||||
@@ -41,7 +41,7 @@ public interface PartyLeaveEvent extends CarbonEvent {
|
||||
* especially if the change needs to propagate cross-server.</p>
|
||||
*
|
||||
* @return player id
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
UUID playerId();
|
||||
|
||||
@@ -51,7 +51,7 @@ public interface PartyLeaveEvent extends CarbonEvent {
|
||||
* <p>{@link Party#members()} will reflect the removed member.</p>
|
||||
*
|
||||
* @return party
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Party party();
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
*
|
||||
* @param other the other player
|
||||
* @return the distance from the other player, or -1
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
double distanceSquaredFrom(CarbonPlayer other);
|
||||
|
||||
@@ -56,7 +56,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
*
|
||||
* @param other the other player
|
||||
* @return if both players are in the same world/server
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
boolean sameWorldAs(CarbonPlayer other);
|
||||
|
||||
@@ -77,7 +77,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* the player's name may be returned.</p>
|
||||
*
|
||||
* @return the player's display name
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Component displayName();
|
||||
|
||||
@@ -89,7 +89,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* @return if the player has a nickname set
|
||||
* @see #nickname()
|
||||
* @see #nickname(Component)
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
boolean hasNickname();
|
||||
|
||||
@@ -102,7 +102,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* @see #hasNickname()
|
||||
* @see #nickname(Component)
|
||||
* @see #displayName()
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@Nullable Component nickname();
|
||||
|
||||
@@ -116,7 +116,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* @see #hasNickname()
|
||||
* @see #nickname()
|
||||
* @see #displayName()
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void nickname(@Nullable Component nickname);
|
||||
|
||||
@@ -166,7 +166,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
*
|
||||
* @param message the message to be sent
|
||||
* @return the channel and message
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
ChannelMessage channelForMessage(Component message);
|
||||
|
||||
@@ -175,7 +175,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
*
|
||||
* @param message The channel message without any prefixes
|
||||
* @param channel The channel the message should be sent to
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
record ChannelMessage(Component message, ChatChannel channel) {}
|
||||
|
||||
@@ -224,7 +224,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* Gets the ids of the players this player is currently ignoring.
|
||||
*
|
||||
* @return the players currently ignored
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Set<UUID> ignoring();
|
||||
|
||||
@@ -298,7 +298,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* Controls if the player should receive direct messages or if they should be hidden.
|
||||
*
|
||||
* @return if the player is ignoring direct messages
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
boolean ignoringDirectMessages();
|
||||
|
||||
@@ -306,7 +306,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* Sets whether the player should receive direct messages or if they should be hidden.
|
||||
*
|
||||
* @param ignoring if the player is ignoring direct messages
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void ignoringDirectMessages(boolean ignoring);
|
||||
|
||||
@@ -385,7 +385,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* {@link #joinChannel(ChatChannel)} and {@link #leaveChannel(ChatChannel)} to mutate.</p>
|
||||
*
|
||||
* @return a list of the channels.
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
List<Key> leftChannels();
|
||||
|
||||
@@ -393,7 +393,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* Join a channel for this player if they have left it.
|
||||
*
|
||||
* @param channel the channel to join.
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void joinChannel(ChatChannel channel);
|
||||
|
||||
@@ -401,7 +401,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* Leave a channel for this player.
|
||||
*
|
||||
* @param channel the channel to leave.
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void leaveChannel(ChatChannel channel);
|
||||
|
||||
@@ -409,7 +409,7 @@ public interface CarbonPlayer extends Audience, Identified {
|
||||
* Get this player's current {@link Party}.
|
||||
*
|
||||
* @return party future
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
CompletableFuture<@Nullable Party> party();
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.checkerframework.framework.qual.DefaultQualifier;
|
||||
*
|
||||
* @see UserManager#createParty(Component)
|
||||
* @see UserManager#party(UUID)
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
@DefaultQualifier(NonNull.class)
|
||||
public interface Party {
|
||||
@@ -39,7 +39,7 @@ public interface Party {
|
||||
* Get the name of this party.
|
||||
*
|
||||
* @return party name
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Component name();
|
||||
|
||||
@@ -47,7 +47,7 @@ public interface Party {
|
||||
* Get the unique id of this party.
|
||||
*
|
||||
* @return party id
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
UUID id();
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface Party {
|
||||
* Get a snapshot of the current party members.
|
||||
*
|
||||
* @return party members
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Set<UUID> members();
|
||||
|
||||
@@ -63,7 +63,7 @@ public interface Party {
|
||||
* Add a user to this party. They will automatically be removed from their previous party if necessary.
|
||||
*
|
||||
* @param id user id
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void addMember(UUID id);
|
||||
|
||||
@@ -71,14 +71,14 @@ public interface Party {
|
||||
* Remove a user from this party.
|
||||
*
|
||||
* @param id user id
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void removeMember(UUID id);
|
||||
|
||||
/**
|
||||
* Disband this party. Will remove all members and delete persistent data.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
void disband();
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface UserManager<C extends CarbonPlayer> {
|
||||
*
|
||||
* @param uuid the player's id
|
||||
* @return the player
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
CompletableFuture<C> user(UUID uuid);
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface UserManager<C extends CarbonPlayer> {
|
||||
*
|
||||
* @param name party name
|
||||
* @return new party
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
Party createParty(Component name);
|
||||
|
||||
@@ -68,7 +68,7 @@ public interface UserManager<C extends CarbonPlayer> {
|
||||
* @param id party id
|
||||
* @return existing party
|
||||
* @see #createParty(Component)
|
||||
* @since 2.1.0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
CompletableFuture<@Nullable Party> party(UUID id);
|
||||
|
||||
|
||||
Reference in new issue
Block a user