UltimateTimber/src/main/java/com/songoda/ultimatetimber/animation/TreeAnimationType.java

25 lines
629 B
Java
Raw Normal View History

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 {
FANCY,
DISINTEGRATE,
2019-04-17 10:11:58 +02:00
CRUMBLE,
2019-04-28 04:04:45 +02:00
NONE;
/**
* 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) {
for (TreeAnimationType value : values())
if (value.name().equalsIgnoreCase(string))
return value;
return TreeAnimationType.FANCY;
}
2019-03-28 05:22:13 +01:00
}