From a40698f543e7718cde957fd2259064f5f84cb54e Mon Sep 17 00:00:00 2001 From: Zrips Date: Thu, 2 Apr 2020 17:42:28 +0300 Subject: [PATCH] Fixing material translations --- .../jobs/config/NameTranslatorManager.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/config/NameTranslatorManager.java b/src/main/java/com/gamingmesh/jobs/config/NameTranslatorManager.java index abe2d20a..4d60166e 100644 --- a/src/main/java/com/gamingmesh/jobs/config/NameTranslatorManager.java +++ b/src/main/java/com/gamingmesh/jobs/config/NameTranslatorManager.java @@ -54,8 +54,18 @@ public class NameTranslatorManager { CMIMaterial mat = CMIMaterial.get(materialName.replace(" ", "")); NameList nameLs = ListOfNames.get(mat); - if (nameLs == null) { - return mat.getName(); + + if (nameLs != null) { + return nameLs.getName(); + } + + if (mame != null && !mame.isEmpty()) { + mat = CMIMaterial.get(materialName.replace(" ", "")); + nameLs = ListOfNames.get(mat); + + if (nameLs != null) { + return nameLs.getName(); + } } if (meta != null && !meta.isEmpty()) { @@ -74,7 +84,7 @@ public class NameTranslatorManager { } } - return nameLs.getName(); + return mat.getName(); case BREED: case KILL: case MILK: