Tr-Seller

This project is abandoned and its default file will likely not work with the most recent version of Minecraft. Whether this project is out of date or its author has marked it as abandoned, this project is no longer maintained.

 
Tr-Seller is a plugin to create shop in your server.
 
Feature:
  • Buy/sell item
  • Customise the name of item
  • Customise the description of the item
  • Support enchantment, eggs, custom banner..
  • Custom Messages
Dependency :
 
Create a shop:
  • Type /seller manageShop <type> to create the file and add item to he shop
  • Type /npc create <type> --trait tr-seller to create an seller NPC
  • Modify the config file of your NPC and type /seller updateAllShops
  • Enjoy! :D
 
Command:
  • /seller reload - to reload the config file
  • /seller manageShop <type> - Add or modify a shop and create his file.
  • /seller removeShop <type> - Remove a type of seller and remove this file.
  • /seller typeList - List your npc type.
  • /seller updateAllShops - Reload the NPC inventory from the file
 
Permission:
  • seller.admin -> allow the acces of all commands

Screen:

NPC:

NPC

 Item description: 

example of item description

 Shop example:

Shop example


Config and examples:
config.yml:
version: 0.2
Settings:
  log_transactions: false
Complement:
  seller_name: Seller
Msg:
  default:
    prefix: '&9[&3r-Seller&9]> &2'
    error: '&9[&4tr-Seller&9]> &c'
    no_permission: '&4ERROR &9&l> &r&bYou don''t have permission to do that!'
    command_use: '&9[&4tr-Seller&9]> &r&cCommand use: &6$command'
sellerInteract:
    noShop: "The seller have a problem or is closed"
  sellerInventory:
    buy_price: Buying price
    seller_price: Selling price
    left_click: Left click
    right_click: Right click
    shift_click: Shift+click
    buy_item: buy $nbr items
    leave_the_shop: Leave the shop
    next_page_of_shop: "Next page"
    previous_page_of_shop: "Previous page"
    buy_unavailable_inventory: "&3You can't buy this item"
    sell_unavailable_inventory: "&3You can't sell this item"
  transaction:
    success_buy:
    - '&a===================================================='
    - '&3You spend &6$moneySpent $moneyType for &6$amountItem $itemType'
    - '&3You have now $currentMoney'
    - '&a===================================================='
    failure_buy_no_enought_money:
    - '&a===================================================='
    - '&3You don''t have enough, You need&6 $moneyMissing $moneyType more'
    - '&3for $amount of &6$itemType'
    - '&a===================================================='
    buy_unavailable:
    - '&a===================================================='
    - '&3You can''t buy this item'
    - '&a===================================================='
    success_sell:
    - '&a===================================================='
    - '&3You have earned &6$moneySpent $moneyType for &6$amountItem $itemType'
    - '&3You have now $currentMoney'
    - '&a===================================================='
    failure_sell_no_item:
    - '&a===================================================='
    - '&3You can''t sell this item'
    - '&a===================================================='
    sell_unavailable:
    - '&a===================================================='
    - '&3You can''t sell this item'
    - '&a===================================================='

 example of shop:

version: '1.0'
page:
  '1':
    item:
      '0':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: CARPET
          damage: 2
        buy: 100
        sell: 10
      '1':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: CARPET
          damage: 3
        buy: 100
        sell: 10
      '9':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: MONSTER_EGG
          meta:
            ==: ItemMeta
            meta-type: SPAWN_EGG
            internal: H4sIAAAAAAAAAONiYOBi4HTNK8ksqQxJTOdgYMpMYeDPzcxLTS5KTCuxKi4pSqxkYAAAy5jlZycAAAA=
            id: stray
        buy: 5000
        sell: UNDEFINED
      '10':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: MONSTER_EGG
          meta:
            ==: ItemMeta
            meta-type: SPAWN_EGG
            internal: H4sIAAAAAAAAAONiYOBi4HTNK8ksqQxJTOdgYMpMYRDPzcxLTS5KTCuxqsrPTcpMjS/ITM9NzGNgAACmvRWELwAAAA==
            id: zombie_pigman
        buy: 5000
        sell: UNDEFINED
      '18':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: ENCHANTED_BOOK
          meta:
            ==: ItemMeta
            meta-type: ENCHANTED
            stored-enchants:
              MENDING: 1
        buy: 1000
        sell: UNDEFINED
      '19':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: ENCHANTED_BOOK
          meta:
            ==: ItemMeta
            meta-type: ENCHANTED
            stored-enchants:
              VANISHING_CURSE: 1
        buy: 1000
        sell: UNDEFINED
      '20':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: ENCHANTED_BOOK
          meta:
            ==: ItemMeta
            meta-type: ENCHANTED
            stored-enchants:
              KNOCKBACK: 2
        buy: 1000
        sell: UNDEFINED
      '27':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: DIAMOND_SWORD
          meta:
            ==: ItemMeta
            meta-type: UNSPECIFIC
            enchants:
              DAMAGE_ALL: 5
              DURABILITY: 3
              FIRE_ASPECT: 2
              MENDING: 1
            repair-cost: 15
        buy: 10000
        sell: UNDEFINED
      '36':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: BANNER
          damage: 13
        buy: 200
        sell: 100
      '37':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: BANNER
          damage: 14
        buy: 200
        sell: 100
      '6':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: POTION
          meta:
            ==: ItemMeta
            meta-type: POTION
            potion-type: minecraft:long_regeneration
        buy: 300
        sell: 50
      '7':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: POTION
          meta:
            ==: ItemMeta
            meta-type: POTION
            potion-type: minecraft:night_vision
        buy: 300
        sell: 50
      '8':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: POTION
          meta:
            ==: ItemMeta
            meta-type: POTION
            potion-type: minecraft:water_breathing
        buy: 300
        sell: 50
      '16':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: SPLASH_POTION
          meta:
            ==: ItemMeta
            meta-type: POTION
            potion-type: minecraft:swiftness
        buy: 300
        sell: 50
      '17':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: SPLASH_POTION
          meta:
            ==: ItemMeta
            meta-type: POTION
            potion-type: minecraft:strong_regeneration
        buy: 300
        sell: 50
      '25':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: LINGERING_POTION
          meta:
            ==: ItemMeta
            meta-type: POTION
            potion-type: minecraft:strong_harming
        buy: 300
        sell: 50
      '26':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: LINGERING_POTION
          meta:
            ==: ItemMeta
            meta-type: POTION
            potion-type: minecraft:long_fire_resistance
        buy: 300
        sell: 50
      '22':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: BANNER
          damage: 14
          meta:
            ==: ItemMeta
            meta-type: BANNER
            display-name: The Master Banner
            lore:
            - An incredible banner with great power
            enchants:
              DAMAGE_ALL: 10
              DURABILITY: 3
              FIRE_ASPECT: 2
              MENDING: 1
            patterns:
            - ==: Pattern
              color: RED
              pattern: br
            - ==: Pattern
              color: RED
              pattern: tl
        buy: 10000
        sell: UNDEFINED
  '2':
    item:
      '22':
        itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: NAME_TAG
        buy: 900
        sell: 10

 

 Example of item with attributes:

itemStack:
          ==: org.bukkit.inventory.ItemStack
          type: BANNER
          damage: 14
          meta:
            ==: ItemMeta
            meta-type: BANNER
            display-name: The Master Banner
            lore:
            - An incredible banner with great power
            enchants:
              DAMAGE_ALL: 10
              DURABILITY: 3
              FIRE_ASPECT: 2
              MENDING: 1
            patterns:
            - ==: Pattern
              color: RED
              pattern: br
            - ==: Pattern
              color: RED
              pattern: tl

 

 Futur update:

  • Add Api and log for transaction


Servers that use this plugin:
Your ?

 

Source code:

logo github


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files