Solved Corpses on death.

Discussion in 'Plugin Development' started by SpicyBan, Aug 16, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    SpicyBan

    Hello, I am an inspiring new blood to the "plugin development" community and i currently am trying to make a unique plugin. However, The details are not needed for the whole plugin so ill just ask of this:

    A part of my plugin is when both players and mobs die, They would leave their corpse on the floor. After an amount of time, It would rot. Leaving an item such as rotten flesh etc. But some will have their own rot mechanic. Such as after some time after a skeleton dies, It would leave bone meal.

    However, I do not know how to make the corpses from death or make their inventories accessible via a right click on the corpse that's left behind.

    I do not wish for examples nor to be spoon fed. I just wish for some info on how to go by doing this part of the plugin.

    So the things i need help with in short:

    -How to make it when a player dies, It leaves the players body on the ground and allows access to the inventory they had when you right click their corpse. [Most likely a GUI or something]
    -How to make it so when the corpse is left after a while, The body rots and leaves an item behind. Such as rotten flesh but for players, it will be renamed to "Human flesh". And vise versa for all other mobs.

    Thank you - SpicyBan
     
  2. Offline

    timtower Administrator Administrator Moderator

    @SpicyBan Not even sure if we can make every mob lay down.
    Not even sure if we can do that in the latest versions.
     
  3. Offline

    SpicyBan

    I'm completely fine with only players being corpses. As for latest versions, I am also completely fine with whatever version this can be made possible with. I just would like to know how to do this for my plugin.
     
  4. Offline

    timtower Administrator Administrator Moderator

    @SpicyBan Packets, I can tell you that much.
    Don't know the specific ones though, but if you are new then I would suggest dropping this idea for now.
    Or use <Edit by Moderator: Redacted not allowed paid resource url> as API.
     
    Last edited by a moderator: Feb 9, 2021
  5. Offline

    SpicyBan

    I shall just tell you the idea i had and maybe you will understand why i wanted to make my own version:

    My idea was that if a player dies, Their corpse lays on the ground. If a player want to skin the a dead mob for some odd reason, They would have that option to and it would give them leather. Same with the other mobs. Then the player can create armour from skinning them. But if they wanted to decapitate them, They would do so with a key combination and it would give them the player's or mob's head.

    And there would be other aspects such as: Obviously stealing from a corpse [Which would be raiding their inventory]. And rotting of corpses.

    This may sound quite explicit in gore for MC but it's an original idea I've wanted to do for a while now.
     
    Last edited by a moderator: Feb 9, 2021
  6. Offline

    timtower Administrator Administrator Moderator

    @SpicyBan That is why I gave the link, it has an API.
    It has an inventory, and you can make a timer yourself to let it rot.

    The skinning and decapitating will probably be something for a GUI as we can't see key combinations in Bukkit.
     
  7. Offline

    SpicyBan

    Ah, Ok. Thank you for the help.
     
Thread Status:
Not open for further replies.

Share This Page