Class BukkitHelperMethods

java.lang.Object
io.github.projectunified.craftcommand.processor.bukkit.BukkitHelperMethods

public final class BukkitHelperMethods extends Object
Shared generator for Bukkit/Paper-Basic helper methods emitted into generated command wrappers: getPlayer, getOfflinePlayer, getWorld, getLocation, suggestPlayers, suggestWorlds.

Previously these ~150 lines were copy-pasted identically between BukkitCommandProcessor. Now both delegate here.

  • Method Details

    • generate

      public static void generate(com.palantir.javapoet.TypeSpec.Builder typeSpec, CommandModel model)
      Generate all needed helpers into the given TypeSpec, based on which types the command uses.
    • hasParameterType

      public static boolean hasParameterType(CommandModel model, String typeName)
      Check if any method in the command tree has a parameter of the given type name.