Class ShopFactory

java.lang.Object
com.pixelmonmod.pixelmon.api.shop.ShopFactory

public class ShopFactory extends Object
Static factory for creating and managing shops for players from the server side.
  • Method Details

    • getShop

      @Nullable public static @Nullable ShopBuilder getShop(net.minecraft.server.level.ServerPlayer player)
      Gets the shop that is currently open for the player.
      Parameters:
      player - The player to get the shop for
      Returns:
      The shop that is currently open for the player
    • removeShop

      public static void removeShop(net.minecraft.server.level.ServerPlayer player)
      Removes the shop that is currently open for the player.
      Parameters:
      player - The player to remove the shop for
    • addShop

      public static void addShop(ShopBuilder builder, net.minecraft.server.level.ServerPlayer... players)
      Adds a shop to the player's open shops.
      Parameters:
      builder - The shop builder to add
      players - The players to add the shop for
    • builder

      public static ShopBuilder builder()
      Creates a new ShopBuilder instance.
      Returns:
      A new ShopBuilder instance