I hereby claim:
- I am zortax on github.
- I am zortax (https://keybase.io/zortax) on keybase.
- I have a public key ASAzpm1aRvFcjxo6SXv7h5g7kgzmzkyy-PBSCZ-1VNiVcQo
To claim this, I am signing this object:
package de.zortax.flint.test; | |
import com.google.inject.AbstractModule; | |
import com.google.inject.Inject; | |
import com.google.inject.Singleton; | |
import net.flintmc.framework.eventbus.event.subscribe.PostSubscribe; | |
import net.flintmc.framework.inject.primitive.InjectionHolder; | |
import net.flintmc.mcapi.chat.event.ChatSendEvent; | |
import net.flintmc.mcapi.player.ClientPlayer; | |
import net.flintmc.util.taskexecutor.TaskExecutor; |
I hereby claim:
To claim this, I am signing this object:
public static <T> T stringToPrimitive(String str, Class<T> type) { | |
Method[] methods = type.getMethods(); | |
for (Method m : methods) { | |
if (m.getName().startsWith("parse") && m.getParameters().length == 1 && m.getParameterTypes()[0].equals(String.class)) { | |
try { | |
return (T) m.invoke(null, str); | |
} catch (IllegalAccessException | InvocationTargetException e) { | |
e.printStackTrace(); | |
} | |
} |