mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-12 01:50:36 +01:00
Fixed enchantments -.-
This commit is contained in:
parent
b0a04c42cc
commit
aed6eff863
@ -79,6 +79,21 @@ public class NumberUtil {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the string is an enchantment
|
||||
*
|
||||
* @param string String to check
|
||||
* @return Is the string an enchantment?
|
||||
*/
|
||||
public static boolean isEnchantment(String string) {
|
||||
try {
|
||||
Long.parseLong(string, 32);
|
||||
return true;
|
||||
} catch (NumberFormatException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Rounds the number up to two decimal points (Can be inaccurate due to using decimal-points)
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user