Skip to content

Commit 2cd96c6

Browse files
committed
Add shared Matrix economy module
1 parent 5eaf513 commit 2cd96c6

5 files changed

Lines changed: 630 additions & 10 deletions

File tree

README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,44 @@
55

66
**Keywords:** Minecraft plugin library, Paper plugin library, Folia plugin library, Bukkit plugin API, Spigot plugin API, TabooLib, Kotlin plugin library, GUI framework, shared runtime, Matrix plugin framework
77

8-
MatrixLib is a shared Minecraft plugin runtime and dependency library for MatrixShop, MatrixAuth and MatrixCook. It targets Paper, Bukkit, Spigot and Folia servers, and provides shared branding, console, menu, YAML, compat and action APIs.
8+
`MatrixLib` 是 Matrix 系列插件的共享前置插件,用于统一品牌风格、控制台输出、文本能力、YAML 读取、兼容层、共享菜单能力和共享货币模块。
9+
10+
MatrixLib is a shared Minecraft plugin runtime and dependency library for MatrixShop, MatrixAuth, MatrixCook and MatrixStorage. It targets Paper, Bukkit, Spigot and Folia servers, and provides shared branding, console, menu, YAML, compat, action and economy APIs.
911

1012
**中文关键词:** Minecraft 插件前置, Paper 插件前置, Folia 插件前置, Bukkit 插件 API, Spigot 插件 API, TabooLib 前置, Kotlin 插件库, GUI 菜单框架, 共享运行时, Matrix 插件框架
1113

1214
## Discoverability
1315

1416
- English: Minecraft plugin library, Paper plugin framework, Folia plugin framework, Bukkit shared runtime, TabooLib shared API, Kotlin Minecraft library
15-
- 中文: Minecraft 插件前置, 服务器插件前置, 中文控制台前置, 共享菜单前置, 兼容层前置, GUI 菜单前置
17+
- 中文: Minecraft 插件前置, 服务器插件前置, 中文控制台前置, 共享菜单前置, 兼容层前置, GUI 菜单前置, 共享货币前置
1618

1719
## What MatrixLib Provides
1820

1921
- Shared `branding / console / text / yaml` APIs
20-
- Shared `menu / compat / action` APIs
22+
- Shared `menu / compat / action / economy` APIs
2123
- Unified Chinese terminal banner and lifecycle output
2224
- Shared Bukkit / Folia compatibility bridge
23-
- Shared runtime for MatrixShop, MatrixAuth and MatrixCook
25+
- Shared runtime for MatrixShop, MatrixAuth, MatrixCook and MatrixStorage
26+
- Shared `Economy/currency.yml` with runtime synchronization to MatrixShop and MatrixStorage
27+
28+
## Current Focus
29+
30+
- Shared `economy` API is now part of MatrixLib
31+
- `plugins/MatrixLib/Economy/currency.yml` is the source of truth for Matrix series currency definitions
32+
- Runtime sync targets:
33+
- `plugins/MatrixLib/Economy/currency.yml`
34+
- `plugins/MatrixShop/Economy/currency.yml`
35+
- `plugins/MatrixStorage/Economy/currency.yml`
36+
- Supported shared currency backends:
37+
- `Vault`
38+
- `PlayerPoints`
39+
- PlaceholderAPI-driven custom currencies
2440

2541
## Downstream Build Integration
2642

2743
Dependency coordinate:
2844

29-
- `com.y54895.matrixlib:matrixlib-api:1.0.1`
45+
- `com.y54895.matrixlib:matrixlib-api:1.1.0`
3046

3147
Downstream projects support two build modes:
3248

@@ -49,11 +65,11 @@ sourceControl {
4965

5066
## Current Public Release
5167

52-
- First public release: `1.0.1`
68+
- `1.1.0`
5369

5470
## Links
5571

5672
- GitHub Repo: [https://github.com/54895y/MatrixLib](https://github.com/54895y/MatrixLib)
5773
- Issues: [https://github.com/54895y/MatrixLib/issues](https://github.com/54895y/MatrixLib/issues)
5874
- Releases: [https://github.com/54895y/MatrixLib/releases](https://github.com/54895y/MatrixLib/releases)
59-
- Related docs: `MatrixDevDocs`
75+
- Related docs: [https://54895y.github.io/docs/plugins](https://54895y.github.io/docs/plugins)

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.y54895.matrixlib
2-
version=1.0.1
2+
version=1.1.0
33
kotlin.incremental=true
44
kotlin.incremental.java=true
55
kotlin.caching.enabled=true

src/main/kotlin/com/y54895/matrixlib/MatrixLib.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.y54895.matrixlib
33
import com.y54895.matrixlib.api.brand.MatrixBranding
44
import com.y54895.matrixlib.api.console.MatrixConsoleFact
55
import com.y54895.matrixlib.api.console.MatrixConsoleVisuals
6+
import com.y54895.matrixlib.api.economy.MatrixEconomy
67
import taboolib.common.platform.Plugin
78
import taboolib.common.platform.function.pluginVersion
89

@@ -19,18 +20,20 @@ object MatrixLib : Plugin() {
1920
branding = branding,
2021
headline = "正在装载共享接口与运行时桥接",
2122
details = listOf(
22-
MatrixConsoleFact("导出接口", "action / menu / compat / text / yaml / console"),
23+
MatrixConsoleFact("导出接口", "action / menu / compat / text / yaml / console / economy"),
2324
MatrixConsoleFact("服务对象", "MatrixShop / MatrixAuth / MatrixCook")
2425
)
2526
)
2627
}
2728

2829
override fun onEnable() {
30+
MatrixEconomy.reload()
2931
MatrixConsoleVisuals.renderReady(
3032
branding = branding,
3133
version = pluginVersion,
3234
details = listOf(
33-
MatrixConsoleFact("共享接口", "action / menu / compat / text / yaml / console"),
35+
MatrixConsoleFact("共享接口", "action / menu / compat / text / yaml / console / economy"),
36+
MatrixConsoleFact("货币提供者", MatrixEconomy.providerSummary()),
3437
MatrixConsoleFact("运行状态", "控制台品牌 / 资源桥接 / 通用适配")
3538
)
3639
)

0 commit comments

Comments
 (0)