This commit is contained in:
TONY_All 2022-07-03 22:29:20 +08:00
parent 9891a7188d
commit 90c80170bb
1 changed files with 5 additions and 1 deletions

View File

@ -34,7 +34,11 @@ object FishListener {
val rodItem = if (offHand) player.inventory.itemInOffHand else player.inventory.itemInMainHand val rodItem = if (offHand) player.inventory.itemInOffHand else player.inventory.itemInMainHand
if (fishEvent.state == PlayerFishEvent.State.FISHING) { if (fishEvent.state == PlayerFishEvent.State.FISHING) {
if (!rodItem.itemMeta!!.persistentDataContainer.has(SanseFish.baitKey, PersistentDataType.STRING)) return if (!rodItem.itemMeta!!.persistentDataContainer.has(
SanseFish.baitKey,
PersistentDataType.STRING
)
) return player.sendMessage("§e| §7该鱼竿未安装鱼饵. 请手持鱼竿左键安装.").also { fishEvent.isCancelled = true }
} }
if (fishEvent.state != PlayerFishEvent.State.BITE) rod.durability-- if (fishEvent.state != PlayerFishEvent.State.BITE) rod.durability--