diff options
| author | fatpigsarefat <fatpigsarefat@outlook.com> | 2018-04-21 14:40:04 +0100 |
|---|---|---|
| committer | fatpigsarefat <fatpigsarefat@outlook.com> | 2018-04-21 14:40:04 +0100 |
| commit | 2a342c4c3f36f23e4d2d39073f1b30c12490e1a6 (patch) | |
| tree | 94f2b4d2d2aa8228f3dd8c25e2b049fee0c865b2 /src/me | |
| parent | fd7c1bbd779612584beebebc9357368cccadd1a7 (diff) | |
using valueOf instead of fromName (deprecated) in EntityType
Diffstat (limited to 'src/me')
| -rw-r--r-- | src/me/fatpigsarefat/quests/quests/tasktypes/types/MobkillingCertainTaskType.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/me/fatpigsarefat/quests/quests/tasktypes/types/MobkillingCertainTaskType.java b/src/me/fatpigsarefat/quests/quests/tasktypes/types/MobkillingCertainTaskType.java index aeb56e0e..dd7cfe6e 100644 --- a/src/me/fatpigsarefat/quests/quests/tasktypes/types/MobkillingCertainTaskType.java +++ b/src/me/fatpigsarefat/quests/quests/tasktypes/types/MobkillingCertainTaskType.java @@ -68,8 +68,10 @@ public final class MobkillingCertainTaskType extends TaskType { String configEntity = (String) task.getConfigValue("mob"); String configName = (String) task.getConfigValue("name"); - EntityType entity = EntityType.fromName(configEntity); - if (entity == null) { + EntityType entity; + try { + entity = EntityType.valueOf(configEntity); + } catch (IllegalArgumentException ex) { continue; } |
