Configuration

Work in progress!

With GiantShop 2.0 the configuration for GiantShop has changed quite a lot. No longer is it just a 27 line file, no longer is there by default any documentation included on what does what, and no longer is it so easy to understand that you need rocket science for it!
I admit, the new configuration file lacking documentary is not a totally good thing. This file is however not yet final, as GiantShop itself is not yet final either.

So why did the config file have to change you ask? Well for starters, the old file was quite primitive, and whilst I could work of the old file, even in that case, the changes would be so much, that the file wouldn't remain the same anyhow... The reason for this is due too the fact that GiantShop 2.0 is so feature packed it actually needs a lot more configuration options. So let's start of with explaining what does what shall we?

The base config

When you first start up GiantShop it will generate a configuration file for you. This file should be something as below.* And as you can see, might look a little confusing at first...

Default file

GiantShop:
    global:
        version: 0.8
        name: GiantShop
        debug: false
        perPage: 5
    Updater:
        checkForUpdates: true
        broadcast: true
    metrics:
        useMetrics: true
        send:
            database: true
            updater: true
            logging: true
            permEngine: true
            ecoEngine: true
            stock: true
            gsl: true
    log:
        useLogging: true
        log:
            sell: true
            buy: true
            gift: true
            add: true
            update: true
            remove: true
            apistockupdate: true
            apimaxstockupdate: true
            unknown: true
    broadcast:
        buy: true
        sell: false
        gift: true
    db:
        driver: SQLite
        database: GiantShop
        prefix: shop_
        host: localhost
        port: 3306
        user: root
        password: 
    permissions:
        usePermissions: true
        Engine: SPERM
        opHasPerms: true
    Economy:
        Engine: ICONOMY6
    discounts:
        useDiscounts: true
        affectsSales: true
    stock:
        useStock: true
        hideEmptyStock: false
        allowOverStock: false
        defaultMaxStock: 50
        stockDefinesCost: true
        maxInflation: 50
        maxDeflation: 25
        amountTillMaxInflation: 10
        amountTillMaxDeflation: 50
    Location:
        perPage: 5
        useGiantShopLocation: true
        showPlayerEnteredShop: true
        tool:
            id: 351
            type: 6
        protect:
            Worlds:
                disableOffList: true
                protected:
                - world1
                allowed:
                - world1
            Commands:
            - buy
            - gift
            - sell
            - list
            - check

* This file might differ as version progress!

The configuration file in sections

To make it a little easier to explain the config file, I will split it up in sections. And you will hopefully find out, that the config file is not even that hard to understand!

Global
The nodes that are listed under this config section, either have no better place, or are generic settings.

  • version
    • This node holds the current version of the configuration file. This version changes with new released when I have made edits to the default configuration file.
  • name
    • This node holds the value of what the shop shall be called in game. For example, if it were to be set to "Cookie Monster Shop", the in game name references to the shop will all call it "Cookie Monster Shop".
  • debug
    • If this node is set to true GiantShop will output more detailed errors to the console if one should occur.
  • perPage
    • This node holds the number of entries that GiantShop can show at once at for example the help page.
  • checkForUpdates
    • If this node is set to true GiantShop will automatically check for updates, and notify you as server admin, if one should be available. Currently in V0.7.x.BETA this is only shown in the console, but starting from V0.8 it will also be shown to ops when they login.

Updater
This sections holds all configuration options related to the update warnings in GiantShop.

  • checkForUpdates
    • If this is set to false, GiantShop will no longer check for newer versions.
  • broadcast
    • If this is set to false, GiantShop will no longer notify ingame operators.

Metrics
This section holds all configuration options related to the sending of data to Metrics.

  • useMetrics
    • If this node is set to false, GiantShop will not use Metrics. Please note that when you have used to global opt-out, that will still overrule the local setting in GiantShop.
  • send
    • This node actually has child nodes so I won't say much more then this is here to group certain other nodes.
  • send. database
    • If this node is set to false, GiantShop will no longer send any data about which database driver it uses to metrics
  • updater
    • If this node is set to false, GiantShop will no longer send any data about the update warning to metrics
  • logging
    • If this node is set to false, GiantShop will no longer send any data about the action logging to metrics
  • permEngine
    • If this node is set to false, GiantShop will no longer send any data about which permissions engine it uses to metrics
  • ecoEngine:
    • If this node is set to false, GiantShop will no longer send any data about which economy engine it uses to metrics
  • stock
    • If this node is set to false, GiantShop will no longer send any data about whether the item stock is used or not to metrics
  • gsl
    • If this node is set to false, GiantShop will no longer send any data about whether GSL is used or not to metrics

