Comments (3)
What exactly is causing your NPC to explode?
from citizensapi.
Flint and Steel.
However.. I'm an idiot, apologies. I missed over something in my own codebase, causing the events to not register properly.
from citizensapi.
Side note: NPCDeathEvent
is not getting called when a NPC Creeper explodes:
public void spawnAt(final Location location) {
final NPC npc = CitizensAPI.getNPCRegistry().createNPC(EntityType.CREEPER, this.getMobName());
npc.setName(this.getMobName());
npc.setProtected(false);
npc.addTrait(Powered.class);
location.getWorld().playSound(location, Plugin.getHiss(), 3F, 1F);
location.getWorld().playEffect(location, Effect.FIREWORKS_SPARK, 15);
npc.spawn(location);
// .. some other internal stuff happens after this that doesn't relate
}
And in my listener..
@EventHandler
public void onNPCDeathEvent(NPCDeathEvent event) {
Plugin.get().log("npc death event");
}
It doesn't get called.
I don't need this event so I don't really need it, just thought I would point it out 😄
Thanks again for taking the time to respond.
from citizensapi.
Related Issues (20)
- Please add NPCCloneEvent HOT 1
- Improved javadocs for Traits HOT 2
- NPCS do not interact with each other, nor are events fired that involve them interacting with each other HOT 1
- Newly created NPC doesn't die properly and can't be detected in EntityDeathEvent or NPCDeathEvent HOT 1
- Event if NPC reaches armor stand as target
- Javadoc URL returns 404 error HOT 1
- help with CitizenAPI
- Citizens disable slpash potion functionality and take 0 damage HOT 1
- NPC for certain player. HOT 1
- How can I move an NPC? HOT 1
- maven repo is banned in a country....... HOT 3
- Getting NPC from id throws nullpointerexemption HOT 1
- Skin trait is missing from API HOT 1
- Unable to create or access NPC HOT 1
- Placeholders: First-time players have not played before
- NPCRightClickEvent Not Cancelling HOT 1
- NPCCombustEvent not cancelling HOT 1
- Set a NPC Player health HOT 7
- mising plugin.yml in citizens api HOT 1
- Dynmap URL HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citizensapi.