broken shit
This commit is contained in:
parent
0edfc893ab
commit
5ccad6b10a
16 changed files with 149 additions and 24 deletions
|
@ -27,4 +27,9 @@ public class ColorUtils
|
|||
public static String strikethrough = "\247m";
|
||||
public static String obfuscated = "\247k";
|
||||
public static String reset = "\247r";
|
||||
|
||||
public static int rgbaToInt(int r, int g, int b, int a)
|
||||
{
|
||||
return ((a&0x0ff)<<24)|((r&0x0ff)<<16)|((g&0x0ff)<<8)|(b&0x0ff);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
package me.kawaiizenbo.moonlight.util;
|
||||
|
||||
public interface ISimpleOption<T>
|
||||
{
|
||||
public void setValueUnrestricted(T value);
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package me.kawaiizenbo.moonlight.util;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class ReflectionUtils
|
||||
{
|
||||
public static Method tryGetMethod(String methodName, Class<?> class1)
|
||||
{
|
||||
// safety be damned this is my own code i get to control when it crashes
|
||||
try
|
||||
{
|
||||
return class1.getDeclaredMethod(methodName, new Class[1]);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return (Method)null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void tryCallMethod(Method method, Object... parameters)
|
||||
{
|
||||
// hope that shits static
|
||||
try
|
||||
{
|
||||
method.invoke(null, parameters);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// go fuck yourself
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue