fish
This commit is contained in:
parent
9891a7188d
commit
90c80170bb
|
|
@ -34,7 +34,11 @@ object FishListener {
|
|||
val rodItem = if (offHand) player.inventory.itemInOffHand else player.inventory.itemInMainHand
|
||||
|
||||
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--
|
||||
|
|
|
|||
Loading…
Reference in New Issue