Permalink
Browse files

Make BadEntityException message formatting consistent

  • Loading branch information...
PseudoKnight committed Aug 14, 2018
1 parent fe32b4f commit 45b113da3e1c9712181115747d1d0632df3a6b02
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/com/laytonsmith/core/Static.java
@@ -831,7 +831,7 @@ public static MCEntity getEntityByUuid(UUID id, Target t) {
}
MCEntity ent = getServer().getEntity(id);
if(ent == null) {
throw new CREBadEntityException("That entity (UUID " + id + ") does not exist.", t);
throw new CREBadEntityException("That entity (UUID: " + id + ") does not exist.", t);
}
return ent;
}
@@ -849,14 +849,14 @@ public static MCLivingEntity getLivingByUUID(UUID id, Target t) {
if(injectedEntity instanceof MCLivingEntity) {
return (MCLivingEntity) injectedEntity;
}
throw new CREBadEntityException("That entity (" + id + ") is not alive.", t);
throw new CREBadEntityException("That entity (UUID: " + id + ") is not alive.", t);
}
MCEntity ent = getServer().getEntity(id);
if(ent == null) {
throw new CREBadEntityException("That entity (UUID " + id + ") does not exist.", t);
throw new CREBadEntityException("That entity (UUID: " + id + ") does not exist.", t);
}
if(!(ent instanceof MCLivingEntity)) {
throw new CREBadEntityException("That entity (" + id + ") is not alive.", t);
throw new CREBadEntityException("That entity (UUID: " + id + ") is not alive.", t);
}
return (MCLivingEntity) ent;
}

0 comments on commit 45b113d

Please sign in to comment.