Interface CommandAPIVersionHandler


public interface CommandAPIVersionHandler
This file handles the NMS version to be loaded. The CommandAPIVersionHandler file within the commandapi-core module is NOT used at compile time. Instead, the commandapi-vh module is loaded instead, which doesn't use reflection to load NMS instances. NMS classes implement NMS<CommandListenerWrapper>. The type CommandListenerWrapper isn't visible as in this Maven module (it's not included and in some cases, cannot be included because Maven will only select one version of a specific project (in this case, it'll only import one copy of Spigot, almost always the latest stable version (from 1.16.5)). In Eclipse, this can produce an error saying that a class cannot be resolved because it is indirectly referenced from required .class files So sidestep this, we introduce a second intermediary class NMSWrapper_VERSION which depends on CommandListenerWrapper and then our main NMS_VERSION class extends that.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    static dev.jorel.commandapi.CommandAPIPlatform<?,?,?>
    Returns an instance of the current running version's implementation of the Bukkit NMS.
  • Method Details

    • getPlatform

      static dev.jorel.commandapi.CommandAPIPlatform<?,?,?> getPlatform()
      Returns an instance of the current running version's implementation of the Bukkit NMS.
      Returns:
      an instance of NMS which can run on the specified Minecraft version