Skip to content

Commit

Permalink
Fixes player Folia adaption.
Browse files Browse the repository at this point in the history
  • Loading branch information
toxicity188 committed May 5, 2024
1 parent bca3052 commit 80cb1ac
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class NMSImpl: NMS {
fun add() {
val bukkit = e.bukkitEntity
if (bukkit is CraftLivingEntity && bukkit.isValid) {
val adapt = plugin.mobManager().entity(foliaAdapt(bukkit))
val adapt = plugin.mobManager().entity(if (bukkit is Player) foliaAdapt(bukkit) else foliaAdapt(bukkit))
adapt.mob()?.let {
set.addAll(it.configuration().healthBars())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class NMSImpl: NMS {
fun add() {
val bukkit = e.bukkitEntity
if (bukkit is CraftLivingEntity && bukkit.isValid) {
val adapt = plugin.mobManager().entity(foliaAdapt(bukkit))
val adapt = plugin.mobManager().entity(if (bukkit is Player) foliaAdapt(bukkit) else foliaAdapt(bukkit))
adapt.mob()?.let {
set.addAll(it.configuration().healthBars())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class NMSImpl: NMS {
fun add() {
val bukkit = e.bukkitEntity
if (bukkit is CraftLivingEntity && bukkit.isValid) {
val adapt = plugin.mobManager().entity(foliaAdapt(bukkit))
val adapt = plugin.mobManager().entity(if (bukkit is Player) foliaAdapt(bukkit) else foliaAdapt(bukkit))
adapt.mob()?.let {
set.addAll(it.configuration().healthBars())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class NMSImpl: NMS {
fun add() {
val bukkit = e.bukkitEntity
if (bukkit is CraftLivingEntity && bukkit.isValid) {
val adapt = plugin.mobManager().entity(foliaAdapt(bukkit))
val adapt = plugin.mobManager().entity(if (bukkit is Player) foliaAdapt(bukkit) else foliaAdapt(bukkit))
adapt.mob()?.let {
set.addAll(it.configuration().healthBars())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class NMSImpl: NMS {
fun add() {
val bukkit = e.bukkitEntity
if (bukkit is CraftLivingEntity && bukkit.isValid) {
val adapt = plugin.mobManager().entity(foliaAdapt(bukkit))
val adapt = plugin.mobManager().entity(if (bukkit is Player) foliaAdapt(bukkit) else foliaAdapt(bukkit))
adapt.mob()?.let {
set.addAll(it.configuration().healthBars())
}
Expand Down

0 comments on commit 80cb1ac

Please sign in to comment.