This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
99 lines (84 loc) · 2.64 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import { Client } from "minecraft-protocol";
/**
* BungeeCord Handler
*/
interface BungeeHandler{
/**
* Connects a player to said subserver.
* @param server server name
*/
connect(server :string): BungeeHandler;
/**
* Connect a named player to said subserver.
* @param player player name
* @param server server name
*/
connectOther(player :string, server :string): BungeeHandler;
/**
* Get the (real) IP of a player.
*/
ip(): BungeeHandler;
/**
* Get the amount of players on a certain server, or on ALL the servers.
* @param server server name, ALL for all players count
*/
playerCount(server :string): BungeeHandler;
/**
* Get a list of players connected on a certain server, or on ALL the servers.
* @param server server name, ALL for all players list
*/
playerList(server :string): BungeeHandler;
/**
* Get a list of server name strings, as defined in BungeeCord's config.yml
*/
getServers(): BungeeHandler;
/**
* Send a message (as in, a chat message) to the specified player.
* @param player player name, ALL to send to all players
* @param message message to send
*/
message(player :string, message :string): BungeeHandler;
/**
* Get this server's name, as defined in BungeeCord's config.yml
*/
getServer(): BungeeHandler;
/**
* Send a custom plugin message to said server.
* @param server server name, ALL to send to all servers
* @param channel subchannel for plugin usage
* @param data message to send
*/
forward(server :string, channel :string, data :Buffer): BungeeHandler;
/**
* Send a custom plugin message to specific player.
* @param player player name
* @param channel subchannel for plugin usage
* @param data message to send
*/
forwardToPlayer(player :string, channel :string, data :Buffer): BungeeHandler;
/**
* Request the UUID of this player.
*/
uuid(): BungeeHandler;
/**
* Request the UUID of any player connected to the BungeeCord.
* @param player player name
*/
uuidOther(player :string): BungeeHandler;
/**
* Request the IP of any server on BungeeCord.
* @param server server name
*/
serverIp(server :string): BungeeHandler;
/**
* Kick any player on BungeeCord.
* @param player player name
* @param reason reason of kick
*/
kickPlayer(player :string, reason :string): BungeeHandler;
}
/**
* Wrap client with BungeeHandler
* @param client the client
*/
export default function bungee(client: Client): BungeeHandler;