File tree Expand file tree Collapse file tree
plugin/src/main/kotlin/trplugins/menu/module Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11group =me.arasple.mc.trmenu
2- version =3.12.4
2+ version =3.12.5
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ class IconProperty(
2727 }
2828
2929 fun isLoreUpdatable (session : MenuSession ): Boolean {
30- return display.lore(session).cyclable() || display.lore(session).elements.any { it -> Regexs .containsPlaceholder(it.lore.joinToString(" " ) { it.first }) }
30+ return display.lore(session).cyclable() || display.lore(session).elements.any { lore ->
31+ lore.lore.any { (line, condition) -> condition != null || Regexs .containsPlaceholder(line) }
32+ }
3133 }
3234
3335 fun handleClick (type : ReceptacleClickType , session : MenuSession ) {
@@ -44,4 +46,4 @@ class IconProperty(
4446 }
4547
4648
47- }
49+ }
Original file line number Diff line number Diff line change @@ -63,14 +63,13 @@ class HookVault : HookAbstract() {
6363 /* *
6464 * 当前 Economy provider 背后的实现插件实例。
6565 *
66- * provider 自身就是 Bukkit Plugin(兜底分支)时直接返回 ;
67- * 否则按 [Economy.getName] 在 Bukkit 插件表中匹配 。
66+ * ServicesManager provider 直接使用注册插件 ;
67+ * 兜底 provider 自身就是 Bukkit Plugin 。
6868 */
6969 val economyPlugin: Plugin ?
7070 get() {
71- val provider = economyAPI ? : return null
72- return provider as ? Plugin
73- ? : Bukkit .getPluginManager().getPlugin(provider.name)
71+ val registration = Bukkit .getServicesManager().getRegistration(Economy ::class .java)
72+ return if (registration?.plugin?.isEnabled == true ) registration.plugin else pluginEconomy as ? Plugin
7473 }
7574
7675 /* *
You can’t perform that action at this time.
0 commit comments