Sueta

Inventory Market

1.0

Secure exchange between players

·Plugin


With this plugin players can easily add their items to inventory marketplace.

Categories
You can create several categories with specified items

Special category
For "special" items. Items, which have display name.

Category sort
You can anytime change categories and all items will be sorted.

Several pages
There is no limit of items!

GUI-based items addition system
No need to type commands, just click the item in your inventory!

Concurrent modification
When someone buy/sell item, it will be updated for all players who opened menu

Double-spending protection
One item cannot be bought by 2 players at the same time

How it works?

  • You add item in "My Items" menu and set price for it.
  • Someone select your order and buy item.
  • You will get money to your internal account and can withdraw it anytime.


You can easily get back item.
Players will not be able to buy it.

Commands and permissions

Open menu - /market open
Permission: market.command.open
Open menu for player - /market open [player]
Permission: market.command.open.others
Reload config and marketplace - /market reload
Permission: market.command.reload

Configuration

config.yml
system:
  # Show errors in console?
  logErrors: true
  printStackTrace: true
  # Do not change this
  configVersion: '1.0'

messages:
  noPermission: '&2&lMarket &3> &cInsufficient permissions.'
  itemAdded: '&2&lMarket &3> &aItem added!'
  categoryNotFound: '&2&lMarket &3> &cYou cannot add this item!'
  incorrectPrice: '&2&lMarket &3> &cPrice must be greater than 0'
  menuReloaded: '&2&lMarket &3> &cMenu interaction was terminated due to plugin reload.'
  notEnoughtMoney: '&2&lMarket &3> &cInsufficient balance.'
  givenMoney: '&2&lMarket &3> &f{money} credited to your balance.'
  fullInventory: '&2&lMarket &3> &cInventory is full.'
  orderLimit: '&2&lMarket &3> &cYou cannot create more than {limit} orders.'


sounds:
  # 1.8: SUCCESSFUL_HIT
  buy: ENTITY_ARROW_HIT_PLAYER
  # 1.8: SUCCESSFUL_HIT
  add: ENTITY_ARROW_HIT_PLAYER
  # 1.8: BLAZE_HIT
  addError: ENTITY_BLAZE_DEATH
  # 1.8: LEVEL_UP
  withdraw: ENTITY_PLAYER_LEVELUP

mainMenu:
  name: '&0Market'
  rows: 3
  itemLore:
  - '&7Price: &e{price}'
  nodes:
    myItems:
      name: '&bMy items'
      lore:
      - '&cHow to add item?'
      - '&7Open &bMy items'
      - '&7Click on item in your inventory'
      - '&7Use buttons &a+&7/&c-&7 to set the price'
      - '&7Click &2Save'
      id: BOOK
      slot: 26

myItemsMenu:
  name: '&0My items'
  rows: 3
  # Which slots will be used for items. Examples: 0-8    0-4,9-12    0,2,4,6,8
  # If the slots are not enought new page will be created
  usedSlots: 0-17
  itemLore:
  - '&7Price: &e{price}'
  - '&7Click to remove'
  back:
    slot: 18
    name: '&7Back'
    id: ARROW
  nextPage:
    slot: 20
    # If page is available
    active:
      name: '&7Next page'
      id: INK_SACK
      data: 10
    # If page is not available
    inactive:
      name: '&8Next page'
      id: INK_SACK
      data: 8
  prevPage:
    slot: 19
    active:
      name: '&7Previous page'
      id: INK_SACK
      data: 10
    inactive:
      name: '&8Previous page'
      id: INK_SACK
      data: 8
  balance:
    slot: 26
    name: '&aWithdraw'
    lore:
    - '&7Balance: &e{balance}'
#    - '&7Fee: &c{fee}%'
    id: GOLD_INGOT

# Value from 0 to 0.5
# 0.01 = 1%
marketFee: 0

# How many orders player can create?
# -1 = no limit
playerMaxOrders: -1

