@minecraft/server-admin 1.0.0-beta.1.26.40-preview.26 → 1.0.0-beta.1.26.40-preview.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +33 -3
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -52,6 +52,12 @@ export class AllowList {
|
|
|
52
52
|
*
|
|
53
53
|
*/
|
|
54
54
|
enabled: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* @remarks
|
|
57
|
+
* The list of entries in the allow list.
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
readonly entries: AllowListEntry[];
|
|
55
61
|
/**
|
|
56
62
|
* @remarks
|
|
57
63
|
* Adds a player to the server's allow list.
|
|
@@ -65,9 +71,11 @@ export class AllowList {
|
|
|
65
71
|
*
|
|
66
72
|
* {@link AllowListModificationError}
|
|
67
73
|
*
|
|
74
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
75
|
+
*
|
|
68
76
|
* {@link minecraftserver.InvalidEntityError}
|
|
69
77
|
*/
|
|
70
|
-
add(player: minecraftserver.Player
|
|
78
|
+
add(player: AllowListEntry | minecraftserver.Player): void;
|
|
71
79
|
/**
|
|
72
80
|
* @remarks
|
|
73
81
|
* Clears the allow list, removing all entries.
|
|
@@ -84,9 +92,11 @@ export class AllowList {
|
|
|
84
92
|
* Player or player name that should be checked for.
|
|
85
93
|
* @throws This function can throw errors.
|
|
86
94
|
*
|
|
95
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
96
|
+
*
|
|
87
97
|
* {@link minecraftserver.InvalidEntityError}
|
|
88
98
|
*/
|
|
89
|
-
contains(player: minecraftserver.Player
|
|
99
|
+
contains(player: AllowListEntry | minecraftserver.Player): boolean;
|
|
90
100
|
/**
|
|
91
101
|
* @remarks
|
|
92
102
|
* Reloads the server's allow list from disk.
|
|
@@ -111,9 +121,11 @@ export class AllowList {
|
|
|
111
121
|
*
|
|
112
122
|
* {@link AllowListModificationError}
|
|
113
123
|
*
|
|
124
|
+
* {@link minecraftcommon.InvalidArgumentError}
|
|
125
|
+
*
|
|
114
126
|
* {@link minecraftserver.InvalidEntityError}
|
|
115
127
|
*/
|
|
116
|
-
remove(player: minecraftserver.Player
|
|
128
|
+
remove(player: AllowListEntry | minecraftserver.Player): void;
|
|
117
129
|
}
|
|
118
130
|
|
|
119
131
|
/**
|
|
@@ -441,6 +453,24 @@ export class ServerVariables {
|
|
|
441
453
|
get(name: string): unknown | undefined;
|
|
442
454
|
}
|
|
443
455
|
|
|
456
|
+
/**
|
|
457
|
+
* Represents an entry to use in the allow list.
|
|
458
|
+
*/
|
|
459
|
+
export interface AllowListEntry {
|
|
460
|
+
/**
|
|
461
|
+
* @remarks
|
|
462
|
+
* The player's name.
|
|
463
|
+
*
|
|
464
|
+
*/
|
|
465
|
+
name?: string;
|
|
466
|
+
/**
|
|
467
|
+
* @remarks
|
|
468
|
+
* The player's xuid.
|
|
469
|
+
*
|
|
470
|
+
*/
|
|
471
|
+
xuid?: string;
|
|
472
|
+
}
|
|
473
|
+
|
|
444
474
|
/**
|
|
445
475
|
* Options when transferring a player to a server that supports
|
|
446
476
|
* direct host/port connections.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-admin",
|
|
3
|
-
"version": "1.0.0-beta.1.26.40-preview.
|
|
3
|
+
"version": "1.0.0-beta.1.26.40-preview.30",
|
|
4
4
|
"description": "",
|
|
5
5
|
"contributors": [
|
|
6
6
|
{
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@minecraft/common": "^1.0.0",
|
|
17
|
-
"@minecraft/server": "^1.17.0 || ^2.9.0-rc.1.26.40-preview.
|
|
17
|
+
"@minecraft/server": "^1.17.0 || ^2.9.0-rc.1.26.40-preview.30"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|