#EntityDeathEvent help

1 messages · Page 1 of 1 (latest)

simple marlin
#

I need some help with EntityDeathEvent, i made a program but it doesn't work

#

nothing sort in game

lucid rapids
#

It’s hard to answer a programming question without code
Oh no! You ran into a problem. But no worries, people are willing to help, but first they need to see your code. This is because otherwise, they would be providing help based on guesses instead of concrete knowledge. Whether it be a compile error, runtime error, or an unexpected output, I'm sure that if you were to provide code, you'd receive a quick solution.

simple marlin
#

i give u the code

#

?paste

rocky treeBOT
simple marlin
lucid rapids
#

no need to explicitly specify the type: private List<EntityType> mobs = new ArrayList<EntityType>();
this is enough: private List<EntityType> mobs = new ArrayList<>();

  1. why are you creating variables for every entitytype and adding the variables in? just add the types to the list

  2. you are adding the types every time the function is called - you do NOT need to do it, instead add the types inside the constructor, or, better yet, use something like Arrays.asList(EntityType.ENDERMAN, ...)

  3. instead of doing this if-check for amount, just create a map and add pairs like type-amount

  4. explain what you are trying to do instead of just sending your code

simple marlin
#

I try to create a Job plugin to get a custom exp when player kill different mobs

gusty quest
simple marlin
#

i still need help ^^

simple marlin
#

i don't know if you understand ^^

lucid rapids
#

after you redo the code, send it to md5's pastebin again

simple marlin
#

i find a fix :)