#EntityDeathEvent help
1 messages · Page 1 of 1 (latest)
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.
no need to explicitly specify the type: private List<EntityType> mobs = new ArrayList<EntityType>();
this is enough: private List<EntityType> mobs = new ArrayList<>();
-
why are you creating variables for every entitytype and adding the variables in? just add the types to the list
-
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, ...) -
instead of doing this if-check for amount, just create a map and add pairs like type-amount
-
explain what you are trying to do instead of just sending your code
I try to create a Job plugin to get a custom exp when player kill different mobs
Is this resolved or do you still need help?
i still need help ^^
I just don't know why nothing works in game because when i kill a mob i don't get any exp so my class doesn't do anything
i don't know if you understand ^^
please fix your code according to these tips. clean code is much less prone to errors and you might be able to even find out the cause by yourself
after you redo the code, send it to md5's pastebin again
Do what @lucid rapids said
i find a fix :)