Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWoodworth committed Jun 11, 2021
1 parent 89ceed8 commit 320d330
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import net.benwoodworth.fastcraft.platform.world.FcItem
import org.bukkit.Material
import org.bukkit.Server
import org.bukkit.inventory.ItemStack
import org.bukkit.material.MaterialData
import java.util.*
import javax.inject.Inject
import javax.inject.Singleton
Expand All @@ -26,7 +25,7 @@ object FcItem_Bukkit_1_13 {
get() = value as Material

@Suppress("DEPRECATION")
override val FcItem.materialData: MaterialData
override val FcItem.materialData: org.bukkit.material.MaterialData
get() = error("MaterialData not supported")

private fun Material.getNameLocaleKey(prefix: String): String {
Expand Down Expand Up @@ -81,7 +80,7 @@ object FcItem_Bukkit_1_13 {
get() = fromMaterial(Material.LIGHT_GRAY_STAINED_GLASS_PANE)

@Suppress("DEPRECATION")
override fun fromMaterialData(materialData: MaterialData): FcItem {
override fun fromMaterialData(materialData: org.bukkit.material.MaterialData): FcItem {
error("MaterialData is not supported")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ object FcItem_Bukkit_1_15 {
localizer = localizer,
fcItemFactory = fcItemFactory,
) {
@Suppress("USELESS_CAST") // IDE thinks it's an error without the cast
override val FcItem.craftingRemainingItem: FcItem?
get() = (material as Material).craftingRemainingItem?.let { fcItemFactory.fromMaterial(it) }
}
Expand Down

0 comments on commit 320d330

Please sign in to comment.