How could I possibly make an AOE spell that pushes players back from the caster? The caster will use the spell then every player within a 6 blocks will be pushed away from the caster. I know it uses vectors and I'm not too skilled with them. Thanks in advance!
Loop through nearby entities, and use entity.setVelocity(entity.getLocation().toVector().subtract(p.getLocation().toVector())).
I dont know. Since it works for me , add it after each .toVector() ... Basically you can see what it does from googling it or from its title.Makes stuff normal?(and fixes issues...)