onebone / EconomyS

The economy plugin for PocketMine-MP
GNU General Public License v3.0
144 stars 191 forks source link

Add "OldMoney" Value into MoneyChangedEvent #443

Closed Thunder33345 closed 4 years ago

Thunder33345 commented 4 years ago

This is so developers can get create a differences of a change

onebone commented 4 years ago

Refer to https://github.com/onebone/EconomyS/blob/3.x/EconomyAPI/src/onebone/economyapi/EconomyAPI.php#L448-L451, https://github.com/onebone/EconomyS/blob/3.x/EconomyAPI/src/onebone/economyapi/EconomyAPI.php#L519-L522, https://github.com/onebone/EconomyS/blob/3.x/EconomyAPI/src/onebone/economyapi/EconomyAPI.php#L591-L594 and you will see getMoney() in MoneyChangedEvent returns old money value. New value could be got with 'myMoney()'. I will add documentation to the method to avoid future confusion.