+ fix materials
This commit is contained in:
parent
2899edd549
commit
f7e5535466
@ -6,7 +6,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = 'me.skymc'
|
||||
version = '5.06'
|
||||
version = '5.07'
|
||||
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
|
@ -30,6 +30,10 @@ import java.util.concurrent.Executors;
|
||||
@Dependency(maven = "com.zaxxer:HikariCP:3.1.0", url = "https://skymc.oss-cn-shanghai.aliyuncs.com/libs/com.zaxxer-HikariCP-3.1.0.jar")
|
||||
@Dependency(maven = "org.scala-lang:scala-library:2.12.8", url = "https://skymc.oss-cn-shanghai.aliyuncs.com/libs/scala-library-2.12.8.jar")
|
||||
@Dependency(maven = "org:kotlinlang:kotlin-stdlib:1.3.50", url = "https://skymc.oss-cn-shanghai.aliyuncs.com/libs/kotlin-stdlib-1.3.50.jar")
|
||||
@Dependency(maven = "org:kotlinlang:kotlin-stdlib-jdk7:1.3.50", url = "https://skymc.oss-cn-shanghai.aliyuncs.com/libs/kotlin-stdlib-jdk7.jar")
|
||||
@Dependency(maven = "org:kotlinlang:kotlin-stdlib-jdk8:1.3.50", url = "https://skymc.oss-cn-shanghai.aliyuncs.com/libs/kotlin-stdlib-jdk8.jar")
|
||||
@Dependency(maven = "org:kotlinlang:kotlin-reflect:1.3.50", url = "https://skymc.oss-cn-shanghai.aliyuncs.com/libs/kotlin-reflect.jar")
|
||||
@Dependency(maven = "org:kotlinlang:kotlin-test:1.3.50", url = "https://skymc.oss-cn-shanghai.aliyuncs.com/libs/kotlin-test.jar")
|
||||
@Dependency(maven = "com.google.inject:guice:4.2.2", url = "https://skymc.oss-cn-shanghai.aliyuncs.com/libs/guice-4.2.2.jar")
|
||||
public class TabooLib {
|
||||
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
package io.izzel.taboolib.util.lite;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -1150,7 +1149,6 @@ public enum Materials {
|
||||
* @return a Materials from the enum (with the same legacy name and data if in older versions.)
|
||||
*/
|
||||
public static Materials matchMaterials(String name, byte data) {
|
||||
Validate.notEmpty(name, "Material name cannot be null or empty");
|
||||
name = format(name);
|
||||
|
||||
if ((contains(name) && data <= 0) && (isNewVersion() || !isDuplicated(name))) {
|
||||
|
@ -12,6 +12,10 @@ public class Numbers {
|
||||
private static Random random = new Random();
|
||||
private static DecimalFormat doubleFormat = new DecimalFormat("#.##");
|
||||
|
||||
public static boolean random(double v) {
|
||||
return random.nextDouble() <= v;
|
||||
}
|
||||
|
||||
public static Random getRandom() {
|
||||
return random;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user