Supressing some warnings

This commit is contained in:
nossr50 2019-02-06 19:49:53 -08:00
parent f1ac4ff265
commit 6127a7fe11
2 changed files with 4 additions and 2 deletions

View File

@ -259,11 +259,13 @@ public abstract class SkillCommand implements TabExecutor {
String statDescriptionKey = !isExtra ? subSkillType.getLocaleKeyStatDescription() : subSkillType.getLocaleKeyStatExtraDescription();
if(isCustom)
return LocaleLoader.getString(templateKey, LocaleLoader.getString(statDescriptionKey, vars));
//Cast to Object[] to suppress warnings
return LocaleLoader.getString(templateKey, LocaleLoader.getString(statDescriptionKey, (Object[]) vars));
else
{
String[] mergedList = addItemToFirstPositionOfArray(LocaleLoader.getString(statDescriptionKey), vars);
return LocaleLoader.getString(templateKey, mergedList);
//Cast to Object[] to suppress warnings
return LocaleLoader.getString(templateKey, (Object[]) mergedList);
}
}