Comments (1)
This code seems to be working just fine. (using the new API)
public function onPlayerJoin(PlayerJoinEvent $event): void
{
$player = $event->getPlayer();
BedrockEconomyAPI::beta()->get($player->getName())
->onCompletion(
function (int $balance) use ($player): void {
$player->getInventory()->setItemInHand(VanillaItems::WRITABLE_BOOK()->setCustomName("§r§7My Info§f\nBalance§7: §2$ §f" . $balance));
},
function () use ($player): void {
$player->sendMessage("§cSomething went wrong while loading your balance");
}
);
}
from bedrockeconomy.
Related Issues (20)
- crash error on enable HOT 1
- Composer package HOT 1
- CPU HOT 23
- How to add check money HOT 1
- Plugin Not working as intended HOT 4
- Crash, fix please HOT 1
- Change language HOT 2
- $currencyManager being accessed before initialization. HOT 2
- Error
- Class cooldogedev\BedrockEconomy\command\BalanceCommand contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (CortexPE\Commando\IRunnable::getPermission)
- Error that appears when paying players who are offline HOT 1
- Balance becomes negative when using CLOSURE()->subtract HOT 7
- XBOX problem if the server uses WaterdogPE HOT 1
- Error HOT 1
- Error
- Commands dont register properly HOT 11
- The plugin crashes my server :( HOT 1
- If transaction takes balance <0, bedrock eco gets mad? HOT 1
- getAPI got removed? HOT 1
- BedrockEconomy requires xbox authentication. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bedrockeconomy.