This plugin integrates Google Gemini and the Discord API to AI generate obituaries whenever a player dies and send them in chat and in a Discord channel. The AI is prompted to create a customized obituary using the player name, means of death, and items in the player's inventory, ensuring a personal (and oftentimes funny) obituary.
Here is an example of the message being sent in game chat after the player was killed by an Enderman with full diamond armor and diamond tools:
This is the corresponding Discord message that will be sent if the Discord settings are enabled:
Here is a video demonstration:
After some testing, here is the Gemini prompt I decided to use for the release:
Create a 100 word obituary for a Minecraft player named (playerName) whose death message was (deathMessage) and who had (items) in their inventory. Only use the information provided, do not make anything up. Use the exact player name as given. Do not output exact item names unless they are human readable and grammatically correct. Only talk about the most important items in the player's inventory. Make the message funny.
As of version 1.2 this message is fully customizable in the config! You can pass any AI prompt you like along with the placeholders (playerName), (deathMessage), and (items) to fully customize your obituary.
The plugin requires a Gemini API Key to function, which can be easily created on
Google's AI Developer Website free of charge. Discord integration is optional, and if you want to incorporate a bot, simply follow
this tutorial. Copy both the Gemini API Key and the Discord API Key into the config.yml file, along with the ID of the channel you wish to have the messages sent. Make sure the bot has proper permissions to access the channel. The bot will not appear online because it is operating with HTTP requests.
This plugin is in very early development and may have bugs, so reach out if there are any problems with it!