How can i take target player ? i mean when i click right if there is a person in my target it send message to player. and one more question i want teleport player to (x+50 and z+50) but if there is a mountain, player gonna stuck in there.so how can i fix it are there any solution for teleport player to max y coordinate ?
second thing: double y = world.getHighestBlockYAt(x , z) + 3; // not sure if the name is spelled correct.. first thing: Loop through all the players in the server , get the location from them. Get the location from the player who is targiting someone , chech which player is the closest. done.
kaskoepoes112 i mean with target, i asked are there any method like getTargetBlock for players ? (like getTargetPlayer() ) and what is player hit event ? i want when i hit the player it send message to player..
Brexima uhm I guess EntityHitEntityEvent is the best , check if both entities are instanceof Player ..