Перейти к содержимому
Mineforgian

ShopShelves

New advanced way of admin shops and playershops. ShopShelves and PlayerShelves

Загрузки
4K
Подписчики
30
Обновлён
12 июля 2026 г.
Лицензия
All-Rights-Reserved

Опубликован 17 октября 2025 г.

ShopShelves - Admin Shops & Player-Owned Shops

The Plugin version can be read about at the SpigotMc page.

Client side mod that improves the shopping experience!! WIITS

t

ShopShelves transforms the new Shelf Block (added in Minecraft 1.21.9) into flexible, server-friendly shops! This powerful server-side Fabric mod for Minecraft 1.21.9 allows administrators to create permanent, fixed-price shops and gives players the ability to set up their own chest-linked "Player Shelves" with custom prices, all powered by a configurable in-game economy.

Pictures explained:

The Following pictures depict the ingame shelf blocks in order:

Buy Shop | Sell Shop | Buy & Sell Shop | Custom Label | Player Shop

Statistics Book → Shows the total money earned / lost per slot's item.

Custom Price GUI — shift right-click a shelf to set custom prices per slot.

Customer-friendly viewer GUI to inspect the full item (potions, enchantments, etc.)

📧 Contact Me & Support Information

💬 Primary Support Channel (Preferred)

All general questions, feature requests, and non-urgent bug reports should be posted in the appropriate channels on our Discord Server. We actively monitor the server and will respond as soon as possible. This ensures that the whole community can benefit from the discussion and solutions.

🆘 Urgent Private Messaging (PM) Policy

While we prefer all issues to be handled via the Discord server first, you are welcome to PM me directly under specific urgent circumstances:

  • Allowed Reason: Your server is crashing or experiencing critical, game-breaking errors directly related to one of my mods/plugins.
  • Requirement: You must be the owner of the server.
  • Time Zone: I am operating in the (CET/CEST) Time Zone.
  • PM Hours: Please only send private messages between 10:00 AM and 10:00 PM (Brussels Time).

I will endeavor to answer your PM as soon as I can to be helpful and see what I can do to resolve your urgent issue. However, please understand that immediate responses are not guaranteed, and private messaging is a professional courtesy, not an entitlement. Thank you for your understanding and cooperation!


🛠️ API Integration Guide: The ShopshelvesApi

For mod developers, ShopShelves exposes shop shelf functions via the ShopshelvesApi class.

package me.andy.shopshelves.api;

import me.andy.shopshelves.logic.ShopHelper;
import me.andy.shopshelves.util.ShopShelf;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.ShelfBlockEntity;
import org.jetbrains.annotations.Nullable;

import java.util.Optional;
import java.util.UUID;

/**
 * Public API for the ShopShelves mod.
 * Other mods should use this class to safely check and interact with ShopShelves entities.
 */
public final class ShopshelvesApi {

    private static final ShopshelvesApi INSTANCE = new ShopshelvesApi();

    private ShopshelvesApi() {}

    public static ShopshelvesApi getInstance() {
        return INSTANCE;
    }

    /**
     * Checks if a given BlockEntity is an active ShopShelf (any mode other than NONE).
     */
    public boolean isShopShelf(@Nullable BlockEntity blockEntity) {
        if (!(blockEntity instanceof ShelfBlockEntity) || !(blockEntity instanceof ShopShelf shopShelf)) {
            return false;
        }
        return shopShelf.getShopMode() != ShopHelper.ShopMode.NONE;
    }

    /**
     * Gets the current shop mode for a BlockEntity, if it is an active ShopShelf.
     */
    public Optional<ShopHelper.ShopMode> getShopMode(@Nullable BlockEntity blockEntity) {
        if (blockEntity instanceof ShopShelf shopShelf && isShopShelf(blockEntity)) {
            return Optional.of(shopShelf.getShopMode());
        }
        return Optional.empty();
    }

    /**
     * Gets the UUID of the owner of the shop, if it is an active ShopShelf.
     */
    public Optional<UUID> getShopOwner(@Nullable BlockEntity blockEntity) {
        if (blockEntity instanceof ShopShelf shopShelf && isShopShelf(blockEntity)) {
            return shopShelf.getOwner();
        }
        return Optional.empty();
    }
}

Required Mod: EcoBal Economy API


Features

Robust Shop Types

  • Admin Shops (Buy / Sell / Dual): Admins can set up persistent shops using the Shelf Block for buying, selling, or dual trade. Admin shops are never restricted by the world allowlist and cannot be broken from the front face's item slots.
  • Player Shops (PlayerShelves): Players can create their own shops by Sneaking + Placing a Shelf Block against a chest, barrel, or copper chest.
    • Automatically links to the container, including double chests, for stock management.
    • Supports custom prices set per slot via the in-game Price GUI (shift right-click the shelf).
    • Configurable single-type mode: lock a player shop to one item type across all three slots with a shared price, or allow each slot to hold a different item independently.
    • Limits player shop creation based on permission nodes and a configurable default limit.
    • When the linked container is broken, the player shelf automatically resets to a plain vanilla shelf — no leftover floating text or stale data.

Custom Shop Labels

  • Shop owners and admins can set a custom floating label on any shelf via the Price GUI.
  • Labels support legacy color codes (&c, &l, etc.), hex color codes (&#RRGGBB), and a newline marker (\n or &n) to split the label across two lines.
  • Surrounding spaces around \n / &n are stripped automatically.
  • The length limit (label_max_length in config.yml, default 64) counts only visible characters — color codes and the newline marker are ignored entirely.
  • Bracket formatting for both admin and player shelf labels is fully configurable per type in messages.yml, including open/close bracket text, color, and a brackets_per_line toggle:
    • true (default) — brackets wrap every line.
    • false — opening bracket on the first line only, closing bracket on the last line only.
  • Right-click the label button in the Price GUI to clear the label instantly, without closing the GUI.

Dynamic Item Pricing

  • Global Pricing (pricing.yml): Set default buy and sell prices for items, including data-rich items like potions, enchanted books, goat horns, and player heads.
  • Custom Price Stamps: Use the /shops price command to apply a one-time price stamp to a held item. That item can then configure a PlayerShelf or set custom slot prices on Admin Shops.
  • Flexible Pricing Ratios: Define prices based on quantity (e.g., $10 for 64 dirt) using the amount argument; the shop calculates the correct unit price per transaction.
  • In-GUI Price Editing: Shift right-click any shelf to open the Price GUI and adjust buy/sell prices with increment/decrement buttons or by typing an exact value in chat.
  • Price Reset: Reset any slot's custom price back to config defaults from within the Price GUI. In single-type mode, resetting clears all three slots at once with a clean, slot-agnostic confirmation message.

Statistics Book

  • Open the Stats Book from the viewer GUI or the price GUI to see a full breakdown of total money earned and lost per slot for both Admin Shops and Player Shelves.
  • Profit and loss are tracked separately per slot and persist through server restarts.

Advanced Text Display & Aesthetics

  • Dynamic Floating Text: Shop information is displayed using Minecraft Text Display Entities, which automatically update when stock changes, prices are modified, or a shop goes "Out of Order."
  • Customizable Scaling: Configure the scale of the main mode display, amount display, and price display independently (values 1–10).
  • Range Control: Independently set the render distance (in blocks) for the main shop display and the price display.
  • Two Price Display Modes:
    • TRIPLEPRICE: Shows the price per slot — ideal for multi-item Admin Shops.
    • SINGLEPRICE: Shows one merged price for the shelf — forced for Player Shelves.
  • Rich Text Formatting: All display text and chat messages support legacy color codes and hex color codes throughout.
  • Item Language: Localize item names in displays using any Minecraft locale (en_us, de_de, fr_fr, etc.), fetched asynchronously from GitHub on startup.

Shop Management & Protection

  • Player Shop Limits: Restrict the number of PlayerShelves a player can create using permission nodes (e.g., shopshelves.playershelves.5 for a limit of 5) or grant unlimited creation.
  • World Allowlist: Restrict player shop creation to specific worlds. Admin shops are never affected by this list.
  • Admin Mode: Operators enter a special "Admin Mode" (/shops admin) to bypass all shop protections and quickly configure shops.
  • Break Protection: The front-face item slots of both Admin Shops and Player Shelves cannot be broken by clicking within the 8×16 pixel slot area — owners and admins must target the top or bottom band of the shelf face to break it.
  • Container Protection: Linked containers are protected from non-owners and cannot be broken while linked to a PlayerShelf.
  • Explosion Immunity: Shop shelves and their linked containers are immune to TNT, creepers, fireballs, and wither explosions.
  • Config Auto-Migration: On every startup, both config.yml and messages.yml are automatically updated to add any new keys introduced in an update — old config files are never broken or reset.
  • Config Reload: Use /shops reload to refresh all settings, prices, and messages without a server restart.
  • Full Update: Use /shops update to re-render all floating text displays across all worlds.

Commands

  • /shops, /shopshelves — Displays the main help page with clickable commands.
  • /shops admin — Toggles admin mode to bypass shop protection and configure shops.
  • /shops reload — Reloads config.yml, pricing.yml, and messages.yml.
  • /shops update — Forces a re-render of all floating text displays.
  • /shops mode [mode_name] — Views or sets the Message Delivery Mode (CHAT | ACTIONBAR | BOTH) or Price Display Mode (SINGLEPRICE | TRIPLEPRICE).

Global Pricing Commands (Requires shopshelves.itemprice):

  • /shops itemprice — Shows the current global price settings for the held item.
  • /shops itemprice <price> <type> <amount> — Sets the global price for the held item.
    • <type>: buy, sell, or both
    • <amount>: The quantity the price applies to (e.g., 64)

Custom Price Stamp Command (Requires shopshelves.price):

  • /shops price <price> <type> <amount> — Creates or modifies a one-time price stamp on the held item.
    • Note: Only one stamped item is allowed in a player's inventory at a time.

Permissions

Click to view all permission nodes and their descriptions
  • shopshelves.command — Access to the base /shops help command. (Default: all players)
  • shopshelves.admin — Usage of /shops admin mode. (OP Level 2)
  • shopshelves.reload — Usage of /shops reload. (OP Level 2)
  • shopshelves.update — Usage of /shops update. (OP Level 4)
  • shopshelves.mode — Usage of /shops mode. (OP Level 4)
  • shopshelves.itemprice — Usage of /shops itemprice to manage global pricing. (OP Level 2)
  • shopshelves.price — Usage of /shops price to create custom price stamps. (OP Level 2)
  • shopshelves.playershelf — Allows a player to create PlayerShelves. (OP Level 0 by default)
  • shopshelves.playershelves.unlimited — Grants unlimited PlayerShelf creation. (OP Level 4)
  • shopshelves.playershelves.<number> — Sets the maximum number of PlayerShelves a player can own (e.g., shopshelves.playershelves.10 for a limit of 10). (OP Level 2)
  • shopshelves.setlabel — Allows setting a custom label on a shop. (OP Level 2)
  • shopshelves.setlabel.color — Allows using color codes and hex colors in custom labels. (OP Level 4)

Modpack Policy

  • You ARE PERMITTED to include ShopShelves in any modpack.
  • Credit is appreciated but not strictly required.
  • Please do not modify the mod's JAR file directly.
  • The modpack itself, or access to this mod within the modpack, must not be sold.

Ченджлог

Fabric_1.0.13Релиз26.2 · 12 июля 2026 г.

The admin shop shelf creation was failing the buy shelfs this is now fixed

Fabric_1.0.13Релиз26.1, 26.1.1, 26.1.2 · 12 июля 2026 г.

The player shop had a bug where 1 price tag instead of both sell and buy always displayed 0 this has been fixed

Fabric_modded_1.0.12Релиз26.1, 26.1.1, 26.1.2 · 25 мая 2026 г.

Making textdisplays not spam packets to players, making textdisplays more reliable and less data consuming (lesser lag)

Making ShopShelves mod more reliable over all

1.0.11Релиз26.1, 26.1.1, 26.1.2 · 23 мая 2026 г.

Feedback is always apreciated check my discord!

Fixed sell and buy prices from config not working properly Fixed formatting Stronger compatibility with Chat Mod TextDisplay's updated to perform better

Paper_Spigot_Purpur_1.0.13Релиз26.1, 26.1.1, 26.1.2 · 27 апреля 2026 г.

Downgraded to java 21 (for 1.21.9+ to work again) Fixed Bug: OutOfMemoryError

1.0.12Релиз26.1, 26.1.1, 26.1.2 · 22 апреля 2026 г.

ShopShelves Spigot — Changelog

Version 1.0.12

New Feature: Sale & Tax System • Added /shops sale and /shops tax commands for applying server-wide or per-player price modifiers to admin shops. • Global deals replace each other (only one global sale and one global tax active at a time). • Player deals stack — multiple timed deals can coexist without losing earlier ones when a newer one expires. • Resolution logic: highest sale wins, highest tax wins, they cancel each other out. A 25% sale and 20% tax results in a net 5% sale. • Global deals take priority over personal deals when the global percentage is higher on that side. • Added /shops deals command to view active global and personal deal percentages at a glance. • Text displays on admin shops automatically update to reflect the active global deal price when a sale or tax is set or cleared. • Player-owned shelf shops (PLAYERSHELF mode) are completely immune to deals — sales and taxes are an admin tool and do not affect player shops. • Added player_deals_online config option: when enabled, personal deal timers only count down while the player is connected to the server. Global deals always use wall-clock time. • Timed deals accept duration tokens: 30m (minutes), 6h (hours), 7d (days).

New Permission Nodes • shopshelves.sale — allows using /shops sale. • shopshelves.sale. — allows applying a sale up to N% (e.g. shopshelves.sale.20). • shopshelves.sale.# — allows applying a sale of any percentage. • shopshelves.tax — allows using /shops tax. • shopshelves.tax. — allows applying a tax up to N%. • shopshelves.tax.# — allows applying a tax of any percentage. • shopshelves.deals — allows viewing active deals via /shops deals. Defaults to true (all players).

New: Deal Placeholders The following placeholders are now available in messages.yml and display format strings: • %sale% — net effective sale % after global+personal cancellation (0 if none). • %tax% — net effective tax % after global+personal cancellation (0 if none). • %sale_format% — always renders as "Sale X%" even when 0. • %tax_format% — always renders as "Tax X%" even when 0. • %if_sale% — renders "Sale X%" only when a sale is active, otherwise empty. • %if_tax% — renders "Tax X%" only when a tax is active, otherwise empty. • %global_deal% — shows the winning side for global deals only ("Sale X%" or "Tax X%" after they offset each other, or empty if equal/zero). • %player_deal% — shows the winning side for the combined player result (global + personal). Whichever side is larger after cancellation wins.

Developer API • Added price modifier API to ShopshelvesApi. Third-party plugins can now apply and remove per-player price multipliers for admin shops programmatically. • ShopshelvesApi.setPlayerPriceModifier(uuid, multiplier) — applies a permanent modifier. 0.80 = 20% discount, 1.20 = 20% surcharge. • ShopshelvesApi.setPlayerPriceModifier(uuid, multiplier, durationMs) — timed version. • ShopshelvesApi.removePlayerPriceModifier(uuid) — removes any modifier set by the calling plugin. • ShopshelvesApi.getEffectivePriceMultiplier(uuid) — returns the combined effective multiplier for a player (all sources: API + command + global). • ShopshelvesApi.hasActiveModifier(uuid) — returns true if any deal is currently active for a player. • API modifiers feed into the same stacking system as command-set deals and respect all existing PLAYERSHELF immunity rules. • Added DealEntry.Source.API to distinguish API-set modifiers from command-set ones internally.

Persistence • All deals (global and player) are persisted in the existing shopshelves.db SQLite file across server restarts. A new deals table is created automatically on first run — no migration steps required.

Fabric_1.0.11Релиз1.21.9, 1.21.10 · 12 марта 2026 г.

Changelog:

  • Custom Price GUI New Statistics Book.
  • Customer GUI Shift right/left click the shops top front face.
  • Breaking the container of a playershop now correctly gets rid of the shop.
  • World list added to main config when list empty allow all worlds otherwise list is allowing.
  • Shop labels can now be changed using the Custom Price GUI.
  • Custom price chat input now accepts item amount.
  • Old configs should now get the new messages added to them automatically on mod update.
  • /shops admin now accepts a player name to set other players in admin mode.
  • Main config now accepts a language setting for %item% (found in the statistics books and chat messages).
Paper_Spigot_Purpur_1.0.11Релиз26.1, 26.1.1, 26.1.2 · 11 марта 2026 г.

Changes:

  • Missing messages in the configs will now apply to existing configs on update.
  • Player shops now better "remove" when container is broken.
  • /Shops admin is now a thing
  • The main config now supports a language setting for the %item% placeholder.

Комментарии

Загружаем…