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 voidaddShop(ShopBuilder builder, net.minecraft.server.level.ServerPlayer... players) Adds a shop to the player's open shops.static ShopBuilderbuilder()Creates a newShopBuilderinstance.static @Nullable ShopBuildergetShop(net.minecraft.server.level.ServerPlayer player) Gets the shop that is currently open for the player.static voidremoveShop(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 newShopBuilderinstance.- Returns:
- A new
ShopBuilderinstance
-