Corrected very broken Actor equality check

This commit is contained in:
frymaster
2015-02-17 20:44:56 +00:00
parent a4e4c35371
commit be06056d5f

View File

@@ -28,10 +28,7 @@ public class Actor {
return false;
}
final Actor other = (Actor) obj;
if ((this.UUID == null) ? (other.UUID != null) : !this.UUID.equals(other.UUID)) {
return false;
}
return true;
return ((this.UUID == null && other.UUID == null) || this.UUID.equals(other.UUID));
}
final String name;
@@ -71,7 +68,6 @@ public class Actor {
return new Actor(entity.getName());
}
public static Actor actorFromProjectileSource(ProjectileSource psource) {
if (psource instanceof Player) {
Player player = ((Player) psource).getPlayer();