Skip to content

Commit f1b5dda

Browse files
authored
Merge pull request #189 from YsGqHY/stable/v3
fix(api): 修复高版本 chat 动作无法使用
2 parents 8e5831b + 93d6a28 commit f1b5dda

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

api/action/src/main/kotlin/trplugins/menu/api/action/impl/send/Chat.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Chat(handle: ActionHandle) : ActionBase(handle) {
1717
override val regex = "chat|send|say".toRegex()
1818

1919
override fun onExecute(contents: ActionContents, player: ProxyPlayer, placeholderPlayer: ProxyPlayer) {
20-
contents.stringContent().parseContentSplited(placeholderPlayer, contents.stringContent()).forEach {
20+
contents.stringContent().parseContentSplited(placeholderPlayer).forEach {
2121
player.chat(it)
2222
}
2323
}

api/action/src/main/kotlin/trplugins/menu/api/action/impl/send/Command.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Command(handle: ActionHandle) : ActionBase(handle) {
2323
placeholderPlayer.parseContentSplited(contents.stringContent(), ";").forEach {
2424
// Folia 必须使用实体调度器 暂时不做优雅的兼容性处理 后期其他功能需要单独处理Folia时再修改
2525
if (Folia.isFolia) {
26-
FoliaUtil.invokeCommandWithEntityScheduler(player,it)
26+
FoliaUtil.invokeCommandWithEntityScheduler(player, it)
2727
}else{
2828
submit(async = false) {
2929
player.performCommand(it)

api/action/src/main/kotlin/trplugins/menu/api/utils/FoliaUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import taboolib.platform.BukkitPlugin
1111
*/
1212
object FoliaUtil {
1313

14-
fun invokeCommandWithEntityScheduler(player: ProxyPlayer,command:String){
14+
fun invokeCommandWithEntityScheduler(player: ProxyPlayer, command:String){
1515
getEntityScheduler(player).execute(BukkitPlugin.getInstance(),{
1616
player.performCommand(command)
1717
},null,0)

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ subprojects {
6161
repoTabooLib = "https://repo.aeoliancloud.com/repository/releases"
6262
}
6363
version {
64-
taboolib = "6.2.3-052537b"
64+
taboolib = "6.2.3-5297ae6"
6565
coroutines = null
6666
}
6767
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
group=me.arasple.mc.trmenu
2-
version=3.6.5
2+
version=3.6.7

plugin/src/main/kotlin/trplugins/menu/module/conf/Loader.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package trplugins.menu.module.conf
33
import org.bukkit.Bukkit
44
import org.bukkit.command.CommandSender
55
import taboolib.common.platform.function.console
6+
import taboolib.common.platform.function.getDataFolder
67
import taboolib.common.platform.function.releaseResourceFile
78
import taboolib.module.lang.sendLang
89
import taboolib.platform.util.sendLang
@@ -23,7 +24,7 @@ object Loader {
2324

2425
private val folder by lazy {
2526
Menu.menus.clear()
26-
val folder = File(TrMenu.plugin.dataFolder, "menus")
27+
val folder = File(getDataFolder(), "menus")
2728

2829
if (!folder.exists()) {
2930
arrayOf(

0 commit comments

Comments
 (0)