Skip to content

Commit

Permalink
fix: 修复二维码地图不显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
BingZi-233 committed Dec 9, 2023
1 parent abd71db commit 3be2b6b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
group=online.bingiz.bilibili.video
version=1.0.19
version=1.0.20
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package online.bingiz.bilibili.video.internal.helper

import org.bukkit.entity.Player
import org.bukkit.Bukkit
import taboolib.common.platform.ProxyPlayer
import taboolib.module.nms.MinecraftVersion
import taboolib.module.nms.NMSMap
Expand All @@ -15,14 +15,15 @@ fun ProxyPlayer.sendMapVersionCompatible(
height: Int = 128,
builder: ItemBuilder.() -> Unit = {}
) {
if (this is Player) {
this.uniqueId
Bukkit.getPlayer(this.uniqueId)?.let {
when (MinecraftVersion.major) {
MinecraftVersion.V1_20 -> {
taboolib.module.nms.buildMap(image, hand, width, height, builder).sendTo(this)
taboolib.module.nms.buildMap(image, hand, width, height, builder).sendTo(it)
}

else -> {
this.sendMap(image, hand, width, height, builder)
it.sendMap(image, hand, width, height, builder)
}
}
}
Expand Down

0 comments on commit 3be2b6b

Please sign in to comment.