forked from JaylyDev/ScriptAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
23 lines (23 loc) · 783 Bytes
/
index.d.ts
File metadata and controls
23 lines (23 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import * as mc from "@minecraft/server";
import { ActionFormData, MessageFormData, ModalFormData } from "@minecraft/server-ui";
type FormResult = <formType extends ModalFormData | MessageFormData | ActionFormData, formResponse extends Awaited<ReturnType<formType["show"]>>>(form: formType, callback: (response: formResponse) => void) => void;
interface PlayerExtra extends mc.Player {
/**
* Get player GameMode
*/
getGameMode(): string;
/**
* Kick the player from the server
*/
kick(reason: string): void;
/**
* Get player score from an objective
*/
getScore(objectiveId: string): number;
/**
* Show UI forms
*/
showForm: FormResult;
}
export default function Player(player: mc.Player): PlayerExtra;
export {};