Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
a23b8d2
[2.3.6] 功能更新 & 修复
ItsFlicker Jul 19, 2025
1b60fdb
Update build.gradle.kts
YuanYuanOwO Jul 24, 2025
f20da41
Merge pull request #497 from YuanYuanOwO/v2
ItsFlicker Jul 24, 2025
0c5ef27
[2.3.7] 1.21.8 & 功能更新 & 修复
ItsFlicker Jul 24, 2025
ee32e22
[2.3.8] 功能更新 & 优化
ItsFlicker Jul 26, 2025
7e5aa59
[2.3.8] 功能更新 & 优化
ItsFlicker Jul 26, 2025
c134b3c
[2.3.9] 修复
ItsFlicker Jul 28, 2025
b3e0bc1
[2.3.10] 支持shadow color
ItsFlicker Aug 1, 2025
895255a
[2.3.11] 修复
ItsFlicker Aug 21, 2025
c47a368
[2.3.12] 更新 & 修复
ItsFlicker Oct 18, 2025
c703a5e
[2.3.12] HotFix
ItsFlicker Oct 18, 2025
fa27b9f
[2.3.13] 修复 #516
ItsFlicker Oct 25, 2025
891743c
[2.3.13] 修复 #516
ItsFlicker Oct 25, 2025
62cfd4c
[2.3.14] 修复颜色权限
ItsFlicker Oct 28, 2025
6a07428
[2.3.15] Update
ItsFlicker Nov 12, 2025
1001c82
[2.3.15] 蠢了
ItsFlicker Nov 13, 2025
62bec06
+ TrChatEvent.kt新增getFullMessage()方法获取全组件最终消息
YuaZer Dec 9, 2025
831b338
Merge pull request #521 from YuaZer/v2
ItsFlicker Dec 9, 2025
3ddd784
[2.3.16] 1.21.11
ItsFlicker Dec 30, 2025
3301c71
[2.3.17] Support Head
ItsFlicker Jan 1, 2026
1602f20
修复: emoji 渐变问题
AsOne2020 Jan 26, 2026
2bae9dc
Merge pull request #529 from AsOne2020/v2
ItsFlicker Jan 26, 2026
f92c186
[2.3.18] Fix Ignore
ItsFlicker Feb 11, 2026
683d49f
Merge remote-tracking branch 'origin/v2' into v2
ItsFlicker Feb 11, 2026
d86c124
feat(sign): 禁止无发言权限的玩家编辑告示牌
VOLLEY888 Feb 26, 2026
050e7cd
feat(sign): 添加配置项 Enable.Sign-Edit-Permission-Check
VOLLEY888 Feb 26, 2026
383017d
Merge pull request #534 from VOLLEY888/fix/inventory-show-armor
ItsFlicker Feb 26, 2026
8a5434b
[2.4.0] MiniMessage
ItsFlicker Feb 28, 2026
c1b0d4b
[2.4.0] 删除调试信息
ItsFlicker Mar 1, 2026
8c76d96
[2.4.0] 默认不启用
ItsFlicker Mar 2, 2026
baa5cee
玩家完成书与笔编辑时检查发言权限
VOLLEY888 Mar 3, 2026
e24d7e4
Merge pull request #539 from VOLLEY888/玩家完成书与笔编辑时检查发言权限
ItsFlicker Mar 4, 2026
a2ec363
玩家在铁砧重命名时检查发言权限
VOLLEY888 Mar 8, 2026
bd08e40
Merge pull request #540 from VOLLEY888/v2
ItsFlicker Mar 8, 2026
cf58eee
[2.4.1] #543 #544
ItsFlicker Apr 6, 2026
eec176e
Merge remote-tracking branch 'origin/v2' into v2
ItsFlicker Apr 6, 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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: cache gradle packages
uses: actions/cache@v4
with:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: validate gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: setup jdk 8.0
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 8.0
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.gradle
.idea
.kotlin
build
20 changes: 11 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import io.izzel.taboolib.gradle.*
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
java
id("io.izzel.taboolib") version "2.0.23"
id("org.jetbrains.kotlin.jvm") version "2.1.20"
id("io.izzel.taboolib") version "2.0.31"
id("org.jetbrains.kotlin.jvm") version "2.2.20"
}

subprojects {
Expand Down Expand Up @@ -35,12 +36,13 @@ subprojects {
)
install(JavaScript)
install(Bukkit, BungeeCord, Velocity)
modules.remove("minecraft-chat")
disableOnSkippedVersion = false
// disableOnUnsupportedVersion = false
}
version {
taboolib = "6.2.3-12d4045"
taboolib = "6.2.4-e7fd043"
coroutines = null
// isSkipKotlin = true
// isSkipKotlinRelocate = true
}
}

Expand All @@ -61,7 +63,7 @@ subprojects {
compileOnly(kotlin("stdlib"))
compileOnly("com.google.code.gson:gson:2.8.5")
compileOnly("com.google.guava:guava:21.0")
compileOnly("net.kyori:adventure-api:4.21.0")
compileOnly("net.kyori:adventure-api:4.26.1")
}

// 编译配置
Expand All @@ -74,9 +76,9 @@ subprojects {
options.encoding = "UTF-8"
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-Xjvm-default=all", "-Xextended-compiler-checks")
compilerOptions {
jvmTarget = JvmTarget.JVM_1_8
freeCompilerArgs = listOf("-Xjvm-default=all")
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
group=me.arasple.mc.trchat
version=2.3.5
version=2.4.1
kotlin.incremental=true
kotlin.incremental.java=true
kotlin.incremental.useClasspathSnapshot=true
kotlin.caching.enabled=true
kotlin.parallel.tasks.in.project=true
7 changes: 5 additions & 2 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ taboolib {
name("EcoEnchants").with("bukkit").optional(true)
name("ItemsAdder").with("bukkit").optional(true)
name("Nova").with("bukkit").optional(true)
name("SayanVanish").with("bukkit").optional(true)
name("Multiverse-Core").with("bukkit").loadafter(true)
name("Geyser-Spigot").with("bukkit").loadafter(true)
}
// version {
// isSkipKotlin = true
// isSkipKotlinRelocate = true
// }
}
relocate("com.eatthepath.uuid.", "${rootProject.group}.library.uuid.")
// relocate("net.md_5.bungee", "net.md_5.bungee121")
// relocate("com.electronwill.nightconfig", "com.electronwill.nightconfig_3_6_7")
}

dependencies {
taboo("com.eatthepath:fast-uuid:0.2.0")
// taboo("net.md-5:bungeecord-chat:1.21-R0.3") { isTransitive = false }
}

tasks {
Expand Down
2 changes: 1 addition & 1 deletion project/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
// compileOnly(project(":project:module-chat"))
compileOnly(project(":project:module-chat"))
compileOnly("com.eatthepath:fast-uuid:0.2.0")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface ClientMessageManager {

fun close() = Unit

fun getPlayerNames(): Map<String, String?>
fun getPlayerNames(includeVanish: Boolean = false): Map<String, String?>

fun getExactName(name: String): String?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface ProxyMessageManager {

val executor: ExecutorService

val allNames: MutableMap<Int, Map<String, String?>>
val allNames: MutableMap<Int, List<Triple<String, String, String>>>

fun sendMessage(recipient: Any, vararg args: String): Future<*>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.util.concurrent.ConcurrentHashMap

object Cooldowns {

private val COOLDOWNS = ConcurrentHashMap<UUID, Cooldown>()
val COOLDOWNS = ConcurrentHashMap<UUID, Cooldown>()

fun getCooldownLeft(uuid: UUID, type: String): Long {
return COOLDOWNS.computeIfAbsent(uuid) { Cooldown() }.data.getOrDefault(type, 0L) - System.currentTimeMillis()
Expand Down Expand Up @@ -34,6 +34,5 @@ enum class CooldownType(val alias: String) {
MENTION_ALL("MentionAll"),
INVENTORY_SHOW("InventoryShow"),
ENDERCHEST_SHOW("EnderChestShow"),
IMAGE_SHOW("ImageShow")

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ private val reportedErrors = mutableListOf<String>()
val nilUUID = UUID(0, 0)
val papiRegex = "(%)(.+?)(%)|(:)(.+?)(:)|(?!\\{\")((\\{)(.+?)(}))".toRegex()

fun hasClass(className: String): Boolean {
return try {
Class.forName(className)
true
} catch (_: ClassNotFoundException) {
false
}
}

fun Throwable.print(title: String, printStackTrace: Boolean = true) {
console().sendMessage("§c[TrChat] §7$title")
console().sendMessage("§7${javaClass.name}: $localizedMessage")
Expand Down
7 changes: 4 additions & 3 deletions project/module-adventure/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
dependencies {
compileOnly(project(":project:common"))
// compileOnly(project(":project:module-chat"))
compileOnly("net.kyori:adventure-platform-bukkit:4.4.0")
compileOnly("net.kyori:adventure-text-serializer-plain:4.21.0")
compileOnly(project(":project:module-chat"))
compileOnly("net.kyori:adventure-platform-bukkit:4.4.1")
compileOnly("net.kyori:adventure-text-serializer-plain:4.26.1")
implementation("net.kyori:adventure-text-minimessage:4.26.1")
// paper native
compileOnly(fileTree(rootDir.resolve("libs")))
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.arasple.mc.trchat.module.adventure

import net.kyori.adventure.text.Component
import net.kyori.adventure.text.minimessage.MiniMessage
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer
Expand All @@ -27,6 +28,12 @@ private val plainSerializer: Any? = try {
null
}

val miniMessage: Any? = try {
MiniMessage.miniMessage()
} catch (_: Throwable) {
null
}

fun gson(component: Component) = (gsonSerializer as GsonComponentSerializer).serialize(component)

fun gson(string: String) = (gsonSerializer as GsonComponentSerializer).deserialize(string)
Expand All @@ -47,4 +54,14 @@ fun ComponentText.hoverItemAdventure(item: ItemStack): ComponentText {
this as? AdventureComponent ?: error("Unsupported component type.")
this.latest.hoverEvent(item.asHoverEvent())
return this
}

fun String.parseMiniMessage(): ComponentText {
val mm = miniMessage as? MiniMessage ?: return Components.text("No MiniMessage support in your environment!")
val component = mm.deserialize(this)
return if (Components.useAdventure) {
AdventureComponent(component)
} else {
Components.parseRaw(gson(component))
}
}
6 changes: 3 additions & 3 deletions project/module-chat/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dependencies {
compileOnly("com.google.code.gson:gson:2.8.7")
compileOnly("net.md-5:bungeecord-api:1.21-R0.3")
compileOnly("net.kyori:adventure-platform-bukkit:4.4.0")
compileOnly("net.kyori:adventure-text-serializer-plain:4.21.0")
compileOnly("net.md-5:bungeecord-api:1.21-R0.4")
compileOnly("net.kyori:adventure-platform-bukkit:4.4.1")
compileOnly("net.kyori:adventure-text-serializer-plain:4.26.1")
}

taboolib { subproject = true }
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package taboolib.module.chat

import java.awt.Color
import java.util.*

/**
* TabooLib
Expand Down Expand Up @@ -45,6 +46,9 @@ interface ComponentText : Source {
/** 添加选择器文本块 */
fun appendSelector(selector: String): ComponentText

/** 添加玩家头像文本块 */
fun appendHead(name: String? = null, id: UUID? = null, hat: Boolean = true, texture: String? = null): ComponentText

/** 显示文本 */
fun hoverText(text: String): ComponentText

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import net.kyori.adventure.text.event.ClickEvent
import net.kyori.adventure.text.event.HoverEvent
import net.kyori.adventure.text.format.TextColor
import net.kyori.adventure.text.format.TextDecoration
import net.kyori.adventure.text.`object`.ObjectContents
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer
Expand Down Expand Up @@ -114,6 +115,19 @@ class AdventureComponent() : ComponentText {
return this
}

override fun appendHead(name: String?, id: UUID?, hat: Boolean, texture: String?): ComponentText {
flush()
latest += Component.`object`(ObjectContents.playerHead().also {
it.name(name)
it.id(id)
it.hat(hat)
if (texture != null) {
it.texture(Key.key(texture))
}
}.build())
return this
}

override fun hoverText(text: String): ComponentText {
return hoverText(ComponentText.of(text))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ import net.md_5.bungee.api.chat.*
import net.md_5.bungee.api.chat.hover.content.Entity
import net.md_5.bungee.api.chat.hover.content.Item
import net.md_5.bungee.api.chat.hover.content.Text
import net.md_5.bungee.api.chat.objects.PlayerObject
import net.md_5.bungee.api.chat.player.Profile
import net.md_5.bungee.chat.ComponentSerializer
import taboolib.common.UnsupportedVersionException
import taboolib.common.platform.ProxyCommandSender
import taboolib.common.platform.ProxyPlayer
import taboolib.common.platform.function.onlinePlayers
import taboolib.module.chat.*
import java.awt.Color
import java.util.*

/**
* TabooLib
Expand Down Expand Up @@ -125,6 +128,12 @@ class DefaultComponent() : ComponentText {
return this
}

override fun appendHead(name: String?, id: UUID?, hat: Boolean, texture: String?): ComponentText {
flush()
latest += ObjectComponent(PlayerObject(Profile(name, id, null), hat))
return this
}

override fun hoverText(text: String): ComponentText {
return hoverText(ComponentText.of(text))
}
Expand Down
11 changes: 7 additions & 4 deletions project/module-compat/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@ repositories {
maven("https://maven.devs.beer/")
maven("https://nexus.scarsz.me/content/groups/public/")
maven("https://repo.oraxen.com/releases")
maven("https://repo.sayandev.org/snapshots")
// maven("https://repo.nexomc.com/releases")
}

dependencies {
compileOnly(project(":project:common"))
// compileOnly(project(":project:module-chat"))
compileOnly("ink.ptms.core:v12005:12005:universal")
compileOnly(project(":project:module-chat"))
compileOnly("ink.ptms.core:v12107:12107:universal")

compileOnly("com.discordsrv:discordsrv:1.26.0") { isTransitive = false }
compileOnly("com.willfp:eco:6.35.1") { isTransitive = false }

compileOnly("dev.lone:api-itemsadder:4.0.10") { isTransitive = false }
// compileOnly("io.th0rgal:oraxen:1.170.0") { isTransitive = false }
// compileOnly("com.nexomc:nexo:0.7.0")

compileOnly("xyz.xenondevs.nova:nova-api:0.12.13") { isTransitive = false }
compileOnly("io.th0rgal:oraxen:1.170.0") { isTransitive = false }

compileOnly("org.sayandev:sayanvanish-api:1.7.0-SNAPSHOT") { isTransitive = false }
compileOnly("org.sayandev:sayanvanish-bukkit:1.7.0-SNAPSHOT") { isTransitive = false }
}

taboolib { subproject = true }
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package me.arasple.mc.trchat.module.internal.hook

import taboolib.common.platform.Platform

@Target(AnnotationTarget.CLASS)
annotation class Hook(val platforms: Array<Platform> = [])
Loading