Skip to content

Commit c1e19b5

Browse files
committed
Update gradle-wrapper.properties
1 parent 8bb55eb commit c1e19b5

File tree

8 files changed

+6
-19
lines changed

8 files changed

+6
-19
lines changed

THE.md

-9
This file was deleted.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/kotlin/me/arasple/mc/trmenu/api/action/Actions.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ object Actions {
106106
fun readAction(any: Any): List<AbstractAction> {
107107
val actions = mutableListOf<AbstractAction>()
108108
val findParser: (String) -> ((Any, ActionOption) -> AbstractAction) = { name ->
109-
registries.find { it.first.matches(name) }?.second ?: registries[0].second
109+
registries.find { it.first.matches(name.toLowerCase()) }?.second ?: registries[0].second
110110
}
111111

112112
when (any) {
113113
is Map<*, *> -> {
114114
val entry = any.entries.firstOrNull() ?: return actions
115-
val key = entry.key.toString().toLowerCase()
115+
val key = entry.key.toString()
116116
val value = entry.value ?: return actions
117117
findParser(key).invoke(value, ActionOption()).let { actions.add(it) }
118118
}

src/main/kotlin/me/arasple/mc/trmenu/module/conf/MenuSerializer.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package me.arasple.mc.trmenu.module.conf
22

3-
import io.izzel.taboolib.kotlin.kether.action.bukkit.PlayerOperator
4-
import io.izzel.taboolib.kotlin.kether.action.bukkit.PlayerOperators
53
import io.izzel.taboolib.module.nms.nbt.NBTBase
64
import io.izzel.taboolib.module.nms.nbt.NBTCompound
75
import me.arasple.mc.trmenu.api.action.pack.Reactions
@@ -36,6 +34,7 @@ import kotlin.math.max
3634
/**
3735
* @author Arasple
3836
* @date 2021/1/25 10:18
37+
* 有好心人帮忙重写下这个模块吗 写的太烂了
3938
*/
4039
@Deprecated("TO BE IMPROVE")
4140
object MenuSerializer : ISerializer {

src/main/kotlin/me/arasple/mc/trmenu/module/display/Menu.kt

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ class Menu(
7676
fun page(viewer: Player, page: Int) {
7777
Performance.MIRROR.check("Menu:Event:ChangePage") {
7878
val session = MenuSession.getSession(viewer)
79-
8079
val previous = session.layout()!!
8180
val layout = layout[page]
8281
val receptacle: Receptacle

src/main/kotlin/me/arasple/mc/trmenu/module/display/item/Meta.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import me.arasple.mc.trmenu.util.Regexs
99
import org.bukkit.inventory.ItemFlag
1010
import org.bukkit.inventory.ItemStack
1111
import org.bukkit.inventory.meta.ItemMeta
12-
import kotlin.math.roundToInt
1312

1413
/**
1514
* @author Arasple
@@ -29,7 +28,7 @@ class Meta(
2928
val isDynamic = isAmountDynamic || isNBTDynamic || isShinyDynamic
3029

3130
fun amount(session: MenuSession): Int {
32-
return (if (isAmountDynamic) session.parse(amount) else amount).toDoubleOrNull()?.roundToInt() ?: 1
31+
return (if (isAmountDynamic) session.parse(amount) else amount).toDoubleOrNull()?.toInt() ?: 1
3332
}
3433

3534
fun shiny(session: MenuSession, builder: ItemBuilder) {

src/main/kotlin/me/arasple/mc/trmenu/module/internal/command/impl/CommandTemplate.kt

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import org.bukkit.inventory.ItemStack
2525
* @author Arasple
2626
* @date 2020/7/22 12:08
2727
*/
28-
@Deprecated("TO BE IMPROVED")
2928
class CommandTemplate : BaseSubCommand() {
3029

3130
override fun getArguments(): Array<Argument> {

src/main/kotlin/me/arasple/mc/trmenu/module/internal/script/FunctionParser.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ object FunctionParser {
4848
else it.value
4949
}
5050
}.onFailure {
51-
it.print("Error occured when parsing the string")
51+
it.print("Error occured when parsing the string for player ${player.name}: $input")
5252
}.getOrElse { input }
5353
}
5454

0 commit comments

Comments
 (0)