-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
final class Main extends PluginBase implements Listener {
public function onEnable() : void {
$this->getServer()->getPluginManager()->registerEvents($this, $this);
InfoAPI::addMapping(
$this, "myplugin.money",
fn(Player $player) : int => 123,
);
}
public function onChat(PlayerJoinEvent $event) : void {
$event->setJoinMessage(InfoAPI::render(
$this, '{yellow}{player} {white}joined the server in world {aqua}"{player money}".',
["player" => $event->getPlayer()],
));
}
}
Metadata
Metadata
Assignees
Labels
No labels