mdkjs
Version:
mdk is a framework for developing Datapacks for Minecraft. It uses the typescript language.
47 lines (46 loc) • 1.56 kB
TypeScript
import { Selector, TextToken, Criteria, LiteralType, ContextAbstract } from "../../../mdk-core/src";
export declare type ObjectiveProps = {
name: string;
criterion: Criteria;
displayName?: string;
};
export declare class Objective extends ContextAbstract {
/**
* **commands** /scoreboard objectives list
*/
static list(): void;
/**
* **commands** /scoreboard objectives remove
*/
static remove(objective: LiteralType<Objective>): void;
static setdisplay(slot: string, objective?: LiteralType<Objective>): void;
static modify(objective: LiteralType<Objective>, displayName: LiteralType<TextToken[]>): void;
/** * 查询积分项 */
static query(objective: string): Objective;
/** * 添加此积分项 */
static add(objective: string): void;
constructor(props: LiteralType<ObjectiveProps>, sel?: Selector);
get name(): string;
get criterion(): Criteria;
get displayName(): string;
get selector(): Selector;
private operation;
/** += */
add(...sources: Objective[]): this;
/** -= */
remove(...sources: Objective[]): this;
/** *= */
multiple(...sources: Objective[]): this;
/** /= */
divide(...sources: Objective[]): this;
/** %= */
mod(...sources: Objective[]): this;
/** < */
min(...sources: Objective[]): this;
/** > */
max(...sources: Objective[]): this;
/** >< */
swap(...sources: Objective[]): this;
toString(exacted?: boolean): string;
}