Class PingMethodReflection


  • public class PingMethodReflection
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.invoke.MethodHandle[] getMethods​(java.lang.Class<?> craftPlayerClass, java.lang.Class<?> entityPlayer, java.lang.String methodName, java.lang.String fieldName)
      Get methods for getting the ping value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getMethods

        public static java.lang.invoke.MethodHandle[] getMethods​(java.lang.Class<?> craftPlayerClass,
                                                                 java.lang.Class<?> entityPlayer,
                                                                 java.lang.String methodName,
                                                                 java.lang.String fieldName)
                                                          throws java.lang.IllegalAccessException,
                                                                 java.lang.NoSuchFieldException,
                                                                 java.lang.NoSuchMethodException
        Get methods for getting the ping value.
        Parameters:
        craftPlayerClass - Class for player
        entityPlayer - Class for player entity
        methodName - getHandle method
        fieldName - Latency field name
        Returns:
        [getHandle method, getPlayer method]
        Throws:
        java.lang.NoSuchMethodException - Method doesn't exist
        java.lang.IllegalAccessException - Method can't be accessed
        java.lang.NoSuchFieldException - Field can't be accessed
        java.lang.IllegalArgumentException - Something else