Consistent spacing

This commit is contained in:
Draycia committed 2021-05-11 23:08:13 -07:00
1 parent dcfbb5655b
commit ab23703b4a
13 files changed
+20

No files matched your search

@@ -6,6 +6,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
public final class CarbonChatProvider {
private CarbonChatProvider() {
}
private static @Nullable CarbonChat instance;
@@ -6,4 +6,5 @@ import net.kyori.event.Cancellable;
* Represents a {@link CarbonEvent} that's cancellable.
*/
public abstract class CancellableCarbonEvent extends Cancellable.Impl implements CarbonEvent {
}
@@ -12,6 +12,7 @@ import static net.kyori.adventure.text.Component.translatable;
* {@link CancellableCarbonEvent} that's called when chat components are rendered for online players.
*/
public class CarbonChatEvent extends CancellableCarbonEvent {
private @NonNull PlayerComponentRenderer renderer = (sender, recipient, message) -> {
return translatable("chat.type.text", sender.displayName(), message);
};
@@ -41,4 +42,5 @@ public class CarbonChatEvent extends CancellableCarbonEvent {
public @NonNull List<@NonNull CarbonPlayer> recipients() {
return this.recipients;
}
}
@@ -1,4 +1,5 @@
package net.draycia.carbon.api.events;
public interface CarbonEvent {
}
@@ -7,6 +7,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
@FunctionalInterface
public interface PlayerComponentRenderer {
/**
* Renders a Component for the specified recipient.
* @param sender The player that sent the message.
@@ -19,4 +20,5 @@ public interface PlayerComponentRenderer {
Component render(final @NonNull CarbonPlayer sender,
final @NonNull CarbonPlayer recipient,
final @NonNull Component message);
}