Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
f94d77c
feat(gui): Begin first implementation of guis
Distractic Dec 14, 2023
9431249
chore: Remove unused property
Distractic Dec 14, 2023
a960c11
fix: Stack overflow when close gui
Distractic Dec 14, 2023
c532cf8
fix: Add way to create inventory from scratch
Distractic Dec 14, 2023
0fc9c14
fix: Use requireOpen function
Distractic Dec 14, 2023
74cd704
chore: Format
Distractic Dec 14, 2023
96d23fb
fix: Change scope property
Distractic Dec 14, 2023
85c1f89
fix: Safe open by multiple check
Distractic Dec 15, 2023
8b0980d
test(gui-listener): Begin test about close GUI
Distractic Dec 15, 2023
e058f80
chore: Return boolean when open GUI
Distractic Dec 15, 2023
b42ba7c
test: GUI on click
Distractic Dec 15, 2023
b613270
test: Begin test for PersonalGUI close
Distractic Dec 15, 2023
c8d302c
fix(personal-gui): Create custom inventory for personal GUI
Distractic Dec 15, 2023
2efa65c
fix: Click on item when inventory open
Distractic Dec 15, 2023
8cd1bab
test: Fix test about call suspending event
Distractic Dec 15, 2023
e3890f1
test: Add test to trigger call event
Distractic Dec 15, 2023
a93e84e
test: Implement tests for Personal GUI
Distractic Dec 15, 2023
7301933
fix: Use mutex to avoid async issue
Distractic Dec 15, 2023
0237770
chore: Remove import
Distractic Dec 15, 2023
a47a1dc
test: Open GUI for Personal GUI
Distractic Dec 15, 2023
5368455
feat: Dedicate GUI for player or language
Distractic Dec 16, 2023
ef66b2c
chore: Rename classes
Distractic Dec 16, 2023
0bc8fd1
feat: Loading GUI (#134)
Distractic Dec 19, 2023
6778670
feat: Implement update function
Distractic Dec 19, 2023
d25ea07
test: Add tests about update method
Distractic Dec 19, 2023
1059883
chore: Move clear inventory out of Job
Distractic Dec 19, 2023
9921afd
doc: Add missing property documentation
Distractic Dec 19, 2023
72cf8a3
fix: Use UNIT as singleton value
Distractic Dec 19, 2023
84af5c9
fix: Avoid unnecessary operation if shift is 0
Distractic Dec 19, 2023
134ccf6
test: Begin test about shift inventory animation
Distractic Dec 19, 2023
8173489
chore: Optimize and create new function for Client
Distractic Dec 19, 2023
b885923
test: Add tests about inventory management
Distractic Dec 19, 2023
55f8c45
fix: Add dedicated function to simplify management
Distractic Dec 20, 2023
5e5305d
fix: Keep loading state if animation end
Distractic Dec 20, 2023
a54555d
fix: Avoid useless shift for animation
Distractic Dec 20, 2023
1358911
test: Add tests about fill animation
Distractic Dec 20, 2023
8f530e7
test: Add verification for close GUI
Distractic Dec 20, 2023
58e4ec9
test: Add test about update for single GUI
Distractic Dec 20, 2023
5b83371
test: Add test about shift constructor
Distractic Dec 20, 2023
f21da9c
chore: Remove property exception
Distractic Dec 20, 2023
94bc53b
test: Add check test about stop animation
Distractic Dec 20, 2023
b35071d
fix: Rollback scope API plugin
Distractic Dec 20, 2023
728ae87
chore: Remove unused method
Distractic Dec 20, 2023
3259de4
fix: remove & move right click item on click inventory
Distractic Dec 21, 2023
2fd2115
chore: Remove await cancellation
Distractic Dec 23, 2023
0ad4fa6
refactor: Add suspend modifier to 'createInventory' across multiple c…
cizetux Jan 3, 2024
c465130
refactor: Add data colors to each GameState
cizetux Sep 7, 2024
8f7281d
refactor: Add 'permanent' field to handle games that are in permanent…
cizetux Sep 7, 2024
6939b93
chore: update dependencies to latest versions
cizetux May 15, 2026
74469b3
feat: add rank system and update dependencies
cizetux May 29, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 43 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
embeddedKotlin("jvm")
embeddedKotlin("plugin.serialization")
//embeddedKotlin("jvm")
//embeddedKotlin("plugin.serialization")
kotlin("jvm") version "2.2.0"
kotlin("plugin.serialization") version "2.2.0"
id("org.jetbrains.dokka") version "1.9.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.gitlab.arturbosch.detekt") version "1.23.1"
Expand All @@ -26,25 +29,27 @@ jacoco {
}

