Adds possibility for message customization and translation #5
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user