https://hub.spigotmc.org/javadocs/s...ukkit.Location, org.bukkit.entity.EntityType) https://google.com
Look up some tutorials first of all. No one is here to spoonfeed. Do you know Java? If that's the case I'll help you.
Event? Why would you need an event here? I mean you're asking how you can spawn a mob near a player? **borks**
That's not an event. An event is an object that gets fired when something happens in your world/server. Sorry that was the best explanation I could give to it. You could actually hook this up to an event and spawn a mob when you throw an egg for instance.
Ahh, do you want to teleport ALREADY SPAWNED mobs CLOSER to the player? By the way, you should edit your post title to something that explains your issue.
I'd set variables, 2 for x and 2 for y, 2 for minimum values, 2 for maximum values. Then get an average between those two using a Random object and set the mob's location with values you got from the random. (The event should have a getMod() method of some sorts).