-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from Astra-Interactive/refactor-modules
- Refactor modules - Improve kill event - Fix #27 - Fix error logging by adding debug tag
- Loading branch information
Showing
91 changed files
with
814 additions
and
743 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ makeevrserg.java.ktarget=21 | |
# Project | ||
makeevrserg.project.name=AstraRating | ||
makeevrserg.project.group=ru.astrainteractive.astrarating | ||
makeevrserg.project.version.string=1.17.5 | ||
makeevrserg.project.version.string=1.18.0 | ||
makeevrserg.project.description=Rating plugin for EmpireProjekt | ||
makeevrserg.project.developers=makeevrserg|Makeev Roman|[email protected] | ||
makeevrserg.project.url=https://empireprojekt.ru | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
kotlin("jvm") | ||
kotlin("plugin.serialization") | ||
alias(libs.plugins.klibs.gradle.java.core) | ||
} | ||
dependencies { | ||
// Kotlin | ||
implementation(libs.bundles.kotlin) | ||
// AstraLibs | ||
implementation(libs.minecraft.astralibs.core) | ||
// klibs | ||
implementation(libs.klibs.kdi) | ||
implementation(libs.klibs.mikro.core) | ||
// Test | ||
testImplementation(libs.bundles.testing.kotlin) | ||
testImplementation(libs.tests.kotlin.test) | ||
// Local | ||
implementation(projects.modules.apiRating) | ||
implementation(projects.modules.dbRating) | ||
implementation(projects.modules.core) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
kotlin("jvm") | ||
kotlin("plugin.serialization") | ||
alias(libs.plugins.klibs.gradle.java.core) | ||
} | ||
dependencies { | ||
// Kotlin | ||
implementation(libs.bundles.kotlin) | ||
// AstraLibs | ||
implementation(libs.minecraft.astralibs.core) | ||
// klibs | ||
implementation(libs.klibs.kdi) | ||
implementation(libs.klibs.mikro.core) | ||
// Test | ||
testImplementation(libs.bundles.testing.kotlin) | ||
testImplementation(libs.tests.kotlin.test) | ||
// Local | ||
implementation(projects.modules.apiRating) | ||
implementation(projects.modules.dbRating) | ||
implementation(projects.modules.core) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
plugins { | ||
kotlin("jvm") | ||
kotlin("plugin.serialization") | ||
alias(libs.plugins.klibs.gradle.java.core) | ||
} | ||
dependencies { | ||
// Kotlin | ||
implementation(libs.bundles.kotlin) | ||
// AstraLibs | ||
implementation(libs.minecraft.astralibs.core) | ||
// klibs | ||
implementation(libs.klibs.kdi) | ||
implementation(libs.klibs.mikro.core) | ||
// Test | ||
testImplementation(libs.bundles.testing.kotlin) | ||
testImplementation(libs.tests.kotlin.test) | ||
// Local | ||
implementation(projects.modules.apiRating) | ||
implementation(projects.modules.dbRating) | ||
implementation(projects.modules.core) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...i-rating/src/main/kotlin/ru/astrainteractive/astrarating/api/rating/api/RatingDBApiExt.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ru.astrainteractive.astrarating.api.rating.api | ||
|
||
import ru.astrainteractive.astrarating.dto.UserDTO | ||
import ru.astrainteractive.astrarating.model.UserModel | ||
|
||
object RatingDBApiExt { | ||
suspend fun RatingDBApi.upsertUser(userModel: UserModel): UserDTO { | ||
val selectedUser = selectUser(userModel.minecraftName).getOrNull() | ||
if (selectedUser != null) return selectedUser | ||
return UserDTO( | ||
id = insertUser(userModel) | ||
.getOrNull() | ||
?: error("Could not insert user $userModel"), | ||
minecraftName = userModel.minecraftName, | ||
minecraftUUID = userModel.minecraftUUID.toString() | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
plugins { | ||
kotlin("jvm") | ||
kotlin("plugin.serialization") | ||
alias(libs.plugins.klibs.gradle.java.core) | ||
} | ||
|
||
dependencies { | ||
// Kotlin | ||
implementation(libs.bundles.kotlin) | ||
// Spigot dependencies | ||
compileOnly(libs.minecraft.paper.api) | ||
// AstraLibs | ||
implementation(libs.minecraft.astralibs.core) | ||
implementation(libs.minecraft.astralibs.menu.bukkit) | ||
implementation(libs.minecraft.astralibs.core.bukkit) | ||
implementation(libs.minecraft.astralibs.command) | ||
implementation(libs.minecraft.astralibs.command.bukkit) | ||
implementation(libs.klibs.kdi) | ||
implementation(libs.klibs.mikro.core) | ||
// Local | ||
implementation(projects.modules.core) | ||
implementation(projects.modules.coreBukkit) | ||
implementation(projects.modules.apiRating) | ||
implementation(projects.modules.dbRating) | ||
implementation(projects.modules.shared) | ||
implementation(projects.modules.guiCoreBukkit) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.