This plugin adds stats to your tools/weapons. The text added to the item is customizable and supports
Color codes (&a) as well as
Hex codes (#AF12AB)! You do not need to worry about playing around with colors since the advanced Anvil merge functionality will correct the item colors automatically for you. See the anvil section for more information. This plugin utilizes the built in lore feature of items to store the stats and utilizes no external plugins (Which could slow down releasing support for new versions of Spigot).
Permission:simpletoolstats.allow.anvil.stat.combine This plugin has extensive anvil support. To activate the stat merge functionality both items must be in the anvil with some form of stats. If you want your item to maintain its original lore then simply repair it with an item that has no stats. If there is a desire for a config option for this I could add one. Alternatively if you wish to update your item to your new config colors then get at least 1 stat on the item you are using to repair before utilizing the anvil repair mechanism.
The merge process will run a number of functions to try and consolidate duplicate stats into a single line on the new item. The plugin will merge ignoring color differences for any lines that the text matches. At this time I do not have a mechanism to help with fixing stats when you change the wording in the config but I might come up with something down the road.
Below is a simple example showing stats merging. Notice that the counts merge as well as stat lines.
Below is an example of merging two items with stat lines that are the same text but different colors. Before doing this repair I changed my config and I am utilizing the anvil to update my item to my new colors.
If you disable
allowHexColors in the config and attempt to put a hex color in the config you might end up with an item with a stat line like the first item. This example shows the anvil merge process resolving the broken hex color text in the first item then consolidating all lines as well as recoloring the final item to my new config colors. The color fix logic works even if you have
allowHexColors disabled.
The config file included with this plugin allows you to customize the text displayed on the item as well as giving you the ability to disable tracking for individual events.
Code (YAML):
# This will enable additional log messages to help debug issues or provide additional information. debug: false
# Should the plugin notify you when new updates are available # notify, global notify setting, turning this off will disable all update alerts # notifyType, the type of update notifications you want to receive # ALL: Notify on all releases. Major, Minor and bugfix. # MAJOR_AND_BUGFIXES: Only notify on major releases and bug fix releases. # MAJOR_ONLY: Only notify on major releases. # BUGFIXES_ONLY: Only notify on bug fix releases. This may notify you for a bugfix on a release you have not loaded yet. update:
notify: true
notifyType: 'MAJOR_AND_BUGFIXES'
# Server wide control over the anvil combine functionality. Note there is also a permission that can disable the combine for players. If this config setting is disabled then the user permission is ignored # stripUnrecognizedLore - Should the anvil combine strip any lore lines that appear to be Stat lines ex: "SomeText: 123" but the text is NOT defined in this config? # This setting will only pertain to the second item in the anvil. The item in the first slot will keep all lore regardless anvil:
stat:
combining:
enabled: true
stripUnrecognizedLore: true
# allowHexColors, Should the server attempt to parse out hex colors? There may be a performance penalty to with search, disable this feature if you experience any lag # numberFormattedWithCommas, lore numbers dislay with comma formatting lore:
allowHexColors: true
numberFormattedWithCommas: false
# Server wide control over the tracking. Note there is also a permission that can disable the tracking for individual players. # If you wish to combine multiple types of events to a single Lore line on the item then simply set the config below to the same text. # The text support color codes using the prefix '&'. If you want the color green for example use: &aThisColorIsGreen # If you enabled hex colors above then simply use #123456 to define your color in the text below tracking:
blockbreak:
enabled: true
text: 'Destroyed blocks'
harvest: #Hoe block break, Leaves enabled: true
text: 'Harvested blocks'
webbreak: #Sword, Shears enabled: true
text: 'Destroyed webs'
till:
enabled: true
text: 'Tilled blocks'
pathcreate: #Shovel right click on dirt enabled: true
text: 'Created paths'
logstripped:
enabled: true
text: 'Stripped logs'
fishcaught:
enabled: true
text: 'Catches'
shieldblocks:
enabled: true
text: 'Blocked attacks'
arrowshot:
enabled: true
text: 'Shot arrows'
elytra:
flights:
enabled: true
text: 'Flights'
time:
enabled: true
text: 'Flight time'
shear:
animal: # Sheep, Mooshroom, Snowman enabled: true
text: 'Sheared animals'
block: # Leaves, Wool, Pumpkin, Beehive enabled: true
text: 'Sheared blocks'
# If you disable hostile, friendly or boss those stats will just not go onto your weapon. If you want them all to log under the same stat line then make the text match for each section mob:
hostile:
enabled: true
text: 'Killed mobs'
friendly:
enabled: true
text: 'Killed friendly mobs'
villager:
enabled: true
trackasfriendly: false
text: 'Killed villagers'
player:
enabled: true
text: 'Killed players'
# Ender dragon and wither boss:
enabled: true
text: 'Killed bosses'
# Custom mob plugin support. # Global mob will catch any mob in the game that has been assigned a custom display name. If you want to only track specific custom mobs then see the below custom sections # If you do not enable any custom mob sections below then the stat will fall under the regular sections above. For example if you have a custom Zombie defined in MythicMobs # but you do not setup the config below then the stat will fall under hostile in the above sections. # If a mob name is defined in multiple sections the plugin will return back the first section it is found in. You will not get stats in multiple stat lines # All mobDisplayNameLists are checked first then prefixFilters # If you are having trouble finding the custom name for the mob then enable debug at the top of the screen and look at your server logs for the custom name of the mob you killed # prefixFilter - This lets you define a filter which mobs will get this stat. If you do a filter of 'Skeleton' it will catch all custom mobs that start with the text 'Skeleton' globalCustomMob:
enabled: false
text: 'Killed custom mob'
prefixFilter: ''
# Specific custom mob display name support. List the names of the mobs you want to track separated by the pipe character: (Shift backslash on the keyboard) # For now you can only have 10 custom mobs otherwise my config manager will erase any additional ones. Try to group multiple mobs using the name list or using a prefix filter # This example is an example of matching on a single mob name, if the mob killed has a name that matches exactly to '&6Skeleton King' then the stat is added. Note the color code is required custom1:
enabled: false
text: 'Killed kings'
mobDisplayNameList: '&6Skeleton King'
prefixFilter: ''
# This example is a multiple mob filter on display name, # If the mob names have color codes then the list of names must also include the colors # for this example below the mob name must match the text exactly and can match either '&aSkeletal Knight' OR '&2Skeletal Minion' to track stats for this type custom2:
enabled: false
text: 'Killed minions'
mobDisplayNameList: '&aSkeletal Knight|&2Skeletal Minion'
prefixFilter: ''
# This example is a prefix filter, for this example below the mob name must start with the color code '&a' to track stats for this type. # If the mob names have color codes then the prefix filter must have the color code as well # Note if you define a prefix filter and a mobDisplayNameList filter then the prefix filter is ignored custom3:
enabled: false
text: 'Killed MythicMobs'
mobDisplayNameList: ''
prefixFilter: '&a'
# Additional custom mobs custom4:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom5:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom6:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom7:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom8:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom9:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom10:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
# Do not add extra custom mob lines, the config manager program will delete them when the config gets updated with a version release
/simpletoolstats help - Shows usage information for all commands you have access to. Permissions: simpletoolstats.help (Default All)
/simpletoolstats reload - Reloads the config file. Permissions: simpletoolstats.admin (Default OP) /simpletoolstats resetconfig - Reset the config file to the default values. Permissions: simpletoolstats.admin (Default OP) /simpletoolstats permissions - Displays all permissions available in game with a short description of each. Permissions: simpletoolstats.admin (Default OP)
/simpletoolstats lorelist - Lists the lore on the held item. This can be used to find the line numbers for your item to use in the loreremove command. Permissions: simpletoolstats.lore.list
/simpletoolstats loreremove {Line Number} - Removes the lore on the held item at the specified Line Number. Use the
lorelist command to get the line numbers for each lore line on your item.
Permissions:
simpletoolstats.lore.remove
Permissions can be viewed in game by running the /simpletoolstats permissions command.
Code (YAML):
permissions:
simpletoolstats.admin:
description: Grants permission to admin commands such as reload and enable/disable tracking
default: op
simpletoolstats.update.notify:
description: Grants permission to receive a notification in game chat when you log into the server about a new update to the plugin
default: op
simpletoolstats.help:
description: Grants permission to the help command
default: true
simpletoolstats.allow.tracking:
description: Grants permission for items stat tracking to the player. This allows you to disable tracking for certain players
default: true
simpletoolstats.allow.anvil.stat.combine:
description: Grants permission for item stat combining through the anvil to the player. This allows you to disable anvil combining for certain players
default: true
simpletoolstats.allow.lore.list:
description: Grants permission for listing the lore on the item
default: op
simpletoolstats.allow.lore.remove:
description: Grants permission for running the command to remove a lore line from an item
default: op
simpletoolstats.*:
description: Grants
all permissions
default: false
children:
simpletoolstats.admin: true
simpletoolstats.allow.tracking: true
simpletoolstats.allow.anvil.stat.combine: true
simpletoolstats.allow.lore.list: true
simpletoolstats.allow.lore.remove: true
Custom support The mob kill stats portion of the plugin does not check the type of item and will add the lore stats to any non-stackable item. Hopefully this will allow it to function with custom weapons but if you have a specific plugin you want me to support drop a message in the discussion and I can look into it.
This plugin supports custom mobs such as MythicMobs by utilizing the custom name property on mobs. See this section of the configuration for setting up stats for your custom mobs. If you need help or have questions make sure to make a comment in the discussion tab.
Code (YAML):
# Custom mob plugin support. # Global mob will catch any mob in the game that has been assigned a custom display name. If you want to only track specific custom mobs then see the below custom sections # If you do not enable any custom mob sections below then the stat will fall under the regular sections above. For example if you have a custom Zombie defined in MythicMobs # but you do not setup the config below then the stat will fall under hostile in the above sections. # If a mob name is defined in multiple sections the plugin will return back the first section it is found in. You will not get stats in multiple stat lines # All mobDisplayNameLists are checked first then prefixFilters # If you are having trouble finding the custom name for the mob then enable debug at the top of the screen and look at your server logs for the custom name of the mob you killed # prefixFilter - This lets you define a filter which mobs will get this stat. If you do a filter of 'Skeleton' it will catch all custom mobs that start with the text 'Skeleton' globalCustomMob:
enabled: false
text: 'Killed custom mob'
prefixFilter: ''
# Specific custom mob display name support. List the names of the mobs you want to track separated by the pipe character: (Shift backslash on the keyboard) # For now you can only have 10 custom mobs otherwise my config manager will erase any additional ones. Try to group multiple mobs using the name list or using a prefix filter # This example is an example of matching on a single mob name, if the mob killed has a name that matches exactly to '&6Skeleton King' then the stat is added. Note the color code is required custom1:
enabled: false
text: 'Killed kings'
mobDisplayNameList: '&6Skeleton King'
prefixFilter: ''
# This example is a multiple mob filter on display name, # If the mob names have color codes then the list of names must also include the colors # for this example below the mob name must match the text exactly and can match either '&aSkeletal Knight' OR '&2Skeletal Minion' to track stats for this type custom2:
enabled: false
text: 'Killed minions'
mobDisplayNameList: '&aSkeletal Knight|&2Skeletal Minion'
prefixFilter: ''
# This example is a prefix filter, for this example below the mob name must start with the color code '&a' to track stats for this type. # If the mob names have color codes then the prefix filter must have the color code as well # Note if you define a prefix filter and a mobDisplayNameList filter then the prefix filter is ignored custom3:
enabled: false
text: 'Killed MythicMobs'
mobDisplayNameList: ''
prefixFilter: '&a'
# Additional custom mobs custom4:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom5:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom6:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom7:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom8:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom9:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
custom10:
enabled: false
text: 'Killed mobs'
mobDisplayNameList: ''
prefixFilter: ''
# Do not add extra custom mob lines, the config manager program will delete them when the config gets updated with a version release
This plugin is mostly compatible with tools/weapons that already have stats lines from other plugins. If a stat line already exists on the item this plugin will add to the existing line when the text matches exactly.
Version Notes To utilize this plugin on prior versions of Spigot utilize the "Version History" tab and select the download based on the below list.
Spigot 1.17 use 2.40+
Spigot 1.16.x use 2.34 (and below)
Disclaimer This plugin utilizes bStats for collecting basic plugin metrics and to help me adjust my plugin default config. For more information see
bstats.org
TODO
Implement Elytra stats
*** If you have any issues or questions please post them in the discussion tab ***