Class CommandResultExtension

java.lang.Object
me.wolfyscript.customcrafting.utils.recipe_item.extension.ResultExtension
me.wolfyscript.customcrafting.utils.recipe_item.extension.CommandResultExtension
All Implemented Interfaces:
me.wolfyscript.utilities.util.Keyed

public class CommandResultExtension extends ResultExtension
  • Constructor Details

    • CommandResultExtension

      public CommandResultExtension()
    • CommandResultExtension

      public CommandResultExtension(CommandResultExtension extension)
    • CommandResultExtension

      public CommandResultExtension(List<String> consoleCommands, List<String> playerCommands, boolean nearPlayer, boolean nearWorkstation)
  • Method Details

    • onWorkstation

      public void onWorkstation(org.bukkit.block.Block block, @Nullable @Nullable org.bukkit.entity.Player player)
      Description copied from class: ResultExtension
      Called only when crafted in a workstation. Not called if no block is involved!
      Specified by:
      onWorkstation in class ResultExtension
      Parameters:
      block - The block of the workstation.
      player - The player that might be involved in the crafting. Might be Null if the action didn't involve a player.
    • onLocation

      public void onLocation(org.bukkit.Location location, @Nullable @Nullable org.bukkit.entity.Player player)
      Description copied from class: ResultExtension
      Called each time when the result was crafted on any location. The player might be null.
      Specified by:
      onLocation in class ResultExtension
      Parameters:
      location - The location of the inventory, the result was crafted in.
      player - The player that crafted the item or null if it was crafted by a block.
    • onPlayer

      public void onPlayer(@NotNull @NotNull org.bukkit.entity.Player player, org.bukkit.Location location)
      Description copied from class: ResultExtension
      Called only if a player is involved in the crafting of the result.
      Specified by:
      onPlayer in class ResultExtension
      Parameters:
      player - The player that crafted the result.
      location - The location of the inventory, the result was crafted in.
    • clone

      public CommandResultExtension clone()
      Specified by:
      clone in class ResultExtension
    • executeCommands

      protected void executeCommands(org.bukkit.entity.Player player)
    • parseCommands

      protected List<String> parseCommands(List<String> commands, org.bukkit.entity.Player player)