Skip to content

Commit

Permalink
add WM 3.0.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
CJCrafter committed Oct 16, 2023
1 parent ae79d80 commit 36cddf8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ repositories {

dependencies {
compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT")
implementation("io.lumine:Mythic-Dist:5.0.1-SNAPSHOT")
compileOnly("me.deecaad:mechanicscore:2.5.0-SNAPSHOT2")
compileOnly("me.deecaad:weaponmechanics:2.7.0-SNAPSHOT2")
compileOnly("io.lumine:Mythic-Dist:5.0.1-SNAPSHOT")
compileOnly("me.deecaad:mechanicscore:3.0.0")
compileOnly("me.deecaad:weaponmechanics:3.0.0")
implementation("org.bstats:bstats-bukkit:3.0.1")
implementation("me.cjcrafter:mechanicsautodownload:1.1.2")
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/cjcrafter/armormechanics/ArmorSet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ArmorSet : Serializer<ArmorSet> {
val options: Set<String> = ArmorMechanics.INSTANCE.armors.keys
var allNull = true
for (i in temp.indices) {
val key = temp[i]
val key = temp[i]!!

// The title is allowed to be null, since a user may want to have a
// set of armor that doesn't include, for example, a helmet.
Expand Down Expand Up @@ -63,7 +63,7 @@ class ArmorSet : Serializer<ArmorSet> {
)
}

val bonus = data.of("Bonus_Effects").assertExists().serialize(BonusEffect::class.java)
val bonus = data.of("Bonus_Effects").assertExists().serialize(BonusEffect::class.java)!!
ArmorMechanics.INSTANCE.effects[data.key] = bonus
val set = ArmorSet(bonus, temp[0], temp[1], temp[2], temp[3])
ArmorMechanics.INSTANCE.sets[data.key] = set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ object Command {
command.register()
}

fun give(sender: CommandSender, entities: List<Entity>, title: String?, data: Map<String?, Any>) {
fun give(sender: CommandSender, entities: List<Entity>, title: String, data: Map<String?, Any>) {

// Since we want to ignore spelling/capitalization errors, we should
// make sure the given 'title' matches to an actual armor-title.
Expand Down

0 comments on commit 36cddf8

Please # to comment.