Add volume variable and event changes

Thijs Wiefferink 2017-10-16 16:25:29 +02:00
parent 5f04833e56
commit d4c66c39b0

@ -3,11 +3,13 @@
* Add setting to disable cross-world teleports for the `/as tp` command: `teleportCrossWorld` in the `general` section of `default.yml`. * Add setting to disable cross-world teleports for the `/as tp` command: `teleportCrossWorld` in the `general` section of `default.yml`.
* Add setting to disable cross-world teleports for the `/as find` command: `findCrossWorld` in the `general` section of `default.yml`. * Add setting to disable cross-world teleports for the `/as find` command: `findCrossWorld` in the `general` section of `default.yml`.
* Allow `price` and `moneyBack` values to be calculated dynamically: * Allow `price` and `moneyBack` values to be calculated dynamically:
* All region variables can be used: `price: "5*%width%*%depth%*%height%"` would be `$5` per cubic meter (block in the region). * All region variables can be used: `price: "5*%volume%"` would be `$5` per cubic meter (block in the region).
* Full JavaScript expressions and code can be used, the last statement will be the resulting price. * Full JavaScript expressions and code can be used, the last statement will be the resulting price.
* Add `%volume%` variable for the number of blocks in a region, which supports polygon regions correctly.
* `/as stack` now allows the usage of `#` to choose the position of the number in the region name. * `/as stack` now allows the usage of `#` to choose the position of the number in the region name.
**Technical:** **Technical:**
* BREAKING: `BuyingRegionEvent`, `RentingRegionEvent` and `ResellingRegionEvent` now use `OfflinePlayer` instead of `Player`, because renting/buying/reselling is now also possible while the player is offline.
* Improved file loading mechanics * Improved file loading mechanics
* Moved the messaging library to its own project: [InteractiveMessenger](https://github.com/NLthijs48/InteractiveMessenger) * Moved the messaging library to its own project: [InteractiveMessenger](https://github.com/NLthijs48/InteractiveMessenger)
* Added a lot of automated tests to ensure all functionality keeps working * Added a lot of automated tests to ensure all functionality keeps working