Move JSONUserService to common

This commit is contained in:
Draycia committed 2020-09-25 01:45:35 -07:00
1 parent b1c4c48e83
commit e263bccbfc
8 files changed
+79 -51

No files matched your search

@@ -9,6 +9,8 @@ import net.draycia.carbon.api.users.UserService;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import org.checkerframework.checker.nullness.qual.NonNull;
import java.nio.file.Path;
public interface CarbonChat {
LegacyComponentSerializer LEGACY =
@@ -21,6 +23,8 @@ public interface CarbonChat {
void reloadConfig();
@NonNull Path dataFolder();
@NonNull UserService userService();
@NonNull MessageProcessor messageProcessor();
@@ -5,23 +5,23 @@ import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.UUID;
public interface UserService {
public interface UserService<T extends ChatUser> {
@Nullable
ChatUser wrap(UUID uuid);
T wrap(UUID uuid);
@Nullable
ChatUser wrapIfLoaded(@NonNull UUID uuid);
T wrapIfLoaded(@NonNull UUID uuid);
@Nullable
ChatUser refreshUser(@NonNull UUID uuid);
T refreshUser(@NonNull UUID uuid);
void onDisable();
void invalidate(@NonNull ChatUser user);
void invalidate(@NonNull T user);
void validate(@NonNull ChatUser user);
void validate(@NonNull T user);
@NonNull Iterable<@NonNull ChatUser> onlineUsers();
@NonNull Iterable<@NonNull T> onlineUsers();
}