fix bugs
This commit is contained in:
@@ -29,8 +29,8 @@ interface Item {
|
|||||||
fun update(player: Player): ItemStack
|
fun update(player: Player): ItemStack
|
||||||
|
|
||||||
fun exeCommands(player: Player, amount: Int) {
|
fun exeCommands(player: Player, amount: Int) {
|
||||||
for (a in 1..amount){
|
commands.map { it.replace("%player%", player.name).replace("\${amount}", amount.toString()) }
|
||||||
commands.map { it.replace("%player%", player.name) }.forEach { command ->
|
.forEach { command ->
|
||||||
if (command.startsWith("[tell] ")) {
|
if (command.startsWith("[tell] ")) {
|
||||||
player.sendMessage(command.substring(7).colored())
|
player.sendMessage(command.substring(7).colored())
|
||||||
} else if (command.startsWith("[console] ")) {
|
} else if (command.startsWith("[console] ")) {
|
||||||
@@ -51,6 +51,5 @@ interface Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -67,4 +67,4 @@ items:
|
|||||||
# 关闭此选项 可只执行命令 不给原版物品
|
# 关闭此选项 可只执行命令 不给原版物品
|
||||||
vanilla: false
|
vanilla: false
|
||||||
commands:
|
commands:
|
||||||
- '[console] ia give %player% 物品'
|
- '[console] ia give %player% 物品 ${amount}'
|
||||||
Reference in New Issue
Block a user