1
0
mirror of https://github.com/Zrips/Jobs.git synced 2025-01-04 23:37:49 +01:00

Also include endercrystal in edit commands

This commit is contained in:
montlikadani 2020-07-07 13:37:05 +02:00
parent d0616e873b
commit f17dfc7c07
3 changed files with 33 additions and 18 deletions

View File

@ -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) {

View File

@ -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()) {

View File

@ -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