repositories {
mavenLocal()
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://repo.codemc.org/repository/maven-public/")
// maven("https://repo.mockbukkit.org/repository/maven-public/")
maven("https://jitpack.io")
}

dependencies {
val kotlinSerializableVersion = "1.6.0"
val kotlinSerializableVersion = "1.7.3"
val kamlVersion = "0.55.0"
val coroutineVersion = "1.6.4"
val coroutineVersion = "1.8.1"
val loggingVersion = "3.0.5"
val koinVersion = "3.4.3"
val mccoroutineVersion = "2.13.0"
val paperVersion = "1.20-R0.1-SNAPSHOT"
val mockBukkitVersion = "3.19.1"
val koinVersion = "3.5.6"
val mccoroutineVersion = "2.14.0"
val paperVersion = "1.21.11-R0.1-SNAPSHOT"
// val mockBukkitVersion = "4.4.0"
val junitVersion = "5.10.0"
val mockkVersion = "1.12.5"
val fastboardVersion = "2.0.0"
val kotestVersion = "5.6.2"
val mockkVersion = "1.14.9"
val fastboardVersion = "2.1.5"
val kotestVersion = "5.9.1"
val icu4jVersion = "73.2"

api(kotlin("stdlib"))
Expand Down Expand Up @@ -76,10 +81,15 @@ dependencies {
// Scoreboard framework
api("fr.mrmicky:fastboard:$fastboardVersion")

api("com.github.Rushyverse:core:6ae31a9250")
// api("com.github.Rushyverse:core:6ae31a9250")
api("com.github.Rushyverse:core:2.0.0")

api("org.komapper:komapper-dialect-postgresql-r2dbc:1.12.0")
api("io.r2dbc:r2dbc-spi:1.0.0.RELEASE")
api("org.postgresql:r2dbc-postgresql:1.0.5.RELEASE")

// Tests
testImplementation("com.github.seeseemelk:MockBukkit-v1.20:$mockBukkitVersion")
// testImplementation("org.mockbukkit.mockbukkit:mockbukkit-$mockBukkitVersion")
testImplementation(kotlin("test-junit5"))
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:$coroutineVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
Expand All @@ -93,7 +103,7 @@ dependencies {
testImplementation("io.mockk:mockk:$mockkVersion")
}

val javaVersion get() = JavaVersion.VERSION_17
val javaVersion get() = JavaVersion.VERSION_21
val javaVersionString get() = javaVersion.toString()
val javaVersionInt get() = javaVersionString.toInt()

Expand Down Expand Up @@ -122,14 +132,26 @@ val dokkaOutputDir = "${rootProject.projectDir}/dokka"

tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = javaVersionString
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(javaVersionString))
}
}

withType<JavaCompile> {
sourceCompatibility = javaVersionString
targetCompatibility = javaVersionString
}

withType<Detekt>().configureEach {
reports {
html.required.set(true)
xml.required.set(true)
txt.required.set(false)
sarif.required.set(false)
md.required.set(false)
}
}

test {
useJUnitPlatform()
}
Expand All @@ -151,6 +173,12 @@ tasks {
csv.required.set(false)
}
}

