Class ShopFactory
java.lang.Object
com.pixelmonmod.pixelmon.api.shop.ShopFactory
Static factory for creating and managing shops for players from the server side.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addShop
(ShopBuilder builder, net.minecraft.server.level.ServerPlayer... players) Adds a shop to the player's open shops.static ShopBuilder
builder()
Creates a newShopBuilder
instance.static @Nullable ShopBuilder
getShop
(net.minecraft.server.level.ServerPlayer player) Gets the shop that is currently open for the player.static void
removeShop
(net.minecraft.server.level.ServerPlayer player) Removes the shop that is currently open for the player.
-
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
Adds a shop to the player's open shops.- Parameters:
builder
- The shop builder to addplayers
- The players to add the shop for
-
builder
Creates a newShopBuilder
instance.- Returns:
- A new
ShopBuilder
instance
-