Permalink
Browse files

Use UUID.compareTo()

  • Loading branch information...
PseudoKnight committed Dec 13, 2017
1 parent 36b4ad3 commit ac76763d94843bafb45d29e9ee1d5cff2430a167
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/com/laytonsmith/core/Static.java
@@ -813,7 +813,7 @@ public static MCLivingEntity getLivingEntity(Construct id, Target t) {
* @return
*/
public static MCEntity getEntityByUuid(UUID id, Target t) {
if (injectedEntity != null && injectedEntity.getUniqueId().equals(id)) {
if (injectedEntity != null && injectedEntity.getUniqueId().compareTo(id) == 0) {
// This entity is not in the world yet, but it was injected by the event
return injectedEntity;
}
@@ -835,7 +835,7 @@ public static MCEntity getEntityByUuid(UUID id, Target t) {
* @return
*/
public static MCLivingEntity getLivingByUUID(UUID id, Target t) {
if (injectedEntity != null && injectedEntity.getUniqueId().equals(id)) {
if (injectedEntity != null && injectedEntity.getUniqueId().compareTo(id) == 0) {
// This entity is not in the world yet, but it was injected by the event
if (injectedEntity instanceof MCLivingEntity) {
return (MCLivingEntity) injectedEntity;

0 comments on commit ac76763

Please sign in to comment.