Closed Rongel92 closed 3 years ago
I'm not sure about the [inv]
but this will work for the [tp]
# Where should this variable be used?
#
# FORMAT = used in your formats with {syntax}, players cannot use it
# MESSAGE = players can use it with [syntax] in their chat messages
Type: MESSAGE
# The key we look for in the chat surrounded by [] brackets, example:
# chat message: "Hello everyone, [tp] and come check out my building"
Key: tp
# The value the key will be replaced to.
# This uses JavaScript and must return a boolean value.
Value: '"{sender_is_player}" == "true" ? "&a[TP]" : ""'
# What JavaScript condition must return true for this variable to show?
# You can put variables in here to get replaced.
Sender_Condition: ''
# What permission must the message sender have in order for this variable to display to him?
Sender_Permission: ''
# See Sender_Condition, except that we evaluate the JavaScript for each chat message receiver
# and only show the message to those receivers for which the condition returns true.
Receiver_Condition: ''
# What permission must the message receiver have in order for this variable to display to them?
Receiver_Permission: ''
Hover: '&fClick here to send tp request'
Run_Command: "/tpa {player}"
FYI, I edited:
Value: '"{sender_is_player}" == "true" ? "&a[TP]" : "&c[Error]"'
and changed it to:
Value: '"{sender_is_player}" == "true" ? "&a[TP]" : ""'
, so that [tp] wouldn't show up with [Error] or anything for that matter, if the sender wasn't a player e.g. if the message was sent from discord or the console.
of course, you could keep the [error] but make it clearer, such as Value: '"{sender_is_player}" == "true" ? "&a[TP]" : "&c[TP-Error]"'
Hopefully, that explains what the [Error] part is for.
Thanks so much gone-incognito!
Not sure about the [inv], can you please give us an example of how you want this to look like?
Thanks so much gone-incognito!
Not sure about the [inv], can you please give us an example of how you want this to look like?
A lot of plugins actually do this. Basically, the player will type [inv]
, and when clicking on it, it'll open a GUI with the player inventory. Kinda like the /invsee
command from essentials, but assigned to a clickable text.
thanks a lot for the tp gone-incognito :) and yes elbananaa is right its like inv see when u click on it but u cant change or take any items out
This would be amazing to have [inv], if it can be done, can I suggest it be added as a default variable in the variables folder, when you first generate chatcontrol files.
This would be amazing to have [inv], if it can be done, can I suggest it be added as a default variable in the variables folder, when you first generate chatcontrol files.
Completely agree with you. However, due to the fact that this isn't a simple script, I guess Kangarko would probably have to make some internal modifications to the plugin in order to create a such variable.
same thing for enderchest if possible but i guess once the inv is done its a simple change to get a enderchest one aswell
Thanks, but we're a chat plugin, not trying to be an all-in-one doing everything but buggy plugin. You can just use a third party plugin that has /invsee {player} and then link this using our variable system.
Heres an example of [inv] that triggers /invsee {player}: https://pastebin.com/a0BhNWsg
Minecraft Version: 1.16.5 MySQL: false BungeeCord: false
Hi, I'm trying to make 2 variables for the chat and failing at getting it to work I need help on how to make them work one is [inv] to show the players inventory when you hover above. The second is [tp] once you click u send a teleport request to the player that posted it.