-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix auto configuration issue of support module
- Loading branch information
Showing
15 changed files
with
53 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
kotlin.code.style=official | ||
|
||
project.group=kr.summitsystems | ||
project.version=0.0.8-beta6 | ||
project.version=0.0.8-beta7 | ||
project.name=spring-bukkit | ||
project.url=https://github.com/summit-systems/spring-bukkit | ||
project.url.scm=https://github.com/summit-systems/spring-bukkit.git | ||
|
@@ -18,7 +18,6 @@ [email protected] | |
# Spigot | ||
spigot.version=1.20.2-R0.1-SNAPSHOT | ||
mock.bukkit.version=3.58.0 | ||
protocollib.version=5.1.0 | ||
|
||
# Jakarta EE | ||
jakarta.annotation.version=2.1.1 | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
8 changes: 8 additions & 0 deletions
8
...support/src/main/kotlin/kr/summitsystems/springbukkit/support/folia/ConditionalOnFolia.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,8 @@ | ||
package kr.summitsystems.springbukkit.support.folia | ||
|
||
import org.springframework.context.annotation.Conditional | ||
|
||
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) | ||
@Retention(AnnotationRetention.RUNTIME) | ||
@Conditional(FoliaCondition::class) | ||
annotation class ConditionalOnFolia |
11 changes: 11 additions & 0 deletions
11
...kit-support/src/main/kotlin/kr/summitsystems/springbukkit/support/folia/FoliaCondition.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,11 @@ | ||
package kr.summitsystems.springbukkit.support.folia | ||
|
||
import org.springframework.context.annotation.Condition | ||
import org.springframework.context.annotation.ConditionContext | ||
import org.springframework.core.type.AnnotatedTypeMetadata | ||
|
||
class FoliaCondition : Condition { | ||
override fun matches(context: ConditionContext, metadata: AnnotatedTypeMetadata): Boolean { | ||
return FoliaUtils.isUsingFolia() | ||
} | ||
} |
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
16 changes: 16 additions & 0 deletions
16
...-bukkit-support/src/main/kotlin/kr/summitsystems/springbukkit/support/folia/FoliaUtils.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,16 @@ | ||
package kr.summitsystems.springbukkit.support.folia | ||
|
||
object FoliaUtils { | ||
fun isUsingFolia(): Boolean { | ||
return classExists("io.papermc.paper.threadedregions.RegionizedServer") | ||
} | ||
|
||
private fun classExists(className: String): Boolean { | ||
return try { | ||
Class.forName(className) | ||
true | ||
} catch (ex: ClassNotFoundException) { | ||
false | ||
} | ||
} | ||
} |
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
16 changes: 0 additions & 16 deletions
16
...main/kotlin/kr/summitsystems/springbukkit/support/protocollib/ProtocolLibConfiguration.kt
This file was deleted.
Oops, something went wrong.