Package com.ranull.graves.util
Class ReflectionUtil
java.lang.Object
com.ranull.graves.util.ReflectionUtil
Utility class for handling reflection operations related to Bukkit and Minecraft server classes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Class
<?> Retrieves a class from the net.minecraft.server package using the server version from the Bukkit package.static void
swingMainHand
(org.bukkit.entity.Player player) Triggers the main hand swing animation for the specified player using reflection to access Minecraft server methods.
-
Constructor Details
-
ReflectionUtil
public ReflectionUtil()
-
-
Method Details
-
swingMainHand
public static void swingMainHand(org.bukkit.entity.Player player) Triggers the main hand swing animation for the specified player using reflection to access Minecraft server methods.- Parameters:
player
- The player whose main hand swing animation is to be triggered.
-
getClass
Retrieves a class from the net.minecraft.server package using the server version from the Bukkit package.- Parameters:
clazz
- The name of the class to retrieve.- Returns:
- The class object for the specified class name.
- Throws:
ClassNotFoundException
- If the class cannot be found.
-