Closed Shock95 closed 3 years ago
/ah about returns undefined getPlugin()
Works fine for me, did you download the plugin from the releases tab?
i did, but i had to decompile it to work it with my economy plugin because it’s not economyS
You can always use AuctionHouse::setEconomyProvider()
to implement your own economy system, running the plugin from source isn't recommended
use pocketmine\plugin\PluginBase;
use shock95x\auctionhouse\AuctionHouse;
use shock95x\economy\economy\ExampleProvider;
class MainClass extends PluginBase {
public function onEnable() : void {
if($this->getServer()->getPluginManager()->getPlugin("AuctionHouse") != null) {
$plugin = $this->getServer()->getPluginManager()->getPlugin("AuctionHouse");
if($plugin instanceof AuctionHouse) {
$plugin->setEconomyProvider(new ExampleProvider());
$this->getLogger()->info(get_class($plugin->getEconomyProvider())); //outputs current economy provider
}
}
}
}
use shock95x\auctionhouse\economy\EconomyProvider;
class ExampleProvider implements EconomyProvider {
public function addMoney($player, int $amount): void {
// implement
}
public function subtractMoney($player, int $amount): void {
// implement
}
public function getMoney($player): int{
// implement
}
public function getMonetaryUnit(): string {
// implement
}
}
/ah expired
command/ah listings [player]