ea9934f315
- 添加jsdoc注释和d.ts补全文件 - 修改getBlockRuntimeId接口,使其支持填写特殊值 - 添加getBlockLightEmission,getGameRules,applyEnchant,removeEnchants,hasEnchant,getEnchantLevel,getEnchantNameAndLevel接口 - 导出事件onEntityChangeDimAfter,DragonRespawn,ProjectileTryCreate,ProjectileCreate
68 lines
1.6 KiB
TypeScript
68 lines
1.6 KiB
TypeScript
declare class PAPI {
|
|
/** 注册一个玩家PAPI变量 */
|
|
static registerPlayerPlaceholder(
|
|
/** PAPI调用函数 */
|
|
func: (
|
|
/** 玩家对象 */
|
|
player: Player
|
|
) => string,
|
|
/** 插件名字 */
|
|
pluginsName: string,
|
|
/** PAPI变量 */
|
|
PAPIName: string
|
|
): boolean;
|
|
|
|
/** 注册一个服务器PAPI变量 */
|
|
static registerServerPlaceholder(
|
|
/** PAPI调用函数 */
|
|
func: () => string,
|
|
/** 插件名字 */
|
|
pluginsName: string,
|
|
/** PAPI变量 */
|
|
PAPIName: string
|
|
): boolean;
|
|
|
|
/** 注册一个静态PAPI变量 */
|
|
static registerStaticPlaceholder(
|
|
/** PAPI调用函数 */
|
|
func: () => string,
|
|
/** 插件名字 */
|
|
pluginsName: string,
|
|
/** PAPI变量 */
|
|
PAPIName: string,
|
|
/** 更新时间 */
|
|
UpdateInterval: number
|
|
): boolean;
|
|
|
|
/** 获取一个服务器变量的值 */
|
|
static getValue(
|
|
/** PAPI名 */
|
|
key: string
|
|
): string;
|
|
|
|
/** 获取一个玩家变量的值 */
|
|
static getValueByPlayer(
|
|
/** PAPI名 */
|
|
key: string,
|
|
/** 玩家对象 */
|
|
pl: Player
|
|
): string;
|
|
|
|
/** 翻译带PAPI变量的字符串 */
|
|
static translateString(
|
|
/** 要翻译的字符串 */
|
|
str: string,
|
|
/** 玩家对象 */
|
|
pl: Player | undefined
|
|
): string;
|
|
|
|
/** 注销一个PAPI变量 */
|
|
static unRegisterPlaceholder(
|
|
/** PAPI名 */
|
|
str: string
|
|
): boolean;
|
|
|
|
/** 获取所有已注册的PAPI变量 */
|
|
static getAllPAPI(): string[];
|
|
}
|