Discussion in 'Plugin Requests' started by CryoCrafter, Jun 5, 2019.

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


    Plugin category: Mechnic

    Minecraft version: 1.12.2 Bukkit/Spigot/Paper

    Suggested name: Sleep-Over

    What I want: I want a plugin that does the following things:

    - Whenever a player logs off, he gets replaced with an npc with his skin and his name over it which is visible like a normal player name

    - This npc has the same amount of hearts as the player has when he logs off and will not regenerate health, not even with potions thrown at him

    - Other people can kill that npc by explosives / projectiles / melee

    - If he gets killed, he drops normal vanilla drops (EXP and items)

    - If the player returns online, the npc will be removed and the player will be there instead

    - If the player gets killed overnight, he gets a configurable message in the config with the variable: {KILLER}, which is replaced by the name of the player or mob that killed him

    - If the npc gets killed, there will be a configurable message visible for all players on the server with the variables: {VICTIM} (Players npc who died} and {KILLER} player who killed the npc

    Ideas for commands: /sleeptoggle - Toggle whether player should be staying online as npc, or be completely offline

    Ideas for permissions: sleeopver.toggle - Use /sleeptoggle command, NOT a default permission

    When I'd like it by: As soon as possible please
  2. Offline


    This is a big one. It will take a database of some sort and is sensitive to memory leaks, but i think it is interesting. I won't make promises but i'll look into it for you.
  3. Offline


    Please don't use am mysql, i have enough ssd storage on my server
  4. Offline

    timtower Moderator Moderator

    Database is not needed, memory leaks should not happen.
    Max time to keep the NPC there might be a good idea. That way you don't have NPC that are laying in a hidden place for months.
  5. Offline


    Maybe add an option when the npc should automatically be killed in days
    Also with a special message in chat and for the player if he rejoins after
  6. Offline


    You need to store data regarding the NPC's (location, items etc.) somewhere. Be it in a file or what have you, that is a base in which data is stored hence a data-base. Data store would be a better way to word it. I agree leaks should not happen which is why i suggested the data-store instead of keeping it in memory. I worded my previous post awkwardly.
  7. Offline

    timtower Moderator Moderator

    Need to keep things in memory anyways. How you handle that is important.
  8. Offline



    What i'm saying is you can't keep it solely in memory because it will be wiped when the server restarts.
    I recon one would keep the NPC data in memory as long as the chunk in which it resides is loaded. As soon as it unloads the data is cleared. Next to that we keep it in a file.

    @OP I'm interested in this plugin myself. I will look into it for you come this weekend.
  9. Offline


    I've looked into it for you. Spawning NPC's is quite tedious as it turns out unless you use 3rd party plugins; which i don't do. Sorry. There's another plugin request in this section that does what you want but uses a zombie mob instead of an NPC, perhaps that will satisfy your needs for now.

    Good luck.
    KarimAKL likes this.
  10. Offline


    Can you do this all with a villager instead of an npc? But with the features i requested

    And please use a nitwit (green) villager which had no trades, so there are no issues with that.
  11. Offline


    @CryoCrafter That should be a lot easier, creating a new player npc is much harder than i thought it would be. :p
Thread Status:
Not open for further replies.

Share This Page