-
Notifications
You must be signed in to change notification settings - Fork 8
Omegga Player API
Kind: global class
-
Player
- new Player(omegga, name, id, controller, state)
-
instance
-
.getOmegga() ⇒
Omegga
-
.clone() ⇒
Player
-
.raw() ⇒
Array.<String>
-
.isHost() ⇒
Boolean
- .clearBricks(quiet)
-
.getRoles() ⇒
Array.<String>
-
.getPermissions() ⇒
Object
-
.getNameColor() ⇒
String
-
.getPosition() ⇒
Promise.<List.<Number>>
-
.getGhostBrick() ⇒
Promise.<Object>
-
.getPaint() ⇒
Promise.<Object>
-
.getTemplateBounds() ⇒
Promise.<Object>
-
.getTemplateBoundsData() ⇒
Promise.<SaveData>
-
.loadDataAtGhostBrick(saveData) ⇒
Promise
-
.getOmegga() ⇒
-
static
-
.getRoles(omegga, id) ⇒
Array.<String>
-
.getPermissions(omegga, id) ⇒
Object
-
.getRoles(omegga, id) ⇒
players are not to be constructed
Param | Type | Description |
---|---|---|
omegga | Omegga |
Omegga Instance |
name | String |
Player Name |
id | String |
Player Id |
controller | String |
Player Controller |
state | String |
Player State |
Returns omegga
Kind: instance method of Player
player.clone() ⇒ Player
Clone a player
Kind: instance method of Player
Get raw player info (to feed into a constructor)
Kind: instance method of Player
true if the player is the host
Kind: instance method of Player
clear this player's bricks
Kind: instance method of Player
Param | Type | Default | Description |
---|---|---|---|
quiet | Boolean |
false |
quiet mode |
get a player's roles, if any
Kind: instance method of Player
get a player's permissions in a map like {"Bricks.ClearOwn": true, ...}
Kind: instance method of Player
Returns: Object
- - permissions map
get player's name color
Kind: instance method of Player
Returns: String
- - 6 character hex string
get player's position
Kind: instance method of Player
Returns: Promise.<List.<Number>>
- - [x, y, z] coordinates
gets a user's ghost brick info (by uuid, name, controller, or player object)
Kind: instance method of Player
Returns: Promise.<Object>
- - ghost brick data
gets a user's paint tool properties
Kind: instance method of Player
Returns: Promise.<Object>
- - paint data
gets the bounds of the template in the user's clipboard (bounds of original selection box)
Kind: instance method of Player
Returns: Promise.<Object>
- - template bounds
get bricks inside template bounds
Kind: instance method of Player
Returns: Promise.<SaveData>
- - BRS JS Save Data
load bricks at ghost brick location
Kind: instance method of Player
Returns: Promise
- - BRS JS Save Data
Param | Type | Description |
---|---|---|
saveData | SaveData |
player or player identifier |
Number |
save load X offset | |
Number |
save load Y offset | |
Number |
save load Z offset | |
Boolean |
quiet mode |
get a player's roles, if any
Kind: static method of Player
Returns: Array.<String>
- - list of roles
Param | Type | Description |
---|---|---|
omegga | Omegga |
omegga instance |
id | String |
player uuid |
get a player's permissions in a map like {"Bricks.ClearOwn": true, ...}
Kind: static method of Player
Returns: Object
- - permissions map
Param | Type | Description |
---|---|---|
omegga | Omegga |
Omegga instance |
id | String |
player uuid |