mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 18:45:27 +01:00
Remove Apache Commons
This commit is contained in:
parent
af7e00ceec
commit
94252df8cf
@ -13,13 +13,13 @@
|
||||
package me.blackvein.quests.util;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import me.blackvein.quests.Quester;
|
||||
import me.blackvein.quests.Quests;
|
||||
|
||||
import org.apache.commons.lang3.reflect.MethodUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@ -190,7 +190,10 @@ public class LocaleQuery {
|
||||
*/
|
||||
public String queryByType(Material material) throws IllegalArgumentException{
|
||||
try {
|
||||
Object item = MethodUtils.invokeExactStaticMethod(craftMagicNumbers,"getItem", material);
|
||||
Object item = null;
|
||||
Method m = craftMagicNumbers.getDeclaredMethod("getItem", material.getClass());
|
||||
m.setAccessible(true);
|
||||
item = m.invoke(craftMagicNumbers, material);
|
||||
if (item == null) {
|
||||
throw new IllegalArgumentException(material.name() + " material could not be queried!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user