XanderID / EconomyEnchant

a EconomyEnchant Shop in UI or GUI, With Many Features
MIT License
5 stars 5 forks source link

Incorrect usage of Capital #4

Closed SOF3 closed 2 years ago

SOF3 commented 2 years ago

I will send a pull request to fix these issues shortly.

XanderID commented 2 years ago

sorry if it's troublesome and Thank you SOF3 :)

SOF3 commented 2 years ago

I don't understand what's the point of the CapitalSelector class though. Why not jus tput it inside the capital provider class?

XanderID commented 2 years ago

I've tried and the Selector is always null on construct, Is it because every time I buy an enchant, it loads a new Provider? https://github.com/MulqiGaming64/EconomyEnchant/blob/ed83bf1dedd278c62df0e0ace2575951b750b144/src/MulqiGaming64/EconomyEnchant/EconomyEnchant.php#L686

SOF3 commented 2 years ago

I've tried and the Selector is always null on construct, Is it because every time I buy an enchant, it loads a new Provider?

https://github.com/MulqiGaming64/EconomyEnchant/blob/ed83bf1dedd278c62df0e0ace2575951b750b144/src/MulqiGaming64/EconomyEnchant/EconomyEnchant.php#L686

Capital::api() is not run immediately, but after Capital has verified all tables are correctly initialized. We only guarantee that it will run before your next call of Capital::api() runs.

XanderID commented 2 years ago

ok maybe later i will fix it better.

XanderID commented 2 years ago

I've moved it, thanks for the advice ^_^