BedrockEconomyAPI::getInstance()->getHighestBalances(
limit: 10,
context: ClosureContext::create(
function (?array$accounts) use ($sender, $offset): void {
if (!$accounts) {
var_dump("The table is empty.");
return;
}
foreach ($accountsas$account) {
var_dump($account["username"] . ": " . $account["balance"]);
}
}
),
/** * Offset is used to skip the first n * limited results. * By default is set to 0 to retrieve the top n results starting from 0 */
offset: 1,
);
Addons
/** * The name of the addon, must be unique. * * @return string */publicfunction getName(): string;
/** * The version of the addon. * * @return string */publicfunction getVersion(): string;
/** * The minimum supported version of BedrockEconomy. * If the version is @link Addon::SUPPORTED_BEDROCK_VERSION_ALL, the addon will be enabled on all BedrockEconomy versions. * * @return string */publicfunction getMinimumSupportedBedrockEconomyVersion(): string;
/** * Called before a plugin is enabled, this should be only used for dependency checking. * * @return bool */publicfunction isLoadable(): bool;
/** * Returns whether the addon is enabled or not. * * @return bool */publicfunction isEnabled(): bool;
/** * Called when the plugin is enabled. Similar to @link PluginBase::onEnable() * Should be used for listeners registration and such logic. */publicfunction onEnable(): bool;
/** * Called when the addon is disabled. Similar to @link PluginBase::onDisable() */publicfunction onDisable(): bool;
Events
Name
Description
TransactionSubmitEvent
Called right before a transaction is submitted to the database