Skip to content

Commit

Permalink
fix: fix EnderCrystalEnhancer listener
Browse files Browse the repository at this point in the history
  • Loading branch information
ybw0014 committed May 7, 2024
1 parent 4b7851a commit 35026dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack
import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType
import io.github.thebusybiscuit.slimefun4.core.handlers.ItemConsumptionHandler
import io.github.thebusybiscuit.slimefun4.implementation.items.SimpleSlimefunItem
import org.bukkit.entity.Player
import org.bukkit.event.player.PlayerItemConsumeEvent
import org.bukkit.inventory.ItemStack

Expand All @@ -15,7 +14,7 @@ class FakePotionItem(
recipeType: RecipeType,
recipe: Array<ItemStack?>
) : SimpleSlimefunItem<ItemConsumptionHandler>(itemGroup, item, recipeType, recipe) {
override fun getItemHandler() = ItemConsumptionHandler { e: PlayerItemConsumeEvent, _: Player, _: ItemStack ->
override fun getItemHandler() = ItemConsumptionHandler { e: PlayerItemConsumeEvent, _, _ ->
e.isCancelled = true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class EnderCrystalEnhancerListener(plugin: UltimateGenerators2) : Listener {

@EventHandler
fun onUse(e: PlayerInteractEntityEvent) {
if (e.rightClicked is EnderCrystal) {
if (e.rightClicked !is EnderCrystal) {
return
}

Expand Down

0 comments on commit 35026dd

Please sign in to comment.