diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java b/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java index ef886018..e5617353 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/editjobs.java @@ -240,7 +240,7 @@ public class editjobs implements Cmd { try { value = Double.parseDouble(args[5]); - } catch (Throwable e) { + } catch (Exception e) { return false; } @@ -495,13 +495,18 @@ public class editjobs implements Cmd { entity = EntityType.valueOf(myKey.toUpperCase()); } - if (entity != null && entity.isAlive()) { - type = entity.toString(); - id = entity.getTypeId(); + if (entity != null) { + if (entity.isAlive()) { + type = entity.toString(); + id = entity.getTypeId(); - // using breeder finder - if (actionT == ActionType.BREED) - Jobs.getGCManager().useBreederFinder = true; + // using breeder finder + if (actionT == ActionType.BREED) + Jobs.getGCManager().useBreederFinder = true; + } else if (entity == EntityType.ENDER_CRYSTAL) { + type = entity.toString(); + id = entity.getTypeId(); + } } if (entity == null) { diff --git a/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java b/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java index 8a0a1af6..af2b901f 100644 --- a/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java +++ b/src/main/java/com/gamingmesh/jobs/commands/list/editquests.java @@ -449,14 +449,19 @@ public class editquests implements Cmd { entity = EntityType.valueOf(myKey.toUpperCase()); } - if (entity != null && entity.isAlive()) { + if (entity != null) { + if (entity.isAlive()) { type = entity.toString(); id = entity.getTypeId(); // using breeder finder if (actionT == ActionType.BREED) Jobs.getGCManager().useBreederFinder = true; + } else if (entity == EntityType.ENDER_CRYSTAL) { + type = entity.toString(); + id = entity.getTypeId(); } + } if (entity == null) { switch (key.toLowerCase()) { diff --git a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java index bb91b9a0..7a601785 100644 --- a/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/ConfigManager.java @@ -521,13 +521,18 @@ public class ConfigManager { entity = EntityType.valueOf(myKey); } - if (entity != null && entity.isAlive()) { - type = entity.toString(); - id = entity.getTypeId(); + if (entity != null) { + if (entity.isAlive()) { + type = entity.toString(); + id = entity.getTypeId(); - // using breeder finder - if (actionType == ActionType.BREED) - Jobs.getGCManager().useBreederFinder = true; + // using breeder finder + if (actionType == ActionType.BREED) + Jobs.getGCManager().useBreederFinder = true; + } else if (entity == EntityType.ENDER_CRYSTAL) { + type = entity.toString(); + id = entity.getTypeId(); + } } if (entity == null) { @@ -1335,10 +1340,10 @@ public class ConfigManager { // using breeder finder if (actionType == ActionType.BREED) Jobs.getGCManager().useBreederFinder = true; - } else if (entity == CMIEntityType.ENDER_CRYSTAL) { - type = entity.toString(); - id = entity.getId(); - } + } else if (entity == CMIEntityType.ENDER_CRYSTAL) { + type = entity.toString(); + id = entity.getId(); + } } // Pre 1.13 checks for custom names