fix MAXMC-T-6

This commit is contained in:
TONY_All 2023-06-16 01:44:03 +08:00
parent 9416250e13
commit 3d09b48da8
Signed by: tony_all
GPG Key ID: 08A2261D5D6F746A
1 changed files with 3 additions and 5 deletions

View File

@ -17,8 +17,6 @@ import org.bukkit.event.player.PlayerInteractEvent
import org.bukkit.event.player.PlayerMoveEvent
import org.bukkit.event.player.PlayerRespawnEvent
import taboolib.common.platform.event.SubscribeEvent
import taboolib.platform.util.feed
import taboolib.platform.util.saturate
import taboolib.platform.util.sendLang
object GameListener {
@ -86,9 +84,9 @@ object GameListener {
@SubscribeEvent
fun protectHunger(hungerEvent: FoodLevelChangeEvent) {
hungerEvent.isCancelled = true
hungerEvent.entity.run {
feed()
saturate()
(hungerEvent.entity as Player).run {
foodLevel = 20
saturation = 20f
}
}
}