UNPKG

@ccms/api

Version:

MiaoScript api package

108 lines 4.87 kB
/// <reference types="@javatypes/jdk" /> import { channel } from './channel'; export declare namespace proxy { namespace bungeecord { class SubChannelBuilder { private channel; private player; private params; constructor(channel: channel.Channel, player: any); connect(server: string): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; connectOther(player: string, server: string): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; ip(): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; ipOther(player: string): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; playerCount(server: string | "ALL"): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; /** * Get a list of players connected on a certain server, or on ALL the servers. * @param server count server * Response: * String server = in.readUTF(); // The name of the server you got the player list of, as given in args. * String[] playerList = in.readUTF().split(", "); */ playerList(server: string | "ALL"): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; /** * Get a list of server name strings, as defined in BungeeCord's config.yml * Response: * String[] serverList = in.readUTF().split(", "); */ getServers(): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; /** * Get this server's name, as defined in BungeeCord's config.yml */ getServer(): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; broadcast(message: string): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; /** * Send a message (as in, a chat message) to the specified player. * @param player who reciver message * @param message message content */ message(player: string | "ALL", message: string): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; /** * Send a raw message (as in, a chat message) to the specified player. The advantage of this method over Message is that you can include click events and hover events. * @param player who reciver message * @param message message content */ messageRaw(player: string | "ALL", json: string): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; forwardAll(channel: string, data: any): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; /** * Send a custom plugin message to said server. This is one of the most useful channels ever. * Remember, the sending and receiving server(s) need to have a player online. * @param server reciver * @param channel channelName * @param data data */ forward(server: string | "ALL", channel: string, data: any): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; /** * Send a custom plugin message to said server. This is one of the most useful channels ever. * Remember, the sending and receiving server(s) need to have a player online. * @param server reciver * @param channel channelName * @param data data */ forwardToPlayer(server: string | "ALL", channel: string, data: any): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; generic(...args: string[]): { send: (...middlewares: ((out: java.io.DataOutputStream) => void)[]) => any; }; private send; private finalSend; } } export class BungeeCord { private channel; /** * 获得代理 * @param player 玩家 */ for(player: any): bungeecord.SubChannelBuilder; } export {}; } //# sourceMappingURL=proxy.d.ts.map