플레이어는 entity 함수도 사용할 수 있습니다. 타입은 ObjectValue<Player>입니다.
| Name | Description | Usage | Server Only |
|---|---|---|---|
username(): String | 플레이어의 이름을 반환합니다. | q.player.username() | |
uuid(): String | 플레이어의 UUID를 반환합니다. | q.player.uuid() | |
main_held_item(): ObjectValue<Item> | 플레이어의 주 손에 든 Item 객체를 반환합니다. | q.player.main_held_item() | |
off_held_item(): ObjectValue<Item> | 플레이어의 보조 손에 있는 Item 객체를 반환합니다. | q.player.off_held_item() | |
face(isLeftSide: Boolean?): ObjectValue<PlayerDialogueFaceProvider> | [PlayerDialogueFaceProvider]의 ObjectValue를 반환합니다. isLeftSide의 기본값은 true입니다. | q.player.face() | |
swing_hand() | Swings the 플레이어’s hand. | q.player.swing_hand() | |
food_level(): Double | 플레이어의 허기 레벨을 반환합니다. | q.player.food_level() | |
saturation_level(): Double | 플레이어의 포만감 레벨을 반환합니다. | q.player.saturation_level() | |
tell(message: String, overlay: Boolean?) | 플레이어의 채팅에 메시지를 표시합니다. overlay가 true이면 오버레이로 표시합니다. | q.player.tell('Hello world!') | |
teleport(x: Double, y: Double, z: Double, playParticleOptions: Boolean?) | 플레이어를 x, y, z로 순간이동시킵니다. playParticleOptionss가 true이면 파티클을 표시합니다. | q.player.teleport(0,0,0) | |
heal(amount: Double?) | 플레이어를 amount만큼 회복합니다. 지정하지 않으면 최대 체력까지 회복합니다. | q.player.heal(5) | Yes |
environment(): MoLangEnvironment | 이 플레이어에 대한 쿼리가 ObjectValue<Player>로 설정된 MoLang 환경을 반환합니다. | q.player.environment() | Yes |
is_player(): Double | 1.0을 반환합니다. | p.player.is_player() | Yes |
run_command(command: String) | Runs a 명령어 as the 플레이어. | run_command('/say Hello World!') | Yes |
is_party_at_full_health(): Double | 회복할 수 있는 포켓몬이 없는지, 즉 모두 최대 체력인지 반환합니다. | q.player.is_party_at_full_health() | Yes |
can_heal_at_healer(position: ArrayStruct<Int>): Double | 해당 블록이 회복 장치이 아니거나 회복 장치이 플레이어의 파티를 회복할 수 없으면 0.0을 반환합니다. 그렇지 않으면 1.0을 반환합니다. | q.player.can_heal_at_healer(v.location) | Yes |
put_pokemon_in_healer(position: ArrayStruct<Int>): Double | 지정한 회복 장치에서 파티의 모든 포켓몬을 치료하려고 시도합니다. 해당 블록이 회복 장치이 아니거나 파티를 치료할 수 없으면 0.0을 반환하고, 그 외에는 1.0을 반환합니다. | q.party.put_pokemon_in_healer(v.location) | Yes |
party(): ObjectValue<PartyStore> | 플레이어의 파티 저장소 구조체를 반환합니다. | q.player.party() | Yes |
pc(): ObjectValue<PCStore> | 플레이어의 PC 저장소 구조체를 반환합니다. | q.player.pc() | Yes |
has_permission(permission: String, level: Int?) | 플레이어가 지정한 level에서 이 권한을 가지고 있으면 1.0, 그렇지 않으면 0.0을 반환합니다. level의 기본값은 4입니다. | q.player.has_permission('command.pc') | Yes |
data(): VariableStruct | 해당 플레이어 UUID에 대한 Cobblemon Molang 저장소의 VariableStruct를 반환합니다. | q.player.data() | Yes |
save_data() | 해당 플레이어 UUID의 Cobblemon Molang 저장소에 저장합니다. | q.player.save_data() | Yes |
in_battle(): Double | 1.0을 반환합니다: the 플레이어 is in 배틀, 그렇지 않으면 0.0을 반환합니다. | q.player.in_battle() | Yes |
battle(): MoValue | 배틀 중이면 구조체(CHECK TYPE)를 반환하고, 그렇지 않으면 0.0을 반환합니다. | q.player.battle() | Yes |
get_npc_data(npc: MoValue): VariableStruct | 플레이어의 MoLang 저장소에서 NPC 데이터를 가져옵니다. npc는 NPC의 UUID 또는 ObjectValue<NPCEntity>일 수 있습니다. | q.player.get_npc_data(q.npc) | Yes |
get_npc_variable(npc: MoValue, variable: String): MoValue | 플레이어의 MoLang 저장소에 있는 NPC 데이터에서 변수를 가져옵니다. npc는 NPC의 UUID 또는 ObjectValue<NPCEntity>일 수 있으며, variable은 문자열 키입니다. 키가 NPC 데이터에 없거나 변수가 null이면 0.0을 반환합니다. | q.player.get_npc_data(q.npc, 'fight_count') | Yes |
set_npc_data(npc: MoValue, variable: String, value: MoValue, saveAfterwards: Boolean?): DoubleValue | 플레이어의 MoLang 저장소에 있는 NPC 데이터의 변수를 설정합니다. npc는 NPC의 UUID 또는 ObjectValue<NPCEntity>일 수 있습니다. variable은 키로, value는 값으로 사용됩니다. saveAfterwards의 기본값은 true입니다. 1.0을 반환합니다. | q.player.set_npc_data(q.npc, 'fight_count', 1) | Yes |
pokedex(): ObjectValue<AbstractPokedexManager> | 플레이어의 포켓몬 도감에 대한 ObjectValue<AbstractPokedexManager>를 반환합니다. | q.player.pokedex() | Yes |