Showing the weapon name instead of the weapon type
It would be nice if those stats could show the weapon name (after it got renamed in an anvil) instead of the weapon type, like "SomeGenericName" and maybe also add the weapon type like "SomeGenericName (Diamond Sword)" with support for color codes.
Like in those stats https://i.imgur.com/NtIUxFW.png
Which would result in this https://i.imgur.com/TsBeo1U.png
Maybe icons could be used to replace (Diamond Sword) if space is a problem.
For developers:
Implementing this should be a good first issue, as it needs changes to the two kill listeners (one in bukkit and one in sponge). The name of the weapon could be part of the name stored in plan_kills - Current max length for weapon column is 30, which can be increased if necessary (See ExtensionTableRowValueLengthPatch on how to increase column length in a db patch).
TODO
- Add a weapon name column to plan_kills with default null
- Add to create table sql
- Add to existing tables with patch
- Add (Optional) weapon name to the PlayerKill objects and queries
- Get the item name when storing the data
- Render weapon name on the player kill tables Item (Name of the item) in player kill tables
- Add a javascript function to colorize text with minecraft colors (See existing Java implementation in Html.java#colorsToSpan)