Added two more events for when the GUIs for inventories and items are viewed when clicking on the message in chat (an event for Enderchests already existed). Both can be modified or cancelled:
This update adds the ViewEnderchestEvent to the plugin's API which is called when a player clicks on the message/placeholder in chat to view the shown enderchest. This allows plugins that add custom enderchests (like multiple pages) to show their custom content instead of the vanilla chest content.
Fixes some compatibility issues with very old server versions (namely 1.8.8)
Improves the detection for which version should be used for the internal adapter (1.7.1.1 fixes a bug in that)
Adds a new config option nms-adapter-version with which the internal version can be specified. (Defaults to "auto") This should never really be needed to get changed unless the plugin can't automatically detect it and prints an error on startup mentioning it.
This update adds integration with PlaceholderAPI. You can now use PAPI Placeholders inside all messages of ShowItem itself as well as use placeholders of ShowItem in other plugins. Please note that ShowItem placeholders will only work in messages in the chat, not in other places like titls or lores! (At least for now.) The new available placeholders are as follows:
showitem_item, showitem_item_mainhand - Shows the item in the hand of the player
showitem_item_<mainhand|offhand|helmet|chest|leggings|boots> - Shows a specific named slot of the player
showitem_item_<slot> - Shows a specific slot number (similar to /showslot) of the player
showitem_item_<slot>_<playername> - Shows the item of a specific other player in the named or numbered slot
showitem_inv - Shows the inventory of the player
showitem_inv_<playername> - Shows the inventory of another player
showitem_ender - Shows the enderchest of the player
showitem_ender_<playername> - Shows the enderchest of another player
Item icons in the messages are now disabled by default until the resource pack required to use them was updated. (If you want to use it on old versions or have updated the pack on your own just set texticon-rp: true in the config. (Existing installations are not affected by that)
Fix some issues with the backwards compatibility which were broken due to the 1.20.6/1.21 update (namely item data like lore not showing when hovering over an item in chat)
Add better error handling and improve error messages for the chat handler. This means that error messages are more correct and include more useful information in some error cases.
This fixes a bug which might occur with the placeholders and commands in some cases due to an incompatibility of versions in the used adventure library
This update fixes an error in the DiscordSRV integration which would cause the inventory and enderchest placeholders printing a warning and not getting properly replaced
Improve support for the chat preview in some cases. This requires that no chat plugin modifies the chat in unsupported ways though. If it still doesn't work after this update then your chat plugin would need to be modified to properly support previews instead of modifying the chat message directly via the (Async)PlayerChatEvent.
Updated to work with the 1.19 server (no new icons yet)
The chat packet handler will now automatically use the internal nms handler instead of ProtocolLib (even if it's installed). This makes multi-version support easier for now. If you think you need to use ProtocolLib then you will need to set chat.packet-handler to ProtocolLib in the config.
Fix that players were able to insert items in chat previously shown by other players. (This was only possible if they were able to guess the random cache id or had access to the console/chat logs)
Prevent opening of another player's inventory via right-clicking them when using/consuming items in the hand (e.g. trying to eat food, drink potion, using a shield or bow)
Prevent right-click player inventory opening permissions from being granted when granting a player/group all permissions (e.g. with *, granting all permissions is not advised and can lead to side effects in lots of plugins like the one in this change)
Added a config option (item-name-length) which can be used to specify the maximum length of custom item display names to display in chat (hovering will still display the full length). The default option of -1 will make the full name display no matter the length.
Added support for forks that allow resizing of the EnderChest (Unfortunately custom plugins that do that without being compatible with the plugin inventory API cannot realistically all be supported as that would require hooking into their individual APIs)
This fixes an issue which was introduced with adventure in the 1.6 version which prevented the item hover messages from showing up on server versions before 1.16. They now get correctly translated to the legacy format on those older server versions.
This update fixes an issue on the latest Paper builds which prevented the chat placeholder from getting replaced properly when used in combination with some other plugins which modify the chat
Fixes an issue that is caused when an item's name only contains color codes
Adds a new %rawname% placeholder for the item language config to show the name without any color codes
Updated MineDown to 1.7.0 which means it now supports gradients and rainbows (see wiki) 1.6.9.1 Hotfix removed this as it seems to break with the items :S
This adds separate permissions to open the item GUI via clicking on the item in chat:
showitem.command.itemexecutor.viewgui for viewing items shown by the normal item placeholder or /showitem command
showitem.command.slotexecutor.viewgui for viewing items shown by the slot placeholder or /showslot command
Both permissions are granted automatically when access to the chat placeholders or commands are granted but can be revoked to disable that functionality.
Fix some small permission inheritance issues with slots
Try to work around some odd chat packet issues which might arise with some plugins. If you notice any further parsing/packet/component issues please make sure to let me know! (either on GitLab, IRC or Discord)
Fixed that the click functionality to open an inventory with the shown item wasn't working in some cases
Added the new option trim-item-name (enabled by default) which will remove excessive spaces in custom item display names (e.g. when centering the name, without it it would look like this in chat)
This re-adds an API method (Component#toJsonString(Player)) which was removed in the 1.6.0 update but which some other plugins (e.g. ChestShop) relied on. It is now marked as deprecated instead while still working like before for now.
This update adds auto updates to the live inventory display showing. That means that if the inventory that is shown is changed then the display that someone else is viewing of it will also update with these changes. (As a reminder: Live inventories can be enabled with the show-live-inv configuration option)
Fixed a typo in the key of the item.unknown language default setting leading to a "missing language key" error if it wasn't added manually.
Added direct 1.16.2 converter and chat replacement adapter (The fallback should've worked already though )
New "Unknown Item" message config (lang.item.unknown) for the chat placeholder to show when the item isn't in the local cache (e.g. when the message ended up on a different server)
Made command name tab completion/suggestion case insensitive
Add API methods to show items and inventory similarly to how the commands do it. See the Javadocs for all available methods. Let me know if more are needed
Added ability to define custom model data for mapping icons to show in chat. They are defined by using <itemtype>:custommodel:<modelinteger> as an entry in the normal map list (see library code)
Added some missing IDs to the flattening iconrp mapping
This adds a new option use-name-color-for-brackets (enabled by default) which tries to color the brackets around the item according to its custom name if it has one (due to technical limitations this currently does not work for hex colors)
Adds the ability to specify different formats for different custom item names in the lang.item.custom config section. (See the default config) This might be usefull if you have some items that you want to format differently or some few items that are common on your server but don't show the correct automatic color.
Tries to catch an error that might happen when sending the item message and provide more information about what went wrong there.
Improvements to how the inventory permissions are resolved internally. Players are now able to open inventories shown to them even if they only have access to the chat placeholder (showitem.chat.inv) without requiring the permissions to the /showinv command. (Which is run with a unique ID per placeholder when clicking on it) Existing setups that only allow the /showinv command are not be affected by this and will continue working like before.
Fixed that commands show up in the command suggestions even if the player didn't have permission for them by properly defining their permissions via the plugin.yml
Block items if they are in shulker boxes/chests too
Fix items being blocked that had no special tags if certain tags were tried to match
Fix a potential issue with how skulls were being filtered
Fix placeholder error in default inventory show message to the one who shows it (new lang.inv.player.self: "You show %target%&a your inventory. (Click)", old used %player% which is the player who executes the command)
This fixes issues that snuck in in the latest update which caused errors when trying to use the plugin on older servers which don't have certain API methods (especially 1.8.8). Please note that some features might not work fully on such old versions (e.g. offhand display) ‒ especially as Mojang continues adds even more capabilities to the base game ‒ and I would urge everyone to update to a modern version if in any way possible.
Worked around a glitch in the inventory which resulted in fake items being shown after a player shift clicked on inventory items. (They vanished after interacting with unless a player was in Creative mode)
Fixed inventory show message using a broken namespaced command
Added more filtering of item stack NBT data in order to support items with lots of custom NBT data that isn't necessary to display the item hover message in chat. (This should solve most issues with item messages exceeding the maximum packet length)
Added the config option namespaced-commands to toggle whether or not the plugin name prefix is used for commands in the clickable inventory open chat messages. (Enabled by default as it makes sure that ShowItem's command is executed and not some other one)
Made inventories locked to the time they were first shown by default
Added config option (show-live-inv) to set whether or not the inventory will be static/locked to the time the command/variable was used or will represent the current state of the inventory when it was opened
This update adds the ability to show your whole inventory rather than just a single item to other players.
/showinv command to show the inventory to other players. Similar to the /showitem command you can show it to a single player, players around you or everyone! Permissions are basically the same as for the item command, just with the showitem.command.inv base.
%inv% and %inventory% placeholders (configurable) to show a clickable text in the chat to open the inventory similarly to the item showing. Permission: showitem.chat.inv
Please note: The permissions for the inventory showing are only granted to OPs by default to keep the plugin behaviour the same as it was before the update. Please do your own testing with this new feature (as it's only really tested on the latest Minecraft versions) and report any issues you experience to me. Although I am using a pretty well tested library there still might be issues as plugin inventories tend to be wonky (especially in creative mode!) and duplication/stealing bugs with custom inventories pop up now and then. Of course such fixes will be prioritized by me but if you don't want to risk it I suggest to not use that feature.
Added the ability to use "helmet", "chestplate", "leggings", "boots" and "offhand"/"shield" to show a slot directly with the /showslot <slot> command or in the %item<slot>% placeholder instead of using the slot number
Filtered out more useless meta information from the item message when showing Shulker Boxes. This should fix issues with Bee Hives and other items that might store lots of meta data when showing a Shulker Box that contains them.
Fixed filtering of Player Head meta data not working in all possible cases.
This version fixes an issue that made the chat variable not work for messages send with Spigot's chat component API when using it together with ProtocolLib
This update makes the plugin compatible with 1.14 (Icons for the new items in the resource pack will follow. Not sure yet if I will update all icons to the new default textures. If so then only after I have a better workflow for maintaining that pack)
Exposed more utility classes in the API artifact (like the icon mapping utility) Use the new 1.4.10 artifact:
Code (XML):
<dependency> Â Â
<groupId>de.themoep.showitem
</groupId> Â Â
<artifactId>api
</artifactId> Â Â
<version>1.4.10
</version> Â Â
<scope>compile
</scope> </dependency>
Fix issues with Shulker Boxes containing too much information for a chat packet which could lead to client disconnects. Some of the more massive information that will never be displayed (especially book pages and skull info) now gets filtered from items inside of Shulker Boxes too.
Apply item name filter to items inside of Shulker Boxes too
Add config options to disable metrics for this plugin only (previously only disabling it was only possible globally with bStat's config) and also add option to completely disable update checking (to only disable ingame notifications you can use the showitem.updatenotification permission to keep the console message)
Fixed the chat placeholder not working in some messages (mainly ones that were send with spigot's base component API). This might resolve issues with some chat plugins that use this API.
This update adds the icons for the new blocks and items of 1.13 (and missing ones from 1.12) In order to use the icons with 1.13 you will have to use this version of the icon resource pack which only has a font file resolution of 256x256px due to a bug in Minecraft 1.13 which doesn't show fonts with 512x512px. For versions below 1.13 you can continue using the normal, bigger pack. (If you don't see the icons let the iconrpmapping.yml or iconrpmapping-flattening.yml regenerate by deleting it or add the newentries manually to the file if you modified it)
Made it work with 1.13. Please report any errors to me. (Icons don't display correctly yet, the icon resource pack will be updated when I'm back from vacation)
Fixed an NPE that can happen with the chat variable
Add config options to block players from showing certain items. The config is structured in a way that you can define global default values and also specify certain categories for more fine control over who has access to show which items as you can set bypass permissions (showitem.blockbypass.specific.<name>) for each category. Items must match all options for them to be blocked.
showitem.blockbypass.specific.default bypasses the default values in the "block" root.
Granting just showitem.blockbypass bypasses all blocks.
Default config section with comments about the functionality:
Code (YAML):
# Block certain items from getting shown. # Can be bypassed with showitem.blockbypass and showitem.blockbypass.<blockname> block: Â
# List of materials to block Â
# Materials: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html  material: [] Â
# - STONE Â
# - DIAMOND_SWORD
Â
# Block items with certain strings in their names from getting shown (case-insensitive) Â
# r= prefix indicates that the string should be handled as a regex  name: [] Â
# - "name 1" Â
# - "r=name \\d"
Â
# Block items with certain strings in the lore from getting shown (case-insensitive) Â
# r= prefix indicates that the string should be handled as a regex  lore: [] Â
# - "name 1" Â
# - "r=name \\d"
Â
# Item durability value, can use comparators, <x, >x, =x, !=x or just equal a single number Â
# Also supports chaining of comparators with a comma. E.g. >5,<20 for between 5 and 20 Â durability: "<0"
Â
# Block items with the unbreakable tag  unbreakable: false
Â
# Block items with certain enchantments, can block both all or only certain levels Â
# Names: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html Â
# Can take the same comparators as the durability  enchantments: [] Â
# - "DAMAGE_ALL" Â
# - "ARROW_DAMAGE:>2"
Â
# Serialize the item to YAML and filter it with regex. Â
# This is only for advanced users and is less efficient, leave empty to disable. Â serialized: "" Â specific: Â Â
# Block only specific items that match certain block types. All global types can be used. Â Â
# Can by bypassed with showitem.blockbypass.specific.<name> e.g. showitem.blockbypass.specific.special-sword   special-sword:
   material:    - DIAMOND_SWORD
   name:    -
"Phoenix616's Sword" Â Â Â unbreakable: true
   enchantments:    -
"DAMAGE_ALL:>9000" Â Â
# Add multiple matcher, e.g. an invenerted matcher that  Â
# blocks everything that isn't in this matcher  Â
# inverted-match: Â Â
#  inverted: true  Â
# Â material: Â Â
# Â - WRITTEN_BOOK
Added command and variable to show the item in a specific inventory slot Command: /showslot <slot> <player/options> - Permission: showitem.command.slot Variable: %item%slot%% e.g. %item40% - Permission: showitem.chat.slot Can be configured in the config. Slot variables need to include the %slot% placeholder. Slot numbers:
Added a functionality to click an item/slot in the inventory and get an info message with available variables/commands to make usage of the slot showing easier. (Permission: showitem.helpclick) By default it uses the (in Survival Vanilla) unused middle mouse button but it can be changed in the config.
Fixed a bug where line breaks broke formatted item names
Removed MCStats metrics, their site is long dead and I doubt it comes back online :/
Added chat.packet-handler option to set how the chat variable is replaced
Added chat.listener-priority option to set the priority with which the ProtocolLib listener is listening on packets (only effects the ProtocolLib packet handler)
These options might help when you have issues with other plugins that also manipulate chat packets.
Adds support to define multiple different chat variables in the config that will show the item. This uses the new chat.variables list in the config. (The old chat.variable setting will still work for backwards compatibility)
This update adds a setting (packs-with-icons) with which you can define a list of server resource packs that include the text item icons. The icons will only be send to players that currently have one of the server resource packs from that list applied. If you want it to behave like previously (only disable icons when the texticonrp option is false) then just leave the list empty. Requires eitherWorldResourcepacks or ForceResourcepacks to be installed on your Bukkit server.
Players were able to send messages to vanished players essentially leaking their vanish status. This makes vanished players appear as if they were offline.
The all, world and radius command options will now only show the message to players that are able to see the sender making it possible to show items to your vanished colleagues
Fixed a compatibility issue with older spigot versions (e.g. 1.8.8)
Added use-translation-mapping config setting to force the plugin to read all translation keys from the transmapping.yml. Enable this if you are seeing key.names instead of translated item names.
Made no permissions message configurable (lang.no-permission)
This fixes a building error that occurred with the last update that stopped the plugin from loading as my build server was configured slightly different than my local environment
This fixes an issue where too many or long NBT tags on an item (e.g. in Shulker Boxes) could lead to the resulting messages to exceed the maximum packet size that Minecraft accepts. This is can lead to major issues (including crashes), make sure to update to this version!
This should fix support for older 1.8 versions as the plugin only included version specific support for 1.8.8 when it first used internal server classes/methods. The functionality used by it has been in the game since 1.8 'though and it should work now on these older versions too. (If you run such a server and notice anything strange with it please contact me asap)
Don't tell players that a player they can't see saw their item shown with the command
Add support for the unbreaking tag that is used by some plugins to add custom items to the icon mapping library. This can be used to add separate icons for items with the unbreaking tags with the material:unbreaking:damage syntax. (The author of the plugin still needs to provide compatible font sheets with icons for his custom items!) This only works with Spigot or CraftBukkit above 1.11!
Added the chat.show-empty-hand config setting. (Is true by default and behaves the same way as before if not changed) -> Uses lang.item.none to replace variable when set to true -> Shows lang.error.noitem to sender when set to false
Added a config option to limit the amount of times a variable can be used in one message. (chat.max-per-message) It is set to 1 by default and setting it to 0 would disable the spam check.
Players with the permission showitem.chat.spam can bypass this limitation. (Default is op)
Made the translation mapping system (mostly) obsolete. The plugin now tries to get translation keys directly from the Minecraft server. It will only fall back on the mapping for specific items (potions, banner and player skulls) as Minecraft itself does not provide nice translations for them. (or when something went wrong with the internal code)
This update adds the ability to add your main hand item into each chat message just by typing a (configurable) variable like %item% into your message. The variable is case insensitive so %Item% and %iTeM% would also work.
This feature should be compatible with every Bukkit chat plugin and the Vanilla chat. It is
not possible to use this feature with BungeeCord based chat plugins and doesn't work correctly for Bukkit chat plugins with BungeeCord chat sharing feature! (Only players on the same server will see the item info)
You can set the chat commands you want the variable to work in (* for all commands) and change the variable itself in the config. Obviously you should use something unique that doesn't come up in normal conversations.
Code (Text):
chat:
 variable: "%item%"
 # Which variable we should replace in the chat with the player's current item
 commands:
 # A list of commands where we should replace the variable with the item info, use * for all commands
 - "msg"
 - "say"
 - "me"
 - "ch"
There is also a permission (showitem.chat) to use this feature which is set to true by default, so you have to negate it when you don't want this feature at all.
This update also adds
MetricsLite for some statistics on
mcstats.org, you can disable these by opting out via the usual PluginMetrics/config.yml. MetricsLite is under the following license:
Copyright 2011-2013 Tyler Blair. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation are those of the
authors and contributors and should not be interpreted as representing official policies,
either expressed or implied, of anybody else.
Please make sure to add the new config options or let the configuration regenerate by deleting it!
Added support for player nicknames (usenickname option in config, default is true)
Added support for player team colors
Added configuration section to set the format of the text for named and unnamed items (lang.item.named and lang.item.unnamed, you have to add or set them in order for this plugin to work properly)
Added variable to display the item count if the player holds more then one (Set the formatting
Fixed the name of potions when using this plugin with pre 1.9 servers
# Whether or not we should attempt to send the nickname instead of the username
# This will also include colors/prefixes of the team the player is in!
usenickname: true
lang:
 count: "(%count%x)"
 item:
# The different texts that display the item
# The %icon% variable will only be displayed then texticonrp is set to true
# The %count% variable will be replaced with lang.count if more then 1 item is shown
# The string will be automatically colored but it tries to respect custom codes
  unnamed: "[%icon%%type%]&a%count%"
  named: "[%icon%%name%]&a%count%"
# The %type% variable is also usable in the named string for example like this:
# Â named: "%icon%%type% &anamed %name%
Added ability to show items to every online player (/showitem -all, perm.: showitem.command.all) and to every player in the current world (/showitem -world, perm.: showitem.command.world) Take a look at the additional config options for the new messages!
Fixed a problem that occurred while running this plugin on a 1.7.10 protocol hack server (note that the client still needs to be at least 1.8 for this plugin to work properly!)
Some small fixes in the translation mapping. Let it regenerate or manually update it!
Way 1 - PM: Send me a message and state that you want to buy this plugin. Include the address you will be sending the coins from! Then send 3.99$ in the currency of your choice to one of my addresses below. You will get access to the resource as soon as possible!
Way 2 - Signed Message: Way 1 has a flaw: you have to notify me beforehand about your purchase. If you want to just send me the coins you have to prove to me afterwards that you are really owning the address from which the transaction originated from. (Because everybody could claim it's theirs as all transactions are
publicly visible)
To do so you have to send me a message signed with your key that corresponds with the address you sent the coins from.
If you don't know what I'm talking about, use way 1!