mirror of
https://github.com/TheDeus-Group/TFM-4.3-Reloaded.git
synced 2024-06-01 04:31:16 +00:00
41 lines
812 B
Java
41 lines
812 B
Java
package me.StevenLawson.TotalFreedomMod;
|
|
|
|
import java.util.Comparator;
|
|
import org.bukkit.Location;
|
|
import org.bukkit.entity.Player;
|
|
|
|
public class TFM_RadarData implements Comparator<TFM_RadarData>
|
|
{
|
|
Player player;
|
|
double distance;
|
|
Location location;
|
|
|
|
public TFM_RadarData(Player inplayer, double indistance, Location inlocation)
|
|
{
|
|
this.player = inplayer;
|
|
this.distance = indistance;
|
|
this.location = inlocation;
|
|
}
|
|
|
|
public TFM_RadarData()
|
|
{
|
|
}
|
|
|
|
@Override
|
|
public int compare(TFM_RadarData t1, TFM_RadarData t2)
|
|
{
|
|
if (t1.distance > t2.distance)
|
|
{
|
|
return 1;
|
|
}
|
|
else if (t1.distance < t2.distance)
|
|
{
|
|
return -1;
|
|
}
|
|
else
|
|
{
|
|
return 0;
|
|
}
|
|
}
|
|
}
|