# This iventory will open when you add item
addItemInventory:
  name: '&0Add item'
  rows: 1
  itemSlot: 4
  nodes:
    '1':
      name: '&cCancel'
      id: BARRIER
      slot: 0
      # close menu and return item
      action: cancel
    '2':
      name: '&c-100$'
      lore:
      - '&7Price: &e{price}'
      id: STAINED_GLASS_PANE
      data: 14
      slot: 1
      # decrease price by 100
      action: dec 100
    '3':
      name: '&c-10$'
      lore:
      - '&7Price: &e{price}'
      id: STAINED_GLASS_PANE
      data: 14
      slot: 2
      # decrease price by 10
      action: dec 10
    '4':
      name: '&c-1$'
      lore:
      - '&7Price: &e{price}'
      id: STAINED_GLASS_PANE
      data: 14
      slot: 3
      # decrease price by 1
      action: dec 1
    '5':
      name: '&a+1$'
      lore:
      - '&7Price: &e{price}'
      id: STAINED_GLASS_PANE
      data: 5
      slot: 5
      # increase price by 1
      action: inc 1
    '6':
      name: '&a+10$'
      lore:
      - '&7Price: &e{price}'
      id: STAINED_GLASS_PANE
      data: 5
      slot: 6
      # increase price by 10
      action: inc 10
    '7':
      name: '&a+100$'
      lore:
      - '&7Price: &e{price}'
      id: STAINED_GLASS_PANE
      data: 5
      slot: 7
      # increase price by 100
      action: inc 100
    '8':
      name: '&aSave'
      id: EMERALD_BLOCK
      slot: 8
      # add item
      action: submit


# Open when you clicked on item to buy it
buyInventory:
  name: '&0Buy item'
  rows: 1
  itemSlot: 4
  submit:
    name: '&aBuy'
    data: 5
    id: STAINED_GLASS_PANE
  cancel:
    name: '&cCancel'
    data: 14
    id: STAINED_GLASS_PANE
  # 'cancelled' will appear if someone else buy this item or owner remove it
  cancelled:
    name: '&cThis order was closed or cancelled'
    data: 14
    id: STAINED_GLASS_PANE


# CATEGORY
# Items with display name will be placed here
special:
  enabled: true
  slot: 7
  inventory:
    name: '&0Special'
    rows: 5
    usedSlots: 0-35
  item:
    name: '&b&oSpecial'
    id: ENDER_PEARL


# CATEGORY
# All items which wasn't categorized will be placed here
uncategorized:
  # It you disable it, players will not be able to add uncategorized items
  enabled: true
  slot: 8
  inventory:
    name: '&0Other'
    rows: 5
    usedSlots: 0-35
  item:
    name: 'Other'
    id: LAVA_BUCKET

categoryInventory:
  back:
    slot: 36
    name: 'Back'
    id: ARROW
  nextPage:
    slot: 38
    active:
      name: '&7Next page'
      id: INK_SACK
      data: 10
    inactive:
      name: '&8Next page'
      id: INK_SACK
      data: 8
  prevPage:
    slot: 37
    active:
      name: '&7Previous page'
      id: INK_SACK
      data: 10
    inactive:
      name: '&8Previous page'
      id: INK_SACK
      data: 8

