Compare commits

..

No commits in common. "0e48ddb281c23384e69c7a3f383ca595d44c0837" and "cfbc24bebfabe8c363941c4ede7a4ac70fdbc6b8" have entirely different histories.

4 changed files with 8 additions and 13 deletions

@ -1,5 +1,5 @@
group=io.github.beradq.adybubbles group=io.github.beradq.adybubbles
version=2.0.0-SNAPSHOT version=1.0.0
kotlin.incremental=true kotlin.incremental=true
kotlin.incremental.java=true kotlin.incremental.java=true
kotlin.caching.enabled=true kotlin.caching.enabled=true

@ -1,12 +1,16 @@
package io.github.beradq.adybubbles package io.github.beradq.adybubbles
import ink.ptms.adyeshach.taboolib.module.chat.RawMessage
import org.bukkit.command.CommandSender import org.bukkit.command.CommandSender
import org.bukkit.entity.Player import org.bukkit.entity.Player
import taboolib.common.platform.command.CommandBody import taboolib.common.platform.command.CommandBody
import taboolib.common.platform.command.CommandHeader import taboolib.common.platform.command.CommandHeader
import taboolib.common.platform.command.subCommand import taboolib.common.platform.command.subCommand
import taboolib.platform.util.nextChatInTick
import io.github.beradq.adybubbles.AdyBubbles.entityFinder import io.github.beradq.adybubbles.AdyBubbles.entityFinder
import taboolib.common.platform.ProxyCommandSender import taboolib.common.platform.ProxyCommandSender
import taboolib.common.platform.ProxyPlayer
import taboolib.common.platform.command.CommandContext
import taboolib.common.platform.function.adaptCommandSender import taboolib.common.platform.function.adaptCommandSender
import taboolib.common.platform.function.adaptPlayer import taboolib.common.platform.function.adaptPlayer
import taboolib.module.chat.component import taboolib.module.chat.component
@ -48,11 +52,9 @@ fun sendEditMessage(player: ProxyCommandSender, uuid: String, title: String) {
} }
@CommandHeader("bubbles-chat") @CommandHeader("bubbles-chat")
@Suppress("unused")
object BubblesChatCommand { object BubblesChatCommand {
@CommandBody @CommandBody
@Suppress("unused")
val play = subCommand { val play = subCommand {
dynamic("UUID") { dynamic("UUID") {
suggestion<CommandSender>(uncheck = true) { _, _ -> suggestion<CommandSender>(uncheck = true) { _, _ ->
@ -60,13 +62,12 @@ object BubblesChatCommand {
} }
execute<CommandSender> { _, context, _ -> execute<CommandSender> { _, context, _ ->
val uuid = context["UUID"] val uuid = context["UUID"]
TraitBubblesChat.startOnce(uuid) TraitBubblesChat.startOnec(uuid)
} }
} }
} }
@CommandBody @CommandBody
@Suppress("unused")
val editdata = subCommand { val editdata = subCommand {
dynamic("UUID") { dynamic("UUID") {
suggestion<CommandSender>(uncheck = true) { _, _ -> suggestion<CommandSender>(uncheck = true) { _, _ ->
@ -111,7 +112,6 @@ object BubblesChatCommand {
} }
@CommandBody @CommandBody
@Suppress("unused")
val edit = subCommand { val edit = subCommand {
dynamic("NPCID") { dynamic("NPCID") {
suggestion<CommandSender>(uncheck = true) { _, _ -> suggestion<CommandSender>(uncheck = true) { _, _ ->
@ -135,7 +135,6 @@ object BubblesChatCommand {
} }
@CommandBody @CommandBody
@Suppress("unused")
val edit2 = subCommand { val edit2 = subCommand {
dynamic("UUID") { dynamic("UUID") {
suggestion<CommandSender>(uncheck = true) { _, _ -> suggestion<CommandSender>(uncheck = true) { _, _ ->

@ -6,10 +6,8 @@ import taboolib.common.platform.command.*
import taboolib.platform.util.* import taboolib.platform.util.*
@CommandHeader("bubbles") @CommandHeader("bubbles")
@Suppress("unused")
object BubblesCommand { object BubblesCommand {
@CommandBody @CommandBody
@Suppress("unused")
val popup = subCommand { val popup = subCommand {
dynamic("NPC_ID") { dynamic("NPC_ID") {
suggestion<CommandSender>(uncheck = true) { _, _ -> suggestion<CommandSender>(uncheck = true) { _, _ ->
@ -64,7 +62,6 @@ object BubblesCommand {
@CommandBody @CommandBody
@Suppress("unused")
val clear = subCommand { val clear = subCommand {
dynamic("NPC_ID") { dynamic("NPC_ID") {
suggestion<CommandSender>(uncheck = true) { _, _ -> suggestion<CommandSender>(uncheck = true) { _, _ ->
@ -95,7 +92,6 @@ object BubblesCommand {
@CommandBody @CommandBody
@Suppress("unused")
val reload = subCommand { val reload = subCommand {
execute<CommandSender> { sender, _, _ -> execute<CommandSender> { sender, _, _ ->
Config.reload() Config.reload()

@ -11,6 +11,7 @@ import taboolib.common.platform.event.EventPriority
import taboolib.common.platform.event.SubscribeEvent import taboolib.common.platform.event.SubscribeEvent
import taboolib.common.platform.function.submit import taboolib.common.platform.function.submit
import taboolib.common.platform.service.PlatformExecutor import taboolib.common.platform.service.PlatformExecutor
import taboolib.common5.clong
import taboolib.module.chat.uncolored import taboolib.module.chat.uncolored
import java.util.concurrent.CompletableFuture import java.util.concurrent.CompletableFuture
@ -26,7 +27,6 @@ object TraitBubblesChat : Trait() {
return Bubbles(items.toMutableList(), mode) return Bubbles(items.toMutableList(), mode)
} }
@Suppress("unused")
fun setBubbles(uuid: String, bubbles: Bubbles) { fun setBubbles(uuid: String, bubbles: Bubbles) {
data[uuid] = mapOf( data[uuid] = mapOf(
"items" to bubbles.items, "items" to bubbles.items,
@ -93,7 +93,7 @@ object TraitBubblesChat : Trait() {
} }
} }
fun startOnce(uuid: String) { fun startOnec(uuid: String) {
val bubble = bubbles[uuid] ?: return val bubble = bubbles[uuid] ?: return
if (bubble.mode != ChatPopupMode.ONCE) return if (bubble.mode != ChatPopupMode.ONCE) return
bubble.resetState() bubble.resetState()