shadowJar {
archiveClassifier.set("all")
mergeServiceFiles()
append("META-INF/services/org.komapper.r2dbc.spi.R2dbcDialectFactory")
}
}

val deleteDokkaOutputDir by tasks.register<Delete>("deleteDokkaOutputDirectory") {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-rc-1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
47 changes: 32 additions & 15 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 23 additions & 18 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/main/kotlin/com/github/rushyverse/api/APIPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.github.rushyverse.api

import com.github.rushyverse.api.extension.registerListener
import com.github.rushyverse.api.game.SharedGameData
import com.github.rushyverse.api.gui.GUIManager
import com.github.rushyverse.api.koin.CraftContext
import com.github.rushyverse.api.koin.loadModule
import com.github.rushyverse.api.listener.api.LanguageListener
Expand Down Expand Up @@ -30,13 +31,15 @@ public class APIPlugin : JavaPlugin() {
}

override fun onEnable() {
Thread.currentThread().contextClassLoader = this::class.java.classLoader
super.onEnable()
CraftContext.startKoin(ID_API)
loadModule(ID_API) {
single { Bukkit.getServer() }
single { ScoreboardManager() }
single { LanguageManager() }
single { SharedGameData() }
single { GUIManager() }
}

registerListener { LanguageListener() }
Expand Down
15 changes: 13 additions & 2 deletions src/main/kotlin/com/github/rushyverse/api/Plugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.github.rushyverse.api.configuration.reader.IFileReader
import com.github.rushyverse.api.configuration.reader.YamlFileReader
import com.github.rushyverse.api.extension.asComponent
import com.github.rushyverse.api.extension.registerListener
import com.github.rushyverse.api.gui.GUIListener
import com.github.rushyverse.api.koin.CraftContext
import com.github.rushyverse.api.koin.inject
import com.github.rushyverse.api.koin.loadModule
Expand All @@ -16,11 +17,21 @@ import com.github.rushyverse.api.player.Client
import com.github.rushyverse.api.player.ClientManager
import com.github.rushyverse.api.player.ClientManagerImpl
import com.github.rushyverse.api.player.language.LanguageManager
import com.github.rushyverse.api.serializer.*
import com.github.rushyverse.api.serializer.ComponentSerializer
import com.github.rushyverse.api.serializer.DyeColorSerializer
import com.github.rushyverse.api.serializer.EnchantmentSerializer
import com.github.rushyverse.api.serializer.ItemStackSerializer
import com.github.rushyverse.api.serializer.LocationSerializer
import com.github.rushyverse.api.serializer.MaterialSerializer
import com.github.rushyverse.api.serializer.NamespacedSerializer
import com.github.rushyverse.api.serializer.PatternSerializer
import com.github.rushyverse.api.serializer.PatternTypeSerializer
import com.github.rushyverse.api.serializer.RangeDoubleSerializer
import com.github.rushyverse.api.translation.ResourceBundleTranslator
import com.github.rushyverse.api.translation.Translator
import com.github.rushyverse.api.translation.registerResourceBundleForSupportedLocales
import com.github.shynixn.mccoroutine.bukkit.SuspendingJavaPlugin
import java.util.*
import kotlinx.serialization.modules.SerializersModule
import kotlinx.serialization.modules.SerializersModuleBuilder
import kotlinx.serialization.modules.contextual
Expand All @@ -29,7 +40,6 @@ import org.bukkit.entity.Player
import org.jetbrains.annotations.Blocking
import org.koin.core.module.Module
import org.koin.dsl.bind
import java.util.*

/**
* Represents the base functionality required to create a plugin.
Expand Down Expand Up @@ -70,6 +80,7 @@ public abstract class Plugin(

registerListener { PlayerListener(this) }
registerListener { VillagerListener(this) }
registerListener { GUIListener(this) }
}

/**
Expand Down
Loading
Loading