Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev/6.2.0' into dev/6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bkm016 committed Sep 22, 2024
2 parents a653e83 + 0da2f7f commit 7ea9d54
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,13 @@ class VirtualInventory(val bukkitInventory: Inventory, storageContents: List<Ite
override fun getLocation(): Location? {
return bukkitInventory.location
}

/**
* 对于老版本, Inventory 下有 getTitle 函数
* 部分插件监听 InventoryCloseEvent 时调用, 所以得给个标题给他们玩
*/
fun getTitle(): String {
return remoteInventory?.title ?: ""
}

}

0 comments on commit 7ea9d54

Please sign in to comment.