Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by Hibbix, Oct 4, 2018.
Hello! Is it possible to make a phantom try to attack a player, even though they have slept?
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/Phantom.html You need to cast the Entity To Mob/Phantom and then do .setTarget(Player) as Player is a LivingEntity
I've never used any of the APIs beyond 1.8.8, but I know that for every creature there's a .setTarget() method.
If the Phantom class extends the Creature class - You're good
Use .setTarget(LivingEntity) or you can use NMS to make them target a player