Coder Social home page Coder Social logo

npcfactory's Issues

NpcInteractEvent not being called correctly.

If an NPC is right clicked, using this event will not do anything, instead you have to get the entity by the PlayerInteractEntityEvent and checking the entity that is right-clicked has the 'NPC' metadata.

NPC Metadata interefes with actual Player Metadata

When an NPC is spawned its CraftPlayer is given the "NPC" Metadata. When a real CraftPlayer instance (actual player) is checked for the 'NPC' metadata, and an NPC has the name of the player, then it returns true. This is due to the way Player metadata is stored, it's stored 'name:key', this is a rather big issue and can easily be prevented.

  1. Override the NPCEntity's CraftPlayer PlayerMetadataStore to store by entity id or something.

  2. when checking for isNPC, return entity instanceof NPCEntity

I'd recommend the former.

Add potion effect to npc

Hi lenis! thanks for your library to create npcs!!!

I have a problem :S im using ur NPCFactory version for spigot 1.7.9 and works great, but i have a problem. I need add invisibility potion effect to a npc, but it doesnt work...

PotionEffect potion = new PotionEffect(PotionEffectType.INVISIBILITY, Integer.MAX_VALUE, 1);

npc.getBukkitEntity().addPotionEffect(potion);

what can i do? :s:
Thanks

Update to 1.10

the current version is for Spigot 1.8.x and i need for 1.10.x so please update it, i really love it !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.