Adds possibility for message customization and translation #5

This commit is contained in:
2022-10-03 18:15:38 +02:00
parent 3d333c6406
commit 30bddfa9c8
20 changed files with 406 additions and 188 deletions

View File

@@ -36,19 +36,19 @@ public enum SmithPreset {
RANGED_SMITH;
/**
* Replaces the given string if it's a smith type placeholder
* Replaces the given string if it's a smith type preset
*
* @param possiblePlaceholder <p>The string that might be a placeholder</p>
* @return <p>The string, possibly with the placeholder replaced</p>
* @param possiblePreset <p>The string that might be a preset</p>
* @return <p>The string, possibly with the preset replaced</p>
*/
public static String replacePlaceholder(String possiblePlaceholder) {
public static String replacePreset(String possiblePreset) {
for (SmithPreset smithPreset : SmithPreset.values()) {
if (possiblePlaceholder.replace('-', '_').equalsIgnoreCase("preset:" +
if (possiblePreset.replace('-', '_').equalsIgnoreCase("preset:" +
smithPreset.name())) {
return String.join(",", smithPreset.getMaterialNames());
}
}
return possiblePlaceholder;
return possiblePreset;
}
/**