Skip to content

Commit

Permalink
remove KDI and filemanager
Browse files Browse the repository at this point in the history
  • Loading branch information
makeevrserg committed Aug 3, 2024
1 parent 751558c commit 4faf085
Show file tree
Hide file tree
Showing 17 changed files with 6 additions and 327 deletions.
1 change: 0 additions & 1 deletion benchmarks/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ dependencies {
// Kotlin
implementation(libs.bundles.kotlin)
// AstraLibs
implementation(libs.klibs.kdi)
implementation(libs.klibs.mikro.core)
implementation(libs.klibs.kstorage)
// Local
Expand Down
2 changes: 0 additions & 2 deletions core-bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ plugins {
dependencies {
// Kotlin
compileOnly(libs.bundles.kotlin)
// kdi
implementation(libs.klibs.kdi)
implementation(libs.klibs.mikro.core)
implementation(libs.klibs.kstorage)
// Spigot dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package ru.astrainteractive.astralibs.economy
import org.bukkit.Bukkit
import org.bukkit.plugin.Plugin
import org.bukkit.plugin.java.JavaPlugin
import ru.astrainteractive.klibs.kdi.Factory

class EconomyProviderFactory(private val rootPlugin: JavaPlugin) : Factory<EconomyProvider> {
class EconomyProviderFactory(private val rootPlugin: JavaPlugin) {

private fun interface EconomyConstructor {
fun create(rootPlugin: JavaPlugin, plugin: Plugin): EconomyProvider
Expand All @@ -21,7 +20,7 @@ class EconomyProviderFactory(private val rootPlugin: JavaPlugin) : Factory<Econo
.getOrNull()
}

override fun create(): EconomyProvider {
fun create(): EconomyProvider {
val providers = listOfNotNull(
tryGetEconomyProvider("Vault", ::VaultEconomyProvider),
tryGetEconomyProvider("Essentials", ::EssentialsEconomyProvider)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ import org.bukkit.Bukkit
import org.bukkit.OfflinePlayer
import org.bukkit.plugin.Plugin
import org.bukkit.plugin.java.JavaPlugin
import ru.astrainteractive.klibs.kdi.Factory
import java.util.UUID

@Suppress("UnusedPrivateProperty")
class VaultEconomyProvider(plugin: JavaPlugin, vault: Plugin) : EconomyProvider {
private val economy = Factory {
private val economy by lazy {
val rsp = plugin.server.servicesManager.getRegistration(Economy::class.java)
checkNotNull(rsp) { "Could not get economy provider" }
rsp.provider
}.create()
}

private fun offlinePlayer(uuid: UUID) = Bukkit.getOfflinePlayer(uuid)

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies {
// Kotlin
compileOnly(libs.bundles.kotlin)
compileOnly(libs.kotlin.serialization.protobuf)
// kdi
implementation(libs.bundles.klibs)
compileOnly(libs.kyori.api)
compileOnly(libs.kyori.gson)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ makeevrserg.java.ktarget=21
# Project
makeevrserg.project.name=AstraLibs
makeevrserg.project.group=ru.astrainteractive.astralibs
makeevrserg.project.version.string=3.11.0
makeevrserg.project.version.string=3.12.0
makeevrserg.project.description=Core utilities for spigot development
makeevrserg.project.developers=makeevrserg|Makeev Roman|[email protected]
makeevrserg.project.url=https://empireprojekt.ru
Expand Down
Loading

0 comments on commit 4faf085

Please sign in to comment.