Fixed warnings
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package com.willfp.talismans.command
|
||||
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
import com.willfp.eco.core.command.CommandHandler
|
||||
import com.willfp.eco.core.command.impl.Subcommand
|
||||
import org.bukkit.command.CommandSender
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.willfp.talismans.command
|
||||
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
import com.willfp.eco.core.command.CommandHandler
|
||||
import com.willfp.eco.core.command.impl.PluginCommand
|
||||
import org.bukkit.command.CommandSender
|
||||
|
||||
|
||||
@@ -3,6 +3,5 @@ package com.willfp.talismans.config
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
import com.willfp.eco.core.config.BaseConfig
|
||||
import com.willfp.eco.core.config.ConfigType
|
||||
import com.willfp.eco.core.config.yaml.YamlBaseConfig
|
||||
|
||||
class TalismansYml(plugin: EcoPlugin) : BaseConfig("talismans", plugin, false, ConfigType.YAML)
|
||||
@@ -22,7 +22,7 @@ import org.bukkit.inventory.ItemStack
|
||||
import org.bukkit.permissions.Permission
|
||||
import org.bukkit.permissions.PermissionDefault
|
||||
import org.bukkit.persistence.PersistentDataType
|
||||
import java.util.*
|
||||
import java.util.Objects
|
||||
|
||||
class Talisman(
|
||||
private val config: Config,
|
||||
@@ -98,14 +98,14 @@ class Talisman(
|
||||
Talismans.addNewTalisman(this)
|
||||
}
|
||||
|
||||
override fun equals(o: Any?): Boolean {
|
||||
if (this === o) {
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) {
|
||||
return true
|
||||
}
|
||||
if (o !is Talisman) {
|
||||
if (other !is Talisman) {
|
||||
return false
|
||||
}
|
||||
return key == o.key
|
||||
return key == other.key
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
|
||||
@@ -21,7 +21,7 @@ class TalismanCraftListener : Listener {
|
||||
val recipe = event.recipe as? ShapedRecipe ?: return
|
||||
|
||||
val key = recipe.key.key.replace("_displayed", "")
|
||||
val talisman = getByID(key) ?: return
|
||||
getByID(key) ?: return
|
||||
|
||||
if (event.viewers.isEmpty()) {
|
||||
return
|
||||
@@ -44,7 +44,7 @@ class TalismanCraftListener : Listener {
|
||||
val recipe = event.recipe as? ShapedRecipe ?: return
|
||||
|
||||
val key = recipe.key.key.replace("_displayed", "")
|
||||
val talisman = getByID(key) ?: return
|
||||
getByID(key) ?: return
|
||||
|
||||
if (event.viewers.isEmpty()) {
|
||||
return
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:Suppress("UNUSED_PARAMETER")
|
||||
|
||||
package com.willfp.talismans.talismans.util
|
||||
|
||||
import com.willfp.eco.core.EcoPlugin
|
||||
|
||||
Reference in New Issue
Block a user