-
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.
Add ProtocolLib support and fix paper tab completer registration
- Loading branch information
Showing
7 changed files
with
41 additions
and
11 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
kotlin.code.style=official | ||
|
||
project.group=kr.summitsystems | ||
project.version=0.0.8-beta3 | ||
project.version=0.0.8-beta4 | ||
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,6 +18,7 @@ [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 | ||
|
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
17 changes: 17 additions & 0 deletions
17
...support/src/main/kotlin/kr/summitsystems/springbukkit/support/paper/PaperConfiguration.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,17 @@ | ||
package kr.summitsystems.springbukkit.support.paper | ||
|
||
import kr.summitsystems.springbukkit.command.CommandTabCompletionProvider | ||
import org.springframework.beans.factory.config.BeanDefinition | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass | ||
import org.springframework.context.annotation.* | ||
|
||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE) | ||
@Configuration | ||
class PaperConfiguration { | ||
@ConditionalOnClass(name = ["com.destroystokyo.paper.event.server.AsyncTabCompleteEvent"]) | ||
@Bean | ||
@Role(BeanDefinition.ROLE_INFRASTRUCTURE) | ||
fun paperTabCompleter(commandTabCompletionProvider: CommandTabCompletionProvider): PaperTabCompleter { | ||
return PaperTabCompleter(commandTabCompletionProvider) | ||
} | ||
} |
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
...main/kotlin/kr/summitsystems/springbukkit/support/protocollib/ProtocolLibConfiguration.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.protocollib | ||
|
||
import com.comphenix.protocol.ProtocolLibrary | ||
import com.comphenix.protocol.ProtocolManager | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass | ||
import org.springframework.context.annotation.Bean | ||
import org.springframework.context.annotation.Configuration | ||
|
||
@Configuration | ||
class ProtocolLibConfiguration { | ||
@ConditionalOnClass(name = ["com.comphenix.protocol.ProtocolManager"]) | ||
@Bean | ||
fun protocolManager(): ProtocolManager { | ||
return ProtocolLibrary.getProtocolManager() | ||
} | ||
} |