SQLiteDatabase

public final class SQLiteDatabase implements DatabaseManager

Constructors

Link copied to clipboard
public void SQLiteDatabase(Plugin plugin, File dbFile)

Functions

Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> addFavoriteSkinToPlayer(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() Skin skin)
Link copied to clipboard
public void close()
Closes the database connection.
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Optional<String>> getActiveSkin(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() Material material)
Gets the active skin for a specific item type.
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Map<Material, String>> getAllActiveSkins(@NotNull() @NotNull() UUID playerUuid)
Gets all the active skins for a player uuid
Link copied to clipboard
Retrieves all grants that have expired (expires_at is not null and <= now).
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Collection<String>> getFavoriteSkinsFromPlayer(@NotNull() @NotNull() UUID playerUuid)
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Collection<SkinGrant>> getGrants(@NotNull() @NotNull() UUID playerUuid)
Gets all skin grants for a player.
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> grantSkin(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() String skinId, @NotNull() @NotNull() String source)
Grants a skin to a player.
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> grantSkinWithExpiry(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() String skinId, @NotNull() @NotNull() String source, @Nullable() @Nullable() LocalDateTime expiresAt)
Grants a skin with an optional expiration date.
Link copied to clipboard
public void init()
Initializes the database connection and creates tables.
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> logAction(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() String action, @NotNull() @NotNull() String target, @Nullable() @Nullable() String metadata)
Logs an action to the database.
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> migrateSkinId(String oldSkinId, @NotNull() @NotNull() String newSkinId)
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> removeFavoriteSkinFromPlayer(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() Skin skin)
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> revokeSkin(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() String skinId)
Revokes a skin from a player.
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> setActiveSkin(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() Material material, @Nullable() @Nullable() String skinId)
Sets the active skin for a specific item type.
Link copied to clipboard
@NotNull()
public @NotNull() CompletableFuture<Void> upsertActiveSkin(@NotNull() @NotNull() UUID playerUuid, @NotNull() @NotNull() Material material, @Nullable() @Nullable() String skinId)
Upserts a skin