categories:
  blocks:
    slot: 0
    inventory:
      name: '&0Blocks'
      rows: 5
      usedSlots: 0-35
    item:
      name: 'Blocks'
      id: BRICK  
    materials:
    - STONE
    - GRASS
    - DIRT
    - COBBLESTONE
    - WOOD
    - BEDROCK
    - SAND
    - GRAVEL
    - GOLD_ORE
    - IRON_ORE
    - COAL_ORE
    - LOG
    - SPONGE
    - GLASS
    - LAPIS_ORE
    - LAPIS_BLOCK
    - SANDSTONE
    - WOOL
    - GOLD_BLOCK
    - IRON_BLOCK
    - STEP
    - BRICK
    - BOOKSHELF
    - MOSSY_COBBLESTONE
    - OBSIDIAN
    - WOOD_STAIRS
    - DIAMOND_ORE
    - DIAMOND_BLOCK
    - COBBLESTONE_STAIRS
    - REDSTONE_ORE
    - ICE
    - SNOW
    - CLAY
    - PUMPKIN
    - NETHERRACK
    - SOUL_SAND
    - GLOWSTONE
    - JACK_O_LANTERN
    - STAINED_GLASS
    - SMOOTH_BRICK
    - MELON_BLOCK
    - BRICK_STAIRS
    - SMOOTH_STAIRS
    - MYCEL
    - NETHER_BRICK
    - NETHER_BRICK_STAIRS
    - ENDER_STONE
    - WOOD_STEP
    - SANDSTONE_STAIRS
    - EMERALD_ORE
    - EMERALD_BLOCK
    - SPRUCE_WOOD_STAIRS
    - BIRCH_WOOD_STAIRS
    - JUNGLE_WOOD_STAIRS
    - COBBLE_WALL
    - QUARTZ_ORE
    - QUARTZ_BLOCK
    - QUARTZ_STAIRS
    - STAINED_CLAY
    - LOG_2
    - ACACIA_STAIRS
    - DARK_OAK_STAIRS
    - PRISMARINE
    - SEA_LANTERN
    - HAY_BLOCK
    - HARD_CLAY
    - COAL_BLOCK
    - PACKED_ICE
    - RED_SANDSTONE
    - RED_SANDSTONE_STAIRS
    - STONE_SLAB2
  decorations:
    slot: 1
    inventory:
      name: '&0Decorations'
      rows: 5
      usedSlots: 0-35
    item:
      name: 'Decorations'
      id: DOUBLE_PLANT 
    materials:
    - SAPLING
    - LEAVES
    - WEB
    - LONG_GRASS
    - DEAD_BUSH
    - YELLOW_FLOWER
    - RED_ROSE
    - BROWN_MUSHROOM
    - RED_MUSHROOM
    - TORCH
    - CHEST
    - WORKBENCH
    - FURNACE
    - LADDER
    - SNOW
    - CACTUS
    - JUKEBOX
    - FENCE
    - MONSTER_EGGS
    - IRON_FENCE
    - THIN_GLASS
    - VINE
    - WATER_LILY
    - NETHER_FENCE
    - ENCHANTMENT_TABLE
    - ENDER_PORTAL_FRAME
    - ENDER_CHEST
    - ANVIL
    - TRAPPED_CHEST
    - STAINED_GLASS_PANE
    - LEAVES_2
    - SLIME_BLOCK
    - CARPET
    - DOUBLE_PLANT
    - SPRUCE_FENCE
    - BIRCH_FENCE
    - JUNGLE_FENCE
    - DARK_OAK_FENCE
    - ACACIA_FENCE
    - PAINTING
    - SIGN
    - BED
    - ITEM_FRAME
    - FLOWER_POT_ITEM
    - SKULL_ITEM
    - ARMOR_STAND
    - BANNER
  redstone:
    slot: 2
    inventory:
      name: '&0Redstone'
      rows: 5
      usedSlots: 0-35
    item:
      name: 'Redstone'
      id: DIODE
    materials:
    - DISPENSER
    - NOTE_BLOCK
    - PISTON_BASE
    - PISTON_STICKY_BASE
    - TNT
    - LEVER
    - STONE_PLATE
    - WOOD_PLATE
    - REDSTONE_TORCH_ON
    - STONE_BUTTON
    - TRAP_DOOR
    - FENCE_GATE
    - REDSTONE_LAMP_OFF
    - TRIPWIRE_HOOK
    - WOOD_BUTTON
    - GOLD_PLATE
    - IRON_PLATE
    - DAYLIGHT_DETECTOR
    - REDSTONE_BLOCK
    - HOPPER
    - IRON_TRAPDOOR
    - SPRUCE_FENCE_GATE
    - BIRCH_FENCE_GATE
    - JUNGLE_FENCE_GATE
    - DARK_OAK_FENCE_GATE
    - ACACIA_FENCE_GATE
    - DROPPER
    - WOOD_DOOR
    - IRON_DOOR
    - REDSTONE
    - DIODE
    - REDSTONE_COMPARATOR
    - SPRUCE_DOOR_ITEM
    - BIRCH_DOOR
    - JUNGLE_DOOR_ITEM
    - ACACIA_DOOR_ITEM
    - DARK_OAK_DOOR_ITEM
    - RAILS
    - ACTIVATOR_RAIL
    - DETECTOR_RAIL
    - POWERED_RAIL
    - MINECART
    - SADDLE
    - BOAT
    - STORAGE_MINECART
    - HOPPER_MINECART
    - POWERED_MINECART
    - EXPLOSIVE_MINECART
    - CARROT_STICK
  materials:
    slot: 3
    inventory:
      name: '&0Materials'
      rows: 5
      usedSlots: 0-35
    item:
      name: 'Materials'
      id: STICK
    materials:
    - COAL
    - DIAMOND
    - IRON_INGOT
    - GOLD_INGOT
    - STICK
    - BOWL
    - STRING
    - FEATHER
    - SULPHUR
    - SEEDS
    - WHEAT
    - FLINT
    - LEATHER
    - CLAY_BRICK
    - CLAY_BALL
    - SUGAR_CANE
    - EGG
    - GLOWSTONE_DUST
    - INK_SACK
    - SUGAR
    - PUMPKIN_SEEDS
    - MELON_SEEDS
    - BLAZE_ROD
    - GOLD_NUGGET
    - NETHER_STALK
    - EMERALD
    - NETHER_STAR
    - NETHER_BRICK_ITEM
    - QUARTZ
    - PRISMARINE_SHARD
    - PRISMARINE_CRYSTALS
    - RABBIT_HIDE
  tools:
    slot: 4
    inventory:
      name: '&0Tools'
      rows: 5
      usedSlots: 0-35
    item:
      name: 'Tools'
      id: IRON_PICKAXE
    materials:
    - WOOD_AXE
    - WOOD_PICKAXE
    - WOOD_SPADE
    - WOOD_HOE
    - WOOD_SWORD
    - STONE_AXE
    - STONE_PICKAXE
    - STONE_SPADE
    - STONE_HOE
    - STONE_SWORD
    - GOLD_AXE
    - GOLD_PICKAXE
    - GOLD_SPADE
    - GOLD_HOE
    - GOLD_SWORD
    - IRON_AXE
    - IRON_PICKAXE
    - IRON_SPADE
    - IRON_HOE
    - IRON_SWORD
    - DIAMOND_AXE
    - DIAMOND_PICKAXE
    - DIAMOND_SPADE
    - DIAMOND_HOE
    - DIAMOND_SWORD
    - FLINT_AND_STEEL
    - COMPASS
    - FISHING_ROD
    - WATCH
    - SHEARS
    - LEASH
    - NAME_TAG
    - ENCHANTED_BOOK
    - BOW
    - ARROW
    - LEATHER_HELMET
    - LEATHER_CHESTPLATE
    - LEATHER_LEGGINGS
    - LEATHER_BOOTS
    - CHAINMAIL_HELMET
    - CHAINMAIL_CHESTPLATE
    - CHAINMAIL_LEGGINGS
    - CHAINMAIL_BOOTS
    - IRON_HELMET
    - IRON_CHESTPLATE
    - IRON_LEGGINGS
    - IRON_BOOTS
    - GOLD_HELMET
    - GOLD_CHESTPLATE
    - GOLD_LEGGINGS
    - GOLD_BOOTS
    - DIAMOND_HELMET
    - DIAMOND_CHESTPLATE
    - DIAMOND_LEGGINGS
    - DIAMOND_BOOTS
  food:
    slot: 5
    inventory:
      name: '&0Food'
      rows: 5
      usedSlots: 0-35
    item:
      name: 'Food'
      id: APPLE
    materials:
    - APPLE
    - MUSHROOM_SOUP
    - BREAD
    - PORK
    - GRILLED_PORK
    - GOLDEN_APPLE
    - RAW_FISH
    - COOKED_FISH
    - CAKE
    - COOKIE
    - MELON
    - RAW_BEEF
    - COOKED_BEEF
    - RAW_CHICKEN
    - COOKED_CHICKEN
    - ROTTEN_FLESH
    - SPIDER_EYE
    - CARROT_ITEM
    - POTATO_ITEM
    - BAKED_POTATO
    - PUMPKIN_PIE
    - RABBIT
    - COOKED_RABBIT
    - RABBIT_STEW
    - MUTTON
    - COOKED_MUTTON
  potion:
    slot: 6
    inventory:
      name: '&0Potion'
      rows: 5
      usedSlots: 0-35
    item:
      name: 'Potion'
      id: POTION
    materials:
    - POTION
    - GHAST_TEAR
    - GLASS_BOTTLE
    - FERMENTED_SPIDER_EYE
    - BLAZE_POWDER
    - MAGMA_CREAM
    - BREWING_STAND_ITEM
    - CAULDRON_ITEM
    - SPECKLED_MELON
    - GOLDEN_CARROT
    - RABBIT_FOOT

Required Vault and economy plugin!

Similar projects

Plugin →