Skip to content

Commit 0a4fe6a

Browse files
committed
📝 修正插件名
1 parent fdf3632 commit 0a4fe6a

8 files changed

Lines changed: 26 additions & 17 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version=0.0.2
1+
version=0.0.3
22
group=org.crashvibe

settings.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name = "CalStack"
1+
rootProject.name = "CalcStack"

src/main/kotlin/org/crashvibe/calStack/CalStack.kt renamed to src/main/kotlin/org/crashvibe/CalcStack/CalcStack.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package org.crashvibe.calStack
1+
package org.crashvibe.CalcStack
22

33
import org.bstats.bukkit.Metrics
44
import org.bukkit.plugin.java.JavaPlugin
5-
import org.crashvibe.calStack.config.Config
5+
import org.crashvibe.CalcStack.config.Config
66
import java.util.*
77

88

9-
class CalStack : JavaPlugin() {
9+
class CalcStack : JavaPlugin() {
1010
override fun onLoad() {
1111
instance = this
1212
Metrics(this, 28779)
@@ -21,7 +21,7 @@ class CalStack : JavaPlugin() {
2121
}
2222

2323
companion object {
24-
lateinit var instance: CalStack
24+
lateinit var instance: CalcStack
2525
private set
2626
}
2727
}

src/main/kotlin/org/crashvibe/calStack/Command.kt renamed to src/main/kotlin/org/crashvibe/CalcStack/Command.kt

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.crashvibe.calStack
1+
package org.crashvibe.CalcStack
22

33
import net.kyori.adventure.text.Component
44
import org.bukkit.Bukkit
@@ -11,7 +11,7 @@ import org.bukkit.inventory.ItemStack
1111
import org.bukkit.inventory.Recipe
1212
import org.bukkit.inventory.ShapedRecipe
1313
import org.bukkit.inventory.ShapelessRecipe
14-
import org.crashvibe.calStack.config.Config
14+
import org.crashvibe.CalcStack.config.Config
1515
import java.util.*
1616
import java.util.stream.Collectors
1717
import kotlin.math.ceil
@@ -63,20 +63,29 @@ class Command : TabExecutor {
6363

6464
val chestSize = Config.configData.chest_size
6565

66-
Bukkit.getScheduler().runTaskAsynchronously(CalStack.instance, Runnable {
66+
Bukkit.getScheduler().runTaskAsynchronously(CalcStack.instance, Runnable {
6767
val maxStackSize =
6868
if (Config.configData.custom_stacksize.enabled) Config.configData.custom_stacksize.value else material.maxStackSize
6969
val stackInfo = calculateStackInfo(quantity, maxStackSize, chestSize)
7070

7171
val materialDetails = getCraftingMaterials(material, quantity, maxStackSize, chestSize)
72-
Bukkit.getScheduler().runTask(CalStack.instance, Runnable {
72+
Bukkit.getScheduler().runTask(CalcStack.instance, Runnable {
7373
val results = Config.langData.results
7474
sender.sendMessage(results.header)
75-
sender.sendMessage(formatResultMessage(material.name.lowercase(Locale.getDefault()), getTranslatedItemName(material), stackInfo, results.item))
75+
sender.sendMessage(
76+
formatResultMessage(
77+
material.name.lowercase(Locale.getDefault()),
78+
getTranslatedItemName(material),
79+
stackInfo,
80+
results.item
81+
)
82+
)
7683
sender.sendMessage(results.quantity.replace("{quantity}", quantity.toString()))
7784
sender.sendMessage(formatResultMessage(material.name.lowercase(), "", stackInfo, results.stacks))
7885
sender.sendMessage(results.remaining.replace("{remaining}", stackInfo.remainingItems.toString()))
79-
sender.sendMessage(results.chests.replace("{chests}", stackInfo.chests.toString()).replace("{chest_size}", chestSize.toString()))
86+
sender.sendMessage(
87+
results.chests.replace("{chests}", stackInfo.chests.toString()).replace("{chest_size}", chestSize.toString())
88+
)
8089

8190
if (materialDetails.isNotEmpty()) {
8291
sender.sendMessage(results.ingredients.header)

src/main/kotlin/org/crashvibe/calStack/config/Config.kt renamed to src/main/kotlin/org/crashvibe/CalcStack/config/Config.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.crashvibe.calStack.config
1+
package org.crashvibe.CalcStack.config
22

33
import de.exlll.configlib.YamlConfigurations
44
import java.nio.file.Path

src/main/kotlin/org/crashvibe/calStack/config/Lang.kt renamed to src/main/kotlin/org/crashvibe/CalcStack/config/Lang.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.crashvibe.calStack.config
1+
package org.crashvibe.CalcStack.config
22

33
import de.exlll.configlib.Configuration
44

src/main/kotlin/org/crashvibe/calStack/config/PluginConfig.kt renamed to src/main/kotlin/org/crashvibe/CalcStack/config/PluginConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.crashvibe.calStack.config
1+
package org.crashvibe.CalcStack.config
22

33
import de.exlll.configlib.Comment
44
import de.exlll.configlib.Configuration

src/main/resources/plugin.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: CalStack
1+
name: CalcStack
22
version: ${version}
3-
main: org.crashvibe.calStack.CalStack
3+
main: org.crashvibe.CalcStack.CalcStack
44
description: 计算物品堆叠和箱子数量
55
api-version: '1.13'
66
folia-supported: true

0 commit comments

Comments
 (0)