################################################################################ # # # Configurations # # # # These are the default configurations. They will be used to build the user # # level config files on first run. Each parent node defines the file type and # # the child nodes that follow are the configurations for that config file type.# # # #______________________________________________________________________________# # # #__________DO_NOT_EDIT_THIS_FILE___EVERYTHING_IS_CONFIGURABLE_IN_GAME__________# # # #______________________________________________________________________________# 'WGRegionMarketConfigurations': type: task debug: false # Where you save this script file scriptPath: 'scripts/Network/Utilities/WGRegionInfo.yml' # ------ The main config file ------ # config: # Version Number DONT TOUCH version: 0.1 # Price per block when claiming a region BlockPrice: 0.5 # Percent of BlockPrice to refund when removing a region Refund: 80 # Remove region from market list when occupied RemoveFromList: - sell - lease - rent # Can players extend rent region CanExtend: true # Number of times a rental can be extended. -1 for infinite MaxRentExtend: -1 # Amount of time the player can extend their rent in advance. MaxRentExtendDuration: 30d # Tell Player his lease renewed ShowLeaseRenewMessage: true # Time before rent expires to remind player ShowRentExpireWarning: 20 # Rollback region on lease or rent termination RollbackOnExpire: - let - rent # ------ # ------ The limits config file ------ # limits: global: rent: -1 lease: -1 buy: -1 sell: -1 worlds: world: rent: -1 lease: -1 buy: -1 sell: -1 groups: default: global: rent: -1 lease: -1 buy: -1 sell: -1 worlds: world: rent: -1 lease: -1 buy: -1 sell: -1 # ------ ################################################################################ # # WorldGuard Region Market Config Helper # # # This script tells the s@ConfigFileGenerator which files to generate based on # the configs above. # "WGRegionMarketConfigHelper": type: task debug: true script: - ^define scriptPath '' - ^define readID 'WGRegionMarket' - ^yaml 'load:' 'id:%readID%' - ^define keylist '' - foreach { - define node - if ! { - narrate "<&a>Generating default %node%.yml file..." - define path 'WGRegionMarketConfigurations.%node%' - define writeID 'WGRegionMarket_%node%' - yaml create 'id:%writeID%' - inject s@ConfigFileGenerator - narrate "<&b>Done!" - yaml savefile:Plots/%node%.yml 'id:%writeID%' - yaml unload 'id:%writeID%' } else narrate "<&a>%node%.yml already exists!" } - narrate "<&6>Done!" - yaml unload 'id:%readID%' ################################################################################ # # Configuration File Generator # # # This script generates default config files based on the definitions passed to # it. It should be flexible enough to handle any script. # # - run s@ConfigFileGenerator def:%readID%|%writeID%|%path% # 'ConfigFileGenerator': type: task debug: true definitions: readID|writeID|path script: - ^define keylist '' - if { - narrate "<&a>keylist<&co> <&b>%keylist%" } - ^if { - define entry '' - if { - narrate "<&a>entry<&co> <&b>%entry%" } - if ! { - foreach { - if { - narrate "<&a>%path%.%entry%<&co> <&b>%value%" } else yaml set '%path%.%entry%':->: 'id:%writeID%' } } else { - define entry '' - if { - narrate "<&a>%path%.%entry%<&co> <&c>EMPTY" } else yaml 'write:%path%.%entry%' 'id:%writeID%' } } else { - foreach { - define key '' - define path '%path%.%key%' - inject s@ConfigFileGenerator } } # ################################################################################ "WGRegionMarketCommandHandler": type: world debug: false events: on wgrminit command: - define dryrun true - inject s@WGRegionMarketConfigHelper - inject s@FinishCommand