How could I make mobFollow without using NMS beacuse, nms is not working on all servers(have to be same version I think). For now I did this but Yeah its weird beacuse I have no idea how could I make it. Code: ZPets plugin; LivingEntity pet; Player player; public MobFollow(ZPets plugin, LivingEntity pet, Player player) { this.plugin = plugin; this.pet = pet; this.player = player; } public void run(){ pet.teleport(player); System.out.println("test"); if(!pet.isValid()) cancel(); } }
this is not working for all. I think its working only for dog/cat. I was checking this https://bukkit.org/threads/make-a-mob-follow-a-player.351739/ But its using NMS
@bronzzze Then the only way is probably through NMS, since the other entities are indeed non-tameable.
So how could I make NMS working for all craftbukit/spigot verisons 1.8. Beacuse I was gettting ClassDefNotFoundException Error all the time Edit: I never used NMS before So I have no idea what to do
First off, if you want to do NMS, you should look up Bukkit Tutorials (Through google or the forums, not youtube). And the thing is, because the path changes for every update, you cannot have just one that works across versions. You would need to make different ones that import from the different locations. (BTW, why would you need it for different versions?)