2019-03-30 04:59:10 +01:00
|
|
|
package com.songoda.ultimatetimber.animation;
|
2019-03-28 05:22:13 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The types of tree animations that are available
|
|
|
|
*/
|
|
|
|
public enum TreeAnimationType {
|
2023-06-29 14:31:22 +02:00
|
|
|
FANCY, DISINTEGRATE, CRUMBLE, NONE;
|
2019-04-28 04:04:45 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a TreeAnimationType from a given string
|
|
|
|
*
|
|
|
|
* @param string The string
|
|
|
|
* @return The TreeAnimationType, returns FANCY if the string is an invalid type
|
|
|
|
*/
|
|
|
|
public static TreeAnimationType fromString(String string) {
|
2023-06-29 14:31:22 +02:00
|
|
|
for (TreeAnimationType value : values()) {
|
|
|
|
if (value.name().equalsIgnoreCase(string)) {
|
2019-04-28 04:04:45 +02:00
|
|
|
return value;
|
2023-06-29 14:31:22 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-28 04:04:45 +02:00
|
|
|
return TreeAnimationType.FANCY;
|
|
|
|
}
|
2019-03-28 05:22:13 +01:00
|
|
|
}
|