DeathHook 1.1

Report deaths to discord

  1. Lauriichan
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.16
    Source Code:
    https://github.com/Lauriichan/DeathHook
    DeathHook

    An easy to use plugin to report deaths to discord using a channel webhook

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


    Usage
    Install the plugin on your server by putting it into the plugins folder
    Afterwards, you open up discord and open the channel settings of a channel of your choice.
    Then create a webhook and copy the webhook url.
    Finally you paste that url into the settings.json at 'webhook'
    And you're done, your server doesn't need to restart, DeathHook will automatically reload the configs :)


    Also you can edit the avatar and name of the webhook, it doesn't matter for the plugin to work
    upload_2021-5-3_18-42-20.png
    upload_2021-5-3_18-42-37.png
    upload_2021-5-3_18-42-52.png

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Configuration

    DeathHook has two types of placeholders, one type that gets replaced after the config was loaded and another one that is replaced each time.

    Replaced on load (settings.json only)
    [​IMG]
    Replaced each time (settings.json only)
    [​IMG]
    Replaced each time (messages.json only)
    [​IMG]

    settings.json
    Code (Text):
    {

        "webhook": "",
        "embed": {
            "title": "DeathHook",
            "description": ":empty:",
            "color": 16711680,
            "thumbnail": {
                "url": "https://crafatar.com/renders/head/$uuid?overlay"
            },
            "fields": [
                {
                    "name": ":calendar: Date",
                    "value": "$time - $date"
                },
                {
                    "name": ":skull: $name",
                    "value": "$reason"
                }
            ]
        },
        "debug": false,
        "seconds": false
    }
    messages.json
    Code (Text):
    {
        "causes": {
            "NONE": "was never found",
            "DOWNING": "forgot to breath while being underwater",
            "FALLING": "didn't saw the deep hole",
            "FALLING_BLOCK": "forgot that sand can fall down",
            "SUFFOCATION": "wanted to be a fossile",
            "FIRE": "jumped down a chimney and didn't get back up",
            "BURNING": "liked it to play with fire",
            "LAVA": "tried to swim in hot sauce",
            "DRYOUT": "forgot how to breath air",
            "DRAGON_BREATH": "was spit on by a dragon",
            "BLOCK_EXPLOSION": "didn't see the landmine",
            "CACTUS": "wanted to cuddle a cactus",
            "CRAMMING": "had too many friends",
            "FLY_INTO_WALL": "looked on the map while flying",
            "HOT_FLOOR": "liked the hot and glowing block in the nether",
            "LIGHTNING": "wanted to charge their phone",
            "MAGIC": "looked into the eyes of a witch",
            "MELTING": "transformed into water",
            "POISON": "picked the wrong glas",
            "STARVATION": "was bad at cooking",
            "SUICIDE": "hated this world",
            "PROJECTILE_ARROW": "were unlucky because the apple on their hat was missed",
            "PROJECTILE_FIREBALL": "was famous in hell",
            "PROJECTILE_SNOWBALL": "ate too much snow",
            "PROJECTILE_EGG": "lost to a chicken",
            "PROJECTILE_ENDER_PEARL": "was split into quantum",
            "PROJECTILE_LLAMA_SPIT": "is hated by llamas'",
            "PROJECTILE_DRAGON_FIREBALL": "was famous in the end",
            "PROJECTILE_SHULKER_BULLET": "wanted to fly",
            "PROJECTILE_WITHER_SKULL": "played catch with a wither",
            "PROJECTILE_SPECTRAL_ARROW": "were unlucky because the apple on their hat was missed",
            "PROJECTILE_TRIDENT": "had a argument with neptune",
            "THORNS": "loved spikes",
            "VOID": "wanted to see the world from below",
            "WITHER": "had too much contact with dark skeletons",
            "CUSTOM": "<This gets ignored>",
            "ENTITY_ATTACK": "was slained by $entity",
            "ENTITY_SWEEP_ATTACK": "was hit by a $entity in a $random time combo",
            "ENTITY_EXPLOSION": "made a big jump because of a $entity",
            "PLAYER": "was welcomed by $player"
        },
        "entities": {
            "DROPPED_ITEM": "Dropped Item",
            "EXPERIENCE_ORB": "Experience Orb",
            "AREA_EFFECT_CLOUD": "Area Effect Cloud",
            "ELDER_GUARDIAN": "Elder Guardian",
            "WITHER_SKELETON": "Wither Skeleton",
            "STRAY": "Stray",
            "EGG": "Egg",
            "LEASH_HITCH": "Leash Hitch",
            "PAINTING": "Painting",
            "ARROW": "Arrow",
            "SNOWBALL": "Snowball",
            "FIREBALL": "Fireball",
            "SMALL_FIREBALL": "Small Fireball",
            "ENDER_PEARL": "Ender Pearl",
            "ENDER_SIGNAL": "Ender Signal",
            "SPLASH_POTION": "Splash Potion",
            "THROWN_EXP_BOTTLE": "Thrown Exp Bottle",
            "ITEM_FRAME": "Item Frame",
            "WITHER_SKULL": "Wither Skull",
            "PRIMED_TNT": "Primed Tnt",
            "FALLING_BLOCK": "Falling Block",
            "FIREWORK": "Firework",
            "HUSK": "Husk",
            "SPECTRAL_ARROW": "Spectral Arrow",
            "SHULKER_BULLET": "Shulker Bullet",
            "DRAGON_FIREBALL": "Dragon Fireball",
            "ZOMBIE_VILLAGER": "Zombie Villager",
            "SKELETON_HORSE": "Skeleton Horse",
            "ZOMBIE_HORSE": "Zombie Horse",
            "ARMOR_STAND": "Armor Stand",
            "DONKEY": "Donkey",
            "MULE": "Mule",
            "EVOKER_FANGS": "Evoker Fangs",
            "EVOKER": "Evoker",
            "VEX": "Vex",
            "VINDICATOR": "Vindicator",
            "ILLUSIONER": "Illusioner",
            "MINECART_COMMAND": "Minecart Command",
            "BOAT": "Boat",
            "MINECART": "Minecart",
            "MINECART_CHEST": "Minecart Chest",
            "MINECART_FURNACE": "Minecart Furnace",
            "MINECART_TNT": "Minecart Tnt",
            "MINECART_HOPPER": "Minecart Hopper",
            "MINECART_MOB_SPAWNER": "Minecart Mob Spawner",
            "CREEPER": "Creeper",
            "SKELETON": "Skeleton",
            "SPIDER": "Spider",
            "GIANT": "Giant",
            "ZOMBIE": "Zombie",
            "SLIME": "Slime",
            "GHAST": "Ghast",
            "ZOMBIFIED_PIGLIN": "Zombified Piglin",
            "ENDERMAN": "Enderman",
            "CAVE_SPIDER": "Cave Spider",
            "SILVERFISH": "Silverfish",
            "BLAZE": "Blaze",
            "MAGMA_CUBE": "Magma Cube",
            "ENDER_DRAGON": "Ender Dragon",
            "WITHER": "Wither",
            "BAT": "Bat",
            "WITCH": "Witch",
            "ENDERMITE": "Endermite",
            "GUARDIAN": "Guardian",
            "SHULKER": "Shulker",
            "PIG": "Pig",
            "SHEEP": "Sheep",
            "COW": "Cow",
            "CHICKEN": "Chicken",
            "SQUID": "Squid",
            "WOLF": "Wolf",
            "MUSHROOM_COW": "Mushroom Cow",
            "SNOWMAN": "Snowman",
            "OCELOT": "Ocelot",
            "IRON_GOLEM": "Iron Golem",
            "HORSE": "Horse",
            "RABBIT": "Rabbit",
            "POLAR_BEAR": "Polar Bear",
            "LLAMA": "Llama",
            "LLAMA_SPIT": "Llama Spit",
            "PARROT": "Parrot",
            "VILLAGER": "Villager",
            "ENDER_CRYSTAL": "Ender Crystal",
            "TURTLE": "Turtle",
            "PHANTOM": "Phantom",
            "TRIDENT": "Trident",
            "COD": "Cod",
            "SALMON": "Salmon",
            "PUFFERFISH": "Pufferfish",
            "TROPICAL_FISH": "Tropical Fish",
            "DROWNED": "Drowned",
            "DOLPHIN": "Dolphin",
            "CAT": "Cat",
            "PANDA": "Panda",
            "PILLAGER": "Pillager",
            "RAVAGER": "Ravager",
            "TRADER_LLAMA": "Trader Llama",
            "WANDERING_TRADER": "Wandering Trader",
            "FOX": "Fox",
            "BEE": "Bee",
            "HOGLIN": "Hoglin",
            "PIGLIN": "Piglin",
            "STRIDER": "Strider",
            "ZOGLIN": "Zoglin",
            "PIGLIN_BRUTE": "Piglin Brute",
            "FISHING_HOOK": "Fishing Hook",
            "LIGHTNING": "Lightning",
            "PLAYER": "Player",
            "UNKNOWN": "Unknown"
        }
    }
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Preview

    [​IMG]

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    That's it!
    I hope you will enjoy the plugin
    If there are any issues don't hesitate to report them to me on GitHub

Recent Updates

  1. Some small fixes and additions