Filled EnderNPC

Discussion in 'Plugin Requests' started by REW01WER, Aug 24, 2018.

  1. Online

    REW01WER

    Plugin category: Rpg
    Minecraft version: 1.13.1
    Suggested name: EnderNPC
    What I want: Hello! I want simple plugin that opens Enderchest Interface with right click on NPC.

    Example:
    https://dev.bukkit.org/projects/griswold
    this is simple plugin that repairs armour/ tools etc.
    I want something similar, but just open enderchest instead.



    Commands
    /endernpc create <mob> - Spawns NPC where you are standing.
    /enderchest open - Opens enderchest anywhere.

    Permissions:
    ender.npc.use - allows use of this npc, by default everyone can use.
    ender.npc.admin - Op only, allows to create npc.
    ender.open - Op only, allows to open Enderchest everywhere.

    config.yml
    mobs:
    #example
    #1: 0.0 : 0.0 : 0.0
     
    Last edited: Sep 5, 2018
  2. Online

    REW01WER

  3. Offline

    Skynios

    I will going to make this for u :)

    Do you want to remove a npc also?
     
    Last edited: Sep 5, 2018
  4. Online

    REW01WER

    @Skynios
    I don't mind. But not necessary.
    If you are going to add remove command I think it should go under ender.npc.admin permission.
    Tyvm!

    Edit:
    I forgot to mention mobs shouldn't move around or you can add a toggle.
     
    Last edited: Sep 5, 2018
  5. Offline

    Skynios

    What do you mean with toggle :eek:
    And what do you mean with <mob> the enity or a name?
     
    Last edited: Sep 5, 2018
  6. Online

    REW01WER

    @Skynios
    Nvm, forget about toggle, just make them stay still when spawned.
    By <mob> i mean in game mobs.
    Example /endernpc create villager.

    If it's easier you can just spawn villager without option to choose mob.
    I also don't mind if you make it use player models, example /endernpc create <username>

    Choose what's easier for you :)
     
  7. Offline

    Skynios

    okey i will just spawn a villager than that is a lot ez xD

    Here u go Download!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited: Sep 5, 2018
    REW01WER likes this.
  8. Offline

    FishbirdDD

    Have you tried the citizens plugin?
     
  9. Online

    Tango_

    Sorry, I should have said something, I was working on this yesterday, wasn't sure if I had enough time to complete it. But I did. @REW01WER If you want my version of this, its here DOWNLOAD

    /endernpc create <mob> | ender.npc.admin
    /endernpc remove (removes EnderNPC you are looking at) | ender.npc.admin
    /enderchest open | ender.open

    and to click a EnderNPC the permission is ender.npc.use
     
    Last edited: Sep 5, 2018
  10. Online

    REW01WER

    @Tango_
    Code:
    [22:43:02 ERROR]: Error occurred while enabling EnderNPC v1.0 (Is it up to date?)
    java.lang.NullPointerException: null
        at me.tango.endernpc.Main.loadNPCs(Main.java:61) ~[?:?]
        at me.tango.endernpc.Main.onEnable(Main.java:47) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:339) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugin(CraftServer.java:427) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugins(CraftServer.java:341) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at net.minecraft.server.v1_13_R2.MinecraftServer.l(MinecraftServer.java:582) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:545) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:423) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:288) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:698) [spigot-1.13.1.jar:git-Spigot-0ede7d0-c88ae6b]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_172]
     
  11. Online

    Tango_

    Ooops, forgot to add a check for that, here: DOWNLOAD
     
  12. Online

    REW01WER

    @Tango_
    Hey Sometimes i still get an error. Seems like it still work, but maybe you forget something else?
    Also heads look bugged sometimes, mostly when just spawned.

    If there is something easy you can fix I will be happy :)


    Code:
    [17:37:05 INFO]: [eNPC] Enabling EnderNPC v1.0
    >[INFO] ┬║aEnderNPC by Tango_ enabled!
    [17:37:05 ERROR]: Error occurred while enabling EnderNPC v1.0 (Is it up to date?)
    java.lang.NullPointerException: null
            at me.tango.endernpc.Main.loadNPCs(Main.java:61) ~[?:?]
            at me.tango.endernpc.Main.onEnable(Main.java:47) ~[?:?]
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:339) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:403) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugin(CraftServer.java:428) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at org.bukkit.craftbukkit.v1_13_R2.CraftServer.enablePlugins(CraftServer.java:342) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at net.minecraft.server.v1_13_R2.MinecraftServer.l(MinecraftServer.java:584) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:546) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:424) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at net.minecraft.server.v1_13_R2.DedicatedServer.init(DedicatedServer.java:288) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:702) [spigot-1.13.1.jar:git-Spigot-b620c21-19d654b]
            at java.lang.Thread.run(Unknown Source) [?:1.8.0_181]
    Edit:
    Looks like error happens when there is no npc set.
     
    Last edited: Sep 8, 2018
  13. Online

    Tango_

    Ahh, when I last tried to fix, I was tired, this fix should definitely fix that error this time. Let me know if you want anything changed too.
    Link: DOWNLOAD
     
    REW01WER likes this.
  14. Online

    REW01WER

    Really good! Thank you so much!
    Is there radius or something from where npc looks at you?
    Because it only looks at you when you are very close.
     
  15. Online

    Tango_

    I had to disable mob tracking, otherwise if you spawned a creeper for example, it would blow up.
     
  16. Online

    REW01WER

    @Tango_
    Tango please, can you make similar plugin which opens THIS plugin GUI?

    I really, really need this.

    Edit
    Only the /sell command gui, nothing else.
     
    Last edited: Sep 8, 2018
  17. Online

    Tango_

    Sure, after you spawned an EnderNPC, make sure you are looking at it and type /endernpc setcmd (command) - and it will make the player run the command.

    Example: /endernpc setcmd warp place
    Don't insert /'s

    Link: DOWNLOAD

    If it has bugs, let me know.
     
    Last edited: Sep 8, 2018
  18. Online

    REW01WER

    @Tango_
    Hey, thanks.
    It doesn't work. I'm not getting any errors, I can set commands and they even show up in config file.
    But when i right click it opens default villager interface.
    I have tried many commands.

    Edit:
    Also maybe you can turn mob tracking back on since i cannot spawn other npc's. Only villager.

    @Skynios
    This is actually very good plugin, it is damn lightweight.
    Would be perfect if there was way to edit NPC title since I use this as a banker and npc is not moving....
     
    Last edited: Sep 11, 2018
  19. Online

    Tango_

    @REW01WER Try restarting / reloading after adding the command. And what do you mean by you can't spawn other NPCs.
     
  20. Online

    REW01WER

    @Tango_
    When i try to spwn creeper for example it says that mob was spawned but it isn't
     
  21. Online

    Tango_

    Do you have any plugins preventing the spawning of mobs?
     
  22. Online

    REW01WER

    @Tango_
    Didn't think about this, maybe griefprevention does this. :D

    Edit:
    yes it worked!!!

    Can you make it execute commands through console somehow?
    Would be much better.

    For example i use SuperbVote plugin, when player votes it simply executes economy plugin command to give some money, I don't even need to give permission.

    Edit:
    Did you edit permissions? I cen't get it to work for default players.
    i have these;
    ender.npc.use: true
    ender.open: true
     
    Last edited: Sep 9, 2018
  23. Online

    Tango_

    Yes I can try, is there anything else you want me to add while I am changing the code?
     
  24. Online

    REW01WER

    @Tango_
    If it's not hard you can add option to add customizable title as Skynios did. Only if it's not too complicated.
    But in white colour and toggle option for every mob.
     
  25. Online

    Tango_

    Would it be fine if I added a command that lets you set the name title of the mob you are looking at,
    like example: /endernpc settitle &fExample Title
     
  26. Online

    REW01WER

    @Tango_
    Yes sure.
    Here is an example how Griswold plugin title looks like.
    upload_2018-9-9_15-50-30.png


    Edit:
    If it's easier for you maybe ir can simply use all/defined permissions when using ommand through npc.
     
    Last edited: Sep 9, 2018
  27. Online

    Tango_

    @REW01WER
    I have added command to add title to any EnderNPC, you can use it by looking directly at the NPC and type
    /endernpc setname (name) - This can use colour codes.

    You can also add a console command by doing /endernpc setconsolecmd (console command without /'s)
    If you need a placeholder for the player who clicked it is %P%

    Link: DOWNLOAD
     
  28. Online

    REW01WER

    @Tango_
    Seems to be working just fine, thank you!

    Edit:
    Idk sometimes villager dissappears, this never happened with previous version.
    Ill try to make new, I created them on local and they are gone when I uploaded to live server.

    @Tango_
    Can you please display titles in npc.yml so I know which is which.
    Aldo command to remove npc by looking at it would be handy.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 10, 2018
  29. Online

    Tango_

    /endernpc remove - If you look above I added this in first version. Also if the mob doesn't exist in the world, the plugin will remove it from config. Wasn't really designed to carry over mobs from configs, just store the mobs that are currently alive for that world specifically. I can add NPC names to the config, it wouldn't be useful info for the plugin though. I will update this with link once I have done.
     
  30. Online

    REW01WER

    @Tango_
    If it's not being stored in config where is it?

    Edit;
    It uses alot of ram, why is that? Can you do something? I only want villager as an npc btw.
    Looks likes it doesnt even store all info in plugin folder :( I removed plugin and npc alongside with title still remains.

    Edit:
    jeez
    upload_2018-9-11_18-25-5.png
    Aand my server just crashed :D
     
    Last edited: Sep 11, 2018

Share This Page