Plan icon indicating copy to clipboard operation
Plan copied to clipboard

Showing the weapon name instead of the weapon type

Open KyroOW opened this issue 6 years ago • 2 comments

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.

KyroOW avatar Oct 13 '19 20:10 KyroOW

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).

AuroraLS3 avatar Nov 17 '19 14:11 AuroraLS3

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)

AuroraLS3 avatar Aug 07 '21 08:08 AuroraLS3