Compare commits

...

4 Commits

Author SHA1 Message Date
Auxilor
5645698d3f libreforge-updater 2023-06-03 15:45:34 +01:00
Auxilor
d4cf108d52 Invisible players will no longer have visible pets 2023-06-03 14:00:18 +01:00
Auxilor
95c8fe5277 libreforge-updater 2023-06-01 12:33:34 +01:00
Auxilor
0975391c9c libreforge-updater 2023-05-30 16:10:49 +01:00
2 changed files with 12 additions and 3 deletions

View File

@@ -36,6 +36,11 @@ class PetDisplay(
val pet = player.activePet val pet = player.activePet
if (pet != null) { if (pet != null) {
if (player.isInvisible) {
remove(player)
return
}
@Suppress("DEPRECATION") @Suppress("DEPRECATION")
stand.customName = plugin.configYml.getString("pet-entity.name") stand.customName = plugin.configYml.getString("pet-entity.name")
.replace("%player%", player.displayName) .replace("%player%", player.displayName)
@@ -77,6 +82,10 @@ class PetDisplay(
} }
private fun getOrNew(player: Player): ArmorStand? { private fun getOrNew(player: Player): ArmorStand? {
if (player.isInvisible) {
return null
}
val tracked = trackedEntities[player.uniqueId] val tracked = trackedEntities[player.uniqueId]
val existing = tracked?.stand val existing = tracked?.stand

View File

@@ -1,5 +1,5 @@
#libreforge-updater #libreforge-updater
#Wed May 24 14:58:12 BST 2023 #Sat Jun 03 15:45:34 BST 2023
kotlin.code.style=official kotlin.code.style=official
libreforge-version=4.16.1 libreforge-version=4.17.2
version=2.15.1 version=2.16.2