⭐ Tiny Markets - Shops for anyone | 1.20.x - 1.21.x | Async & Packetbased icon

⭐ Tiny Markets - Shops for anyone | 1.20.x - 1.21.x | Async & Packetbased -----

The most feature rich playershop solution on the market



Migration fixes, discord webhooks and public API
NEW Discord webhooks (fully working including batchmode or instant mode
NEW Public API (shade jar into your plugin as lib and use reflection. See below for list of api methods and examples.

IMPROVED Fixed a bug with migration from plugin Shop ( https://www.spigotmc.org/resources/shop-the-intuitive-shop-plugin.9628/) caused by the owner storing the location of shops not as the container but the sign... and in the wrong format... and not always the same depending on what side the container is facing.
Seriously, just avoid that plugin, its utter dog****...

API:

Code (YAML):
Available methods :
getAllShops ( ) - Get all registered shops
getShopById (long ) - Get shop by ID
getShopAt (Location ) - Get shop at location
getShopsByOwner (UUID ) - Get all shops by owner
getShopCount (UUID ) - Count shops owned by player
isShop (Location ) - Check if location has a shop
getMaxShopsFor (Player ) - Get max shops for player
setEconomyProvider (Economy ) - Set custom economy
getEconomyProvider ( ) - Get current economy
firePrePurchaseEvent ( ... ) - Fire purchase event
firePreSellEvent ( ... ) - Fire sell event
getVersion ( ) - Get plugin version
isPremium ( ) - Check if premium
getPlugin ( ) - Get raw plugin instance
Examples:


Code (Java):
@EventHandler (priority = EventPriority. MONITOR, ignoreCancelled = true )
    public void onShopSell (ShopPreSellEvent event ) {
        if ( !plugin. isLoggingEnabled ( ) || !plugin. isConsoleLoggingEnabled ( ) ) {
            return ;
        }

        Shop shop = event. getShop ( ) ;
        Player seller = event. getSeller ( ) ;
        int amount = event. getAmount ( ) ;
        double totalPrice = event. getTotalPrice ( ) ;

        String itemName = getItemName (shop ) ;
        String ownerName = shop. ownerName ( ) ;

        plugin. getLogger ( ). info ( String. format (
            "[SELL] %s sold %dx %s to %s's shop for %.2f",
            seller. getName ( ),
            amount,
            itemName,
            ownerName,
            totalPrice
        ) ) ;
    }

Code (Java):
@EventHandler (priority = EventPriority. MONITOR, ignoreCancelled = true )
    public void onShopPurchase (ShopPrePurchaseEvent event ) {
        if ( !plugin. isLoggingEnabled ( ) || !plugin. isConsoleLoggingEnabled ( ) ) {
            return ;
        }

        Shop shop = event. getShop ( ) ;
        Player buyer = event. getBuyer ( ) ;
        int amount = event. getAmount ( ) ;
        double totalPrice = event. getTotalPrice ( ) ;

        String itemName = getItemName (shop ) ;
        String ownerName = shop. ownerName ( ) ;

        plugin. getLogger ( ). info ( String. format (
            "[PURCHASE] %s bought %dx %s from %s's shop for %.2f",
            buyer. getName ( ),
            amount,
            itemName,
            ownerName,
            totalPrice
        ) ) ;
    }

Code (Java):
package me.netizdendev.marketsHooker ;

import me.netizdendev.marketsHooker.config.ConfigManager ;
import me.netizdendev.marketsHooker.listeners.ShopListener ;
import me.netizdendev.tinyMarkets.api.TinyMarketsAPI ;
import org.bukkit.Bukkit ;
import org.bukkit.plugin.java.JavaPlugin ;
import org.bukkit.scheduler.BukkitRunnable ;

public final class MarketsHooker extends JavaPlugin {

    private ConfigManager configManager ;
    private TinyMarketsAPI tinyMarketsAPI ;
    private boolean hooked = false ;

    @Override
    public void onEnable ( ) {
        // Initialize configuration
        configManager = new ConfigManager ( this ) ;
        configManager. loadConfig ( ) ;

        // TinyMarkets is a Paper plugin, so it may not be enabled yet when this Bukkit plugin enables.
        // We need to wait for the server to finish loading, then check for TinyMarkets.
        getLogger ( ). info ( "Waiting for TinyMarkets to be available..." ) ;

        // Schedule a delayed task to hook into TinyMarkets after server is fully loaded
        new BukkitRunnable ( ) {
            private int attempts = 0 ;
            private final int maxAttempts = 20 ; // Try for 10 seconds (20 * 10 ticks = 200 ticks = 10 seconds)

            @Override
            public void run ( ) {
                attempts ++;

                // Check if TinyMarkets API is available
                if (TinyMarketsAPI. isAvailable ( ) ) {
                    tinyMarketsAPI = TinyMarketsAPI. getInstance ( ) ;
                    hooked = true ;

                    // Register event listeners
                    Bukkit. getPluginManager ( ). registerEvents ( new ShopListener (MarketsHooker. this ), MarketsHooker. this ) ;

                    getLogger ( ). info ( "MarketsHooker hooked into TinyMarkets v" + tinyMarketsAPI. getVersion ( ) + " successfully!" ) ;
                    getLogger ( ). info ( "Logging module: " + (isLoggingEnabled ( ) ? "ENABLED" : "DISABLED" ) ) ;
                    this. cancel ( ) ;
                    return ;
                }

                // If we've exceeded max attempts, give up
                if (attempts >= maxAttempts ) {
                    getLogger ( ). warning ( "TinyMarkets API not available after " + maxAttempts + " attempts. MarketsHooker will not function." ) ;
                    getLogger ( ). warning ( "Please ensure TinyMarkets is installed and enabled." ) ;
                    this. cancel ( ) ;
                }
            }
        }. runTaskTimer ( this, 10L, 10L ) ; // Start after 10 ticks, repeat every 10 ticks (0.5 seconds)
    }

    @Override
    public void onDisable ( ) {
        getLogger ( ). info ( "MarketsHooker disabled!" + (hooked ? " (was hooked to TinyMarkets)" : " (was not hooked)" ) ) ;
    }

    public boolean isHooked ( ) {
        return hooked ;
    }

    public boolean isLoggingEnabled ( ) {
        return configManager. isLoggingEnabled ( ) ;
    }

    public boolean isConsoleLoggingEnabled ( ) {
        return configManager. isConsoleLoggingEnabled ( ) ;
    }

    public TinyMarketsAPI getTinyMarketsAPI ( ) {
        return tinyMarketsAPI ;
    }

    public ConfigManager getConfigManager ( ) {
        return configManager ;
    }
}
 
----------, Feb 26, 2026
Resource Information
Author:
----------
Total Downloads: 87
First Release: Feb 21, 2026
Last Update: Yesterday at 4:51 PM
Category: ---------------
All-Time Rating:
2 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings