Skip to content

Commit

Permalink
Fix tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
sexnine committed Nov 16, 2021
1 parent 479034e commit 7437815
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/xyz/lotai/assassination/Game/GamePlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void run() {
updateCompass();
Location targetLocation = target.getPlayer().getLocation();
Location myLocation = player.getLocation();
double distance = Util.calculateDistanceBetween(myLocation.getX(), myLocation.getY(), targetLocation.getX(), targetLocation.getY());
int distance = (int) Util.calculateDistanceBetween(myLocation.getX(), myLocation.getZ(), targetLocation.getX(), targetLocation.getZ());
player.spigot().sendMessage(ChatMessageType.ACTION_BAR, new TextComponent("§eTracking §6" + target.getPlayer().getName() + "§7 (" + distance + "m)"));
}
}.runTaskTimer(Assassination.getInstance(), 0L, 1L);
Expand Down

0 comments on commit 7437815

Please sign in to comment.