Logging
This sections holds all configuration options related to the logging of certain actions. For example the buying of items.

  • useLogging
    • When this node is set to false, the logging will be entirely disable.
  • log
    • This node actually has child nodes so I won't say much more then this is here to group certain other nodes.
  • log.sell
    • When this node is set to false, the logging of sell transaction will be disabled.
  • log.buy
    • When this node is set to false, the logging of buy transaction will be disabled.
  • log.gift
    • When this node is set to false, the logging of gift transaction will be disabled.
  • log.add
    • When this node is set to false, the logging of item additions to the shop will be disabled.
  • log.update
    • When this node is set to false, the logging of item updates in the shop will be disabled. Note: shop update command.
  • log.remove
    • When this node is set to false, the logging of item removals from the shop will be disabled completely.
  • log.apistockupdate
    • When this node is set to false, the logging of API calls related to the item stock of items will not be logged.
  • log.apimaxstockupdate
    • When this node is set to false, the logging of API calls related to the max stock of items will not be logged.
  • log.unknown
    • When this node is set to false, unknown events will not be logged.

Broadcasting
This configuration section handles the enabling or disabling of the server wide broadcasting of certain transactions.

  • buy
    • When this node is set to false, the broadcast that is shown when a player buys an item will not be shown.
  • sell
    • When this node is set to false, the broadcast that is shown when a player sell an item will not be shown.
  • gift
    • When this node is set to false, the broadcast that is shown when a player gifts an item will not be shown.

Database
This configuration section holds all the database settings required for GiantShop to work.

  • driver
    • This node holds the value of which database driver you wish to use. Currently there is support for 2 drivers SQLite and MySQL.
  • database
    • This node holds the name of the database that GiantShop should use.
  • prefix
    • This node holds the value that is prefixed to the table names. This is very useful if you have only 1 database for the entire server, as it allows you to differentiate tables with ease.

MySQL specific

  • host
    • This node holds the place where GiantShop should look for the database. This can be localhost, a domain or even an ip.
  • port
    • This node holds the port that GiantShop should contact the previously given host on to reach the MySQL server..
  • user
    • This node holds the user name that is used by GiantShop to access the MySQL database.
  • password
    • This node holds the password that is used by GiantShop to access the MySQL database.

Permissions
This configuration sections holds the nodes related to permissions.

  • usePermissions
    • If this node is set to false, permissions will be ignored, and OPs will have all permissions.
  • permissionEngine
    • This node holds the value for which permissions engine to use. Possible values would be:
      • SPERM
      • PERMISSIONSEX
      • BPERMISSIONS
      • ZPERMISSIONS
      • GROUP_MANAGER
  • opHasPerms
    • If this node is set to false, then ops will be handled as normal players. And will need each seperate permission.

Economy
This section holds currently only 1 node, which sets the economy engine used. Possible values would be:

  • AECO
  • CRAFTCONOMY
  • CURRENCYCORE
  • ESSENTIALS
  • MCMONEY
  • MINECONOMY
  • MULTICURRENCY
  • BOSE6
  • BOSE7
  • ICONOMY4
  • ICONOMY5
  • ICONOMY6

discounts
This section holds all the notes related to the discount system.

  • useDiscounts
    • If this node is set to false, GiantShop will no longer use discounts.
  • affectsSales
    • If this node is set to false, given discount won't affect the sales price.

Stock
This section holds all the nodes that relate to the use of item stocks.

  • useStock
    • This should be obvious enough.
  • hideEmptyStock
    • When this node is set to true, all items that have an empty stock will not be shown when the shop list command is used.
  • allowOverStock
    • When this node is set to true, the max stock will be ignored whilst keeping the ability to use inflation/deflation.
  • defaultMaxStock
    • This node holds the amount that is by default used as max stock for items if none was given.
  • stockDefinesCost
    • When this node is set to true, GiantShop will apply inflation and deflation over the item prices.
  • maxInflation
    • This node holds the maximum inflation percentage. Inflation occurs as the stock decreases, but is only counted at the start of the transaction. So if a user buys 10 diamonds that at the time are costing 500, the user will pay 5000.
  • maxDeflation
    • This node holds the maximum deflation percentage. Deflation occurs as the stock increases, but as with inflation, is only counted at the start of the transaction.
  • amountTillMaxInflation
    • This node holds the amount of items that need to be left in the shop for the max inflation percentage to be reached.
  • amountTillMaxDeflation
    • This node holds the amount of items that need to be in the shop for the max deflation percentage to be reached.

Location
The (currently) final section belongs to GiantShop Location and will be handled here.