scriptapi:modules:server:1.1.0:world

World

分類: クラス

マイクラのディメンションと環境を含むワールドの状態をラップしたクラスです。

メソッド

getAllPlayers

getAllPlayers(): Player[]

ワールド内のすべてのアクティブなプレイヤーの配列を返します。

返却値

Player[]

getDimension

getDimension(dimensionId: string): Dimension

ディメンションID(ディメンションタイプ)を指定してディメンションクラスのインスタンスを取得します。

パラメータ

返却値

getPlayers

getPlayers(options?: EntityQueryOptions): Player[]

EntityQueryOptionsをフィルタ条件にしてプレイヤーを取得します。

optionsを指定しない場合は全てのアクティブなプレイヤーを取得します。

パラメータ

返却値

Player[]

sendMessage

sendMessage(message: (RawMessage | string)[] | RawMessage | string): void

すべてのプレイヤーにメッセージを送信します。

RawMessageの形式が正しくない場合は例外を投げます。

パラメータ

  • message
    • 表示するメッセージ
scriptapi/modules/server/1.1.0/world.txt · 最終更新: 2023/07/03 18:57 by potchie

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki