AdvancedPlugins / Chat

The Best Chat Plugin for Spigot Servers, including AI chat monitoring, endless formatting capabilities, custom commands and way more
3 stars 2 forks source link

[item] variable hover not working #41

Closed Xqow closed 1 month ago

Xqow commented 2 months ago

Describe the bug

I am having an issue with the hover effect from the default [item] chat variable not working. There is a hover effect configured which should show the item, yet it doesn't seem to work. There are no errors.

How to reproduce

Install AdvancedChat on a 1.20.4 PaperMC server, type [item] in chat

Screenshots / Videos

No response

Server Log

No response

ThomasWega commented 2 months ago

hey! Please send your config for variables and if you could also send a video showcase or at least screenshots

Xqow commented 2 months ago

I've attached a video of it happening, it is a blank 1.20.4 server with only vault and advanced chat installed, I also used the default config:

type: CHAT_MESSAGE # If you are parsing a chat message, use CHAT_MESSAGE. This means message will be surrounded in
# [] tags. If you are creating a PLACEHOLDER, it will be using %% formatting, e.g. %item%

# What is the name of the variable? This will be used within the tags, e.g. [item] or %item%
name: item

# Value of this variable, this uses the nashorn engine, so you can use any javascript here.
# You are also able to access Player instance, e.g. player.getName() or player.getUniqueId()
# As well as JavaPlugin using `plugin` variable, e.g. plugin.getServer().getOnlinePlayers().size()
# Event variable is also available, you can use it depending on the event, if this is used for chat it would access AsyncPlayerChatEvent
# Read more in the wiki here: TODO ADD WIKI LINK
# This must always be a string (text)
value: '"x"+player.getItemInHand().getAmount() + " " + capitalize(player.getItemInHand().getType().name())'

# Hover, this can be:
# Text field, saying whatever you want it to say.
# Item field, showing the item in the hover.
# Entity field, showing the entity in the hover.
hover: player.getItemInHand()

https://github.com/AdvancedPlugins/Chat/assets/131767001/3c5d820b-2ec4-40c6-9644-939b24d6700c

ThomasWega commented 1 month ago

Next update will be fixed. Along many other things