Calls a static method of this class @param methodName The name of the static method @param args The arguments to pass to the static method @return An NMSObject wrapping the returned value from the method
(String methodName, Object... args)
| 77 | * @return An NMSObject wrapping the returned value from the method |
| 78 | */ |
| 79 | public NMSObject callStaticMethod(String methodName, Object... args) { |
| 80 | try { |
| 81 | Method method = NMSHelper.getMethod(clazz, methodName, NMSHelper.getArgTypes(args)); |
| 82 | return new NMSObject(method.invoke(null, args)); |
| 83 | } catch (IllegalAccessException | InvocationTargetException e) { |
| 84 | throw new IllegalArgumentException(e); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Gets the value of a static field in the wrapped class |
nothing calls this directly
no test coverage detected