diff options
author | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2021-10-24 01:05:38 -0400 |
---|---|---|
committer | My-Name-Is-Jeff <37018278+My-Name-Is-Jeff@users.noreply.github.com> | 2021-10-24 01:05:38 -0400 |
commit | 0a009ca77519bbec66317ff7db7df4a48e5ebd87 (patch) | |
tree | db1a64a231c0105bc036d9385467d8bae948cb5f | |
parent | ed67098c278e20063a8dd208a298e0d9a9d038ea (diff) | |
download | SkytilsMod-0a009ca77519bbec66317ff7db7df4a48e5ebd87.tar.gz SkytilsMod-0a009ca77519bbec66317ff7db7df4a48e5ebd87.tar.bz2 SkytilsMod-0a009ca77519bbec66317ff7db7df4a48e5ebd87.zip |
fix mayor info on one perk
-rw-r--r-- | src/main/kotlin/skytils/skytilsmod/features/impl/handlers/MayorInfo.kt | 6 | ||||
-rw-r--r-- | src/main/kotlin/skytils/skytilsmod/features/impl/misc/SlayerFeatures.kt | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/kotlin/skytils/skytilsmod/features/impl/handlers/MayorInfo.kt b/src/main/kotlin/skytils/skytilsmod/features/impl/handlers/MayorInfo.kt index c4eba66d..d3889aa6 100644 --- a/src/main/kotlin/skytils/skytilsmod/features/impl/handlers/MayorInfo.kt +++ b/src/main/kotlin/skytils/skytilsmod/features/impl/handlers/MayorInfo.kt @@ -148,9 +148,9 @@ object MayorInfo { ) { val slot = event.slot val item = slot.stack - if (item != null && item.item === Items.skull && (item.displayName.contains("Mayor $currentMayor") || currentMayor == null && item.displayName.contains( + if (item != null && item.item === Items.skull && (item.displayName.contains("Mayor $currentMayor") || (currentMayor == null && item.displayName.contains( "Mayor " - ) && !item.displayName.contains("Election")) + ) && !item.displayName.contains("Election"))) ) { if (currentMayor == null) { isLocal = true @@ -160,7 +160,7 @@ object MayorInfo { } val color = item.displayName.substring(0, 2) val lore = ItemUtil.getItemLore(item) - if (lore.contains("§8Perks List") && lore.contains("§7The listed perks are")) { + if (lore.contains("§8Perks List") && (lore.contains("§7The listed perks are") || lore.contains("§7This perk is available to all"))) { val perks = HashSet<String>() for (line in lore) { if (line.startsWith(color) && line.indexOf("§") == line.lastIndexOf("§")) { diff --git a/src/main/kotlin/skytils/skytilsmod/features/impl/misc/SlayerFeatures.kt b/src/main/kotlin/skytils/skytilsmod/features/impl/misc/SlayerFeatures.kt index c189a8e1..ac3a6e53 100644 --- a/src/main/kotlin/skytils/skytilsmod/features/impl/misc/SlayerFeatures.kt +++ b/src/main/kotlin/skytils/skytilsmod/features/impl/misc/SlayerFeatures.kt @@ -601,6 +601,8 @@ class SlayerFeatures { nukekebiHeads.clear() lastYangGlyphSwitch = -1L lastYangGlyphSwitchTicks = -1 + yangGlyph = null + yangGlyphEntity = null } } } |