Home›Java›Mods›Death Analyzer
Death Analyzer
ModsJava

Death Analyzer

Java mod listed for Minecraft 1.12. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
[​IMG]


ABOUT

This gives you the ability to view a death analysis report of all the damages that had led to your death within a time frame.




DEPENDENCIES

** System Dependency: Java 8 **




COMMANDS(and aliases)
/deathanalyzer reload
/deatha reload
/danalyzer reload
/dan reload




PERMISSIONS
Execute main command: deathanalyzer.command
Reload command: deathanalyzer.reload
Update notification: deathanalyzer.checkupdate




CONFIGURATIONwww
Code (YAML):

#################################################################################################################
#   ██████╗ ███████╗ █████╗ ████████╗██╗  ██╗ █████╗ ███╗   ██╗ █████╗ ██╗  ██╗   ██╗███████╗███████╗██████╗     #
#   ██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██║  ██║██╔══██╗████╗  ██║██╔══██╗██║  ╚██╗ ██╔╝╚══███╔╝██╔════╝██╔══██╗    #
#   ██║  ██║█████╗  ███████║   ██║   ███████║███████║██╔██╗ ██║███████║██║   ╚████╔╝   ███╔╝ █████╗  ██████╔╝    #
#   ██║  ██║██╔══╝  ██╔══██║   ██║   ██╔══██║██╔══██║██║╚██╗██║██╔══██║██║    ╚██╔╝   ███╔╝  ██╔══╝  ██╔══██╗    #
#   ██████╔╝███████╗██║  ██║   ██║   ██║  ██║██║  ██║██║ ╚████║██║  ██║███████╗██║   ███████╗███████╗██║  ██║    #
#   ╚═════╝ ╚══════╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝  ╚═╝╚══════╝╚═╝   ╚══════╝╚══════╝╚═╝  ╚═╝    #
##################################################################################################################
damages-from-last-x-seconds
: 30

death-analysis-message-enabled
: true
damage-information-message-format
:
    - '&d&m -----------------------------------'
     - '&e&lDeath Analysis Report &5 ( %total_damages%)'
     - ' '
     - ' %analysis%'
     - '&d&m -----------------------------------'
death-analysis-individual-message-format
: '&e %damage_type% &7[&a%damage% &6(%damage_percent%)&a DMG&7]&c %possible_attacker% &7&o%time% ago'

death-analysis-gui-enabled
: true
death-analysis-gui-name
: 'Death Analysis ( %total_damages%)'
death-analysis-gui-icon-format-name
: '&c&l %damage_type%'
death-analysis-gui-icon-format-lore
:
     - '&aDamage
: &b%damage% &d ( %damage_percent%)'
     - '&aAttacker
: &b%possible_attacker_none%'
     - ' '
     - '&7&oHappened %time% ago..'
death-analysis-gui-previous-page-button-icon
: ARROW;0
death-analysis-gui-next-page-button-icon
: ARROW;0

death-analysis-gui-previous-page-button-icon-name
: '&cPrevious Page'
death-analysis-gui-next-page-button-icon-name
: '&aNext Page'

command-usage
: '&aUsage : &e/deathanalysis reload'
command-no-permission
: '&cYou can''t do this, silly!'
command-reload-successful
: '&aConfiguration has been reloaded successfully.'


icons
:
     cactus-damage
: CACTUS
     collision-cramming-damage
: SKULL_ITEM
     drowning-damage
: RAW_FISH
     fall-damage
: LEATHER_BOOTS
     falling-block-damage
: ANVIL
     fire-damage
: FLINT_AND_STEEL
     flew-into-wall-damage
: STONE
     instant-damage-potion-damage
: POTION;8204
     lava-damage
: LAVA_BUCKET
     lightning-damage
: QUARTZ
     poison-damage
: POTION;8196
     starvation-damage
: ROTTEN_FLESH
     void-damage
: BEDROCK
     wither-potion-damage
: NETHER_STAR
     charged-creeper-explosion
: MONSTER_EGG;50
     creature-area-damage
: IRON_SWORD
     creature-arrow-damage
: BOW
     creature-melee-damage
: LEATHER_HELMET
     creature-snowball-damage
: SNOWBALL
     creeper-explosion-damage
: MONSTER_EGG;50
     player-area-damage
: GOLD_SWORD
     player-arrow-damage
: BOW
     player-egg-damage
: EGG
     player-melee-damage
: DIAMOND_SWORD
     player-snowball-damage
: SNOWBALL
     charged-wither-skull-explosion-damage
: NETHER_STAR
     dragon-breath-damage
: DRAGON_EGG
     ender-crystal-damage
: ENDER_CRYSTAL
     ghast-fireball-explosion-damage
: MONSTER_EGG;56
     thorns-enchantment-damage
: ENCHANTED_BOOK
     tnt-explosion-damage
: TNT
     wither-skull-explosion-damage
: NETHER_STAR



USAGE
On death, depending on how you've configured the plugin, it will either show a chat death analysis report, or gui, or both. The damages reported will be the last damages received within the last X seconds. The seconds can be modified in the configuration.


You can define the icons to be shown for the damages in the gui in the configuration. The format is as follows:

MATERIAL
or
MATERIAL;DATA

* As 1.13 rolls out with more stable builds, this parsing will be deprecated and scheduled for removal in favor of supporting the new item parsing system.

[​IMG]
[​IMG]
[​IMG]



API USAGE
DeathAnalyzer comes with a friendly API. This allows developers to integrate their own custom damages that can be taken into account in the analysis reports.


To start, there are 3 main types of base damages available:
EnvironmentalDamage supports only EntityDamageEvent. This should be handling stuff like lightning, player drowning, etc.

LivingEntityDamage supports only EntityDamageByEntityEvent. This should handle player-to-player damages and creature-to-player damages.

ObjectDamage supports only EntityDamageByEntityEvent. This mostly inherits LivingEntityDamage, however, for being clear on what is being checked for, this should be handling stuff like ghast fireballs, dragon breath, thorns enchantment damage, etc.


These are some examples from the plugin itself that'll give you an idea of how to use them in your own plugin. I myself am still mapping out some damages so they can be more precise in the reports.

Example of EnvironmentalDamage
Example of LivingEntityDamage
Example of ObjectDamage


You'll notice that these all require a FileConfiguration and a path-like string. This allows the damage-type to find its away to its representing icon. The DamageApplicable::getIconName should be the name or path to the icon in the configuration.

** By default, all icons must be under a configuration section named "icons". The plugin will then follow the path specified within that section. **

Also, if you notice in the examples, I reference Events::getFightingEntities. This allows you to grab the two true entities in combat from the damage event. For example, if a player is damaged by an arrow, it will in return not get the player & the arrow, but the player and the shooter of the arrow.


To implement your own damage into the registry, you need to access the registry itself. It can be done using Bukkit's service provider.

Code (Java):
DamageApplicableRegistry damageApplicableRegistry = Bukkit. getServicesManager ( ). getRegistration (DamageApplicableRegistry. class ). getProvider ( ) ;

You can then access the register method provided.

Code (Java):
damageApplicableRegistry. register ( new MyCustomDamage ( ) ) ;






OTHER

BUGS
If you discover a bug I may have missed, you can feel free to discuss the problem in the discussion page. This also applies if I missed a damage type.


* Support will not be provided for older versions of the plugin or server software builds.

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

Death Analyzer is a free Minecraft Java mod. Compatible with Minecraft 1.12. Downloaded 401 times (via Spigot). Download it and open it directly in the game.

Explore more