Skip to content

Commit

Permalink
disable player-head skin url fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed Jul 25, 2023
1 parent ef5c34b commit 34aef26
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ object ChattyPermissions {
Permission("chatty.tags.hover") to StandardTags.hoverEvent(),
Permission("chatty.tags.reset") to StandardTags.reset(),
Permission("chatty.tags.shift") to ChattyTags.SHIFT_RESOLVER,
Permission("chatty.tags.head") to ChattyTags.HEAD_RESOLVER,
Permission("chatty.tags.skin") to ChattyTags.SKIN_RESOLVER,
//Permission("chatty.tags.head") to ChattyTags.HEAD_RESOLVER,
//Permission("chatty.tags.skin") to ChattyTags.SKIN_RESOLVER,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import com.mineinabyss.chatty.chatty
import com.mineinabyss.chatty.components.ChannelData
import com.mineinabyss.chatty.components.HideJoinLeave
import com.mineinabyss.chatty.helpers.parseTags
import com.mineinabyss.chatty.helpers.refreshSkinInCaches
import com.mineinabyss.chatty.helpers.translatePlaceholders
import com.mineinabyss.chatty.helpers.verifyPlayerChannel
import com.mineinabyss.geary.papermc.tracking.entities.toGeary
Expand Down Expand Up @@ -37,7 +36,7 @@ class PlayerListener : Listener {
@EventHandler
fun PlayerQuitEvent.onDisconnect() {
// Remove player incase they switch skins
player.refreshSkinInCaches()
//player.refreshSkinInCaches()

if (chatty.config.leave.enabled && !player.toGeary().has<HideJoinLeave>())
quitMessage(translatePlaceholders(player, chatty.messages.joinLeave.leaveMessage))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import com.mineinabyss.chatty.chatty
import com.mineinabyss.chatty.components.SpyOnChannels
import com.mineinabyss.chatty.components.chattyData
import com.mineinabyss.chatty.components.chattyNickname
import com.mineinabyss.chatty.helpers.*
import com.mineinabyss.chatty.helpers.getAllChannelNames
import com.mineinabyss.chatty.helpers.getChannelFromId
import com.mineinabyss.chatty.helpers.getChannelFromPlayer
import com.mineinabyss.geary.papermc.tracking.entities.toGeary
import com.mineinabyss.idofront.font.Space
import com.mineinabyss.idofront.textcomponents.miniMsg
Expand Down Expand Up @@ -43,8 +45,8 @@ fun chattyPlaceholders(player: Player?, string: String? = null) : Map<String, St
"player_ping_toggle" to (player?.chattyData?.disablePingSound?.not() ?: "false").toString(),

"nickname" to (player?.chattyNickname ?: player?.displayName()?.serialize() ?: player?.name.toString()),
"player_head" to player?.translatePlayerHeadComponent()?.serialize().toString(),
"player_full_skin" to player?.translateFullPlayerSkinComponent()?.serialize().toString(),
//"player_head" to player?.translatePlayerHeadComponent()?.serialize().toString(),
//"player_full_skin" to player?.translateFullPlayerSkinComponent()?.serialize().toString(),
"shift_$shift" to Space.of(shift)
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.mineinabyss.chatty.tags

import com.mineinabyss.chatty.helpers.toPlayer
import com.mineinabyss.chatty.helpers.translateFullPlayerSkinComponent
import com.mineinabyss.chatty.helpers.translatePlayerHeadComponent
import com.mineinabyss.idofront.font.Space
import com.mineinabyss.idofront.textcomponents.miniMsg
import net.kyori.adventure.text.Component
Expand Down Expand Up @@ -38,15 +35,15 @@ object ChattyTags {
Space.of(args.popOr("A shift value is needed").value().toIntOrNull() ?: 0).miniMsg()
) else Tag.selfClosingInserting(Component.empty())

HEAD -> return if (args.hasNext()) Tag.selfClosingInserting(
/*HEAD -> return if (args.hasNext()) Tag.selfClosingInserting(
args.popOr("A player name is needed").value().toPlayer()?.translatePlayerHeadComponent()
?: Component.empty()
) else Tag.selfClosingInserting(Component.empty())
SKIN -> return if (args.hasNext()) Tag.selfClosingInserting(
args.popOr("A player name is needed").value().toPlayer()?.translateFullPlayerSkinComponent()
?: Component.empty()
) else Tag.selfClosingInserting(Component.empty())
) else Tag.selfClosingInserting(Component.empty())*/
}

return Tag.inserting(Component.empty())
Expand Down

0 comments on commit 34aef26

Please sign in to comment.