ChatItem.sk icon

ChatItem.sk -----

Display items in the chat.




Dependencies have been updated to Skript 2.6.4+ and SkBee 2.15.0+.

Fixed
  • Messages changing big/small letters in player names, prefixes, etc.
  • Removed a single word (which was added by the One Word Update) to remove a warning since SkBee updated its syntax again.
----------, Sep 23, 2023

This update adds a new config option and a new feature that fixes some annoyances when directly including the message inside of the chat format instead of using [message].

Added
  • New config option to grab the item amount from the entire inventory instead of only from the item stack.
  • Chat format normalization. If the chat format includes a formatted/colored/unformatted message, the script will modify the message variable itself to also be formatted/colored/unformatted. This is done so that after the script removes duplicate keywords from the message it can correctly replace the chat format to include the new modified message.
Fixed
  • Duplicate keyword removal not working when the chat format directly includes the message.
----------, May 11, 2023

SkBee 2.8.3 broke some of the current script functionality, causing the messages of players to be split into multiple lines when using keywords. The script has been updated accordingly with additional changes and as a result only supports SkBee 2.4.0+.

Changed
  • The script now removes color codes (ampersand & symbol followed by a number or letter) from messages with keywords to avoid SkBee coloring it when it isn't supposed to. (previously these weren't touched at all)
Fixed
  • Player messages being split into multiple lines when using keywords.
  • Colors sometimes not being applied correctly.
----------, May 10, 2023

Fixed
  • Messages ending with a keyword followed by its type showing the item twice ([hand]hand[hand][hand]).
----------, Nov 6, 2022

Fixed
  • Default chat format sometimes being used instead of the one set by another script. Fixed by waiting a tick (Skript currently doesn't support event priorities for the chat event).
----------, Nov 1, 2022

The script has been rewritten, making the code more bearable. As a result the script now only works correctly with SkBee 1.16+.

The source code is also now stored on GitHub Gist instead of Pastebin.

The changelog below may have some things missing, since I'm not entirely sure that I checked all of the changes that occurred due to the rewrite.

Added
  • Different item format for unstackable items.
Changed
  • Keywords are now stored in global variables created when the script loads, instead of local variables created every time a player chats.
Fixed
  • {CIplaceholder} being removed from the chat when using keywords.
  • Pesky warning about a list missing an 'and' or 'or'.
  • Using the same keyword more than once resulting in a " appearing in chat ([hand][hand][hand]").
  • Colors in chat not being displayed properly or across the whole message when using keywords.
  • Messages only appearing once when present multiple times in the chat format.
  • Messages containing :{1}: with numbers from 1-6 changing places with keywords (:{1}:[hand][hand]:{1}:).
  • Messages with keywords being sent even when the chat event is cancelled.
----------, Oct 31, 2022

SkBee had its syntax changed a bit so I had to add just 1 word in order for the script to work again.
The script now requires SkBee 1.15+
----------, Apr 5, 2022

Added more keywords.
The config now uses {name} for the item name instead of {item}.
----------, Jan 27, 2021

Updated the code so it is now even shorter and makes more use of the SkBee addon.
Fixed an error regarding armor slots being empty.
Now also works with Skript message formats that use %player% and %message%.
----------, Jan 26, 2021

Updated the code, it is now shorter.
The script no longer requires SkQuery.
Items that previously did not display an amount now display one.
Removed the update checker.
Removed the built-in chat format.
----------, Jan 25, 2021

Made the item count correctly count items. Some items (like Written Books and Shulker Box with items), will not display a count, because of NBT issues.
----------, Jan 24, 2021

Fixed built-in chat format not working correctly when [message] is not at the end of the format.
The built-in chat format now also supports colors. Check the config for more info.
The item is now displayed with the amount of the item in your inventory.
Added update checker.
----------, Dec 26, 2020

Added the ability to customize how the item name will look in chat.
The message format in the config will now work with all messages.
The server console can now see messages with keywords.
----------, Dec 24, 2020

Fixed small bug with formats again.
Fixed comments.
----------, Sep 7, 2020

Fixed custom formats from other scripts not working, but you'll have to set the chat format in the script's options yourself.
----------, Sep 7, 2020

Rewrote some code so that the SkStuff addon isn't required.
----------, Sep 7, 2020

  • Removed item NBT being broadcasted to the chat.
----------, Sep 6, 2020

  • Fixed bug: Sometimes sending any of the keywords while not having an item in that slot could result in an error, because sometimes that slot is not air, it's undefined.
----------, Sep 4, 2020

Resource Information
Author:
----------
Total Downloads: 3,711
First Release: Sep 3, 2020
Last Update: Sep 23, 2023
Category: ---------------
All-Time Rating:
3 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings