Need help with a issue

Status
This thread has been locked.

Eleabrylla

Feedback score
0
Posts
29
Reactions
0
Resources
0
When I'm making my Events my first Class is called heart it stop people from Damaging each other. but when i start to make the Event i do public void onDamage(EntityDamageEvent e) then do Entity entity = event. and i can't fine what i'm looking for this is what im looking for event.getEntity but i don't see it
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Cloth

Developer
Supreme
Feedback score
20
Posts
212
Reactions
239
Resources
0
When I'm making my Events my first Class is called heart it stop people from Damaging each other. but when i start to make the Event i do public void onDamage(EntityDamageEvent e) then do Entity entity = event. and i can't fine what i'm looking for this is what im looking for event.getEntity but i don't see it

Change
Code:
onDamage(EntityDamageEvent e)
to
Code:
onDamage(EntityDamageEvent event)
 

Cloth

Developer
Supreme
Feedback score
20
Posts
212
Reactions
239
Resources
0
Why?

Eleabrylla make sure you have you're @EventHandler

Edit: make sure your new class implements listener

I don't think you read the code and saw the issue. He was trying to use event.getEntity when he should have been using e.getEntity.
Code:
See the difference?

onDamage(EntityDamageEvent e)  vs  onDamage(EntityDamageEvent event)
 
Status
This thread has been locked.
Top