@minecraft/server-admin 1.0.0-beta.1.26.50-preview.20 → 1.0.0-beta.1.26.50-preview.22
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 +36 -7
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -64,9 +64,13 @@ export class AllowList {
|
|
|
64
64
|
*
|
|
65
65
|
* This function can't be called in restricted-execution mode.
|
|
66
66
|
*
|
|
67
|
-
* @param
|
|
67
|
+
* @param playerDetails
|
|
68
68
|
* Player or player name that should be added to the allow
|
|
69
69
|
* list.
|
|
70
|
+
* @param ignorePlayerLimit
|
|
71
|
+
* If true, the player will be allowed onto the server even if
|
|
72
|
+
* the server is at its player limit.
|
|
73
|
+
* Defaults to: false
|
|
70
74
|
* @throws This function can throw errors.
|
|
71
75
|
*
|
|
72
76
|
* {@link AllowListModificationError}
|
|
@@ -75,7 +79,7 @@ export class AllowList {
|
|
|
75
79
|
*
|
|
76
80
|
* {@link minecraftserver.InvalidEntityError}
|
|
77
81
|
*/
|
|
78
|
-
add(
|
|
82
|
+
add(playerDetails: AllowListEntryNameInfo | minecraftserver.Player, ignorePlayerLimit?: boolean): void;
|
|
79
83
|
/**
|
|
80
84
|
* @remarks
|
|
81
85
|
* Clears the allow list, removing all entries.
|
|
@@ -88,7 +92,7 @@ export class AllowList {
|
|
|
88
92
|
* @remarks
|
|
89
93
|
* Returns if the player is in the server's allow list.
|
|
90
94
|
*
|
|
91
|
-
* @param
|
|
95
|
+
* @param playerDetails
|
|
92
96
|
* Player or player name that should be checked for.
|
|
93
97
|
* @throws This function can throw errors.
|
|
94
98
|
*
|
|
@@ -96,7 +100,7 @@ export class AllowList {
|
|
|
96
100
|
*
|
|
97
101
|
* {@link minecraftserver.InvalidEntityError}
|
|
98
102
|
*/
|
|
99
|
-
contains(
|
|
103
|
+
contains(playerDetails: AllowListEntryNameInfo | minecraftserver.Player): boolean;
|
|
100
104
|
/**
|
|
101
105
|
* @remarks
|
|
102
106
|
* Reloads the server's allow list from disk.
|
|
@@ -114,7 +118,7 @@ export class AllowList {
|
|
|
114
118
|
*
|
|
115
119
|
* This function can't be called in restricted-execution mode.
|
|
116
120
|
*
|
|
117
|
-
* @param
|
|
121
|
+
* @param playerDetails
|
|
118
122
|
* Player or player name that should be removed from the allow
|
|
119
123
|
* list.
|
|
120
124
|
* @throws This function can throw errors.
|
|
@@ -125,7 +129,7 @@ export class AllowList {
|
|
|
125
129
|
*
|
|
126
130
|
* {@link minecraftserver.InvalidEntityError}
|
|
127
131
|
*/
|
|
128
|
-
remove(
|
|
132
|
+
remove(playerDetails: AllowListEntryNameInfo | minecraftserver.Player): void;
|
|
129
133
|
}
|
|
130
134
|
|
|
131
135
|
/**
|
|
@@ -454,9 +458,34 @@ export class ServerVariables {
|
|
|
454
458
|
}
|
|
455
459
|
|
|
456
460
|
/**
|
|
457
|
-
* Represents an entry
|
|
461
|
+
* Represents an entry in the allow list.
|
|
458
462
|
*/
|
|
459
463
|
export interface AllowListEntry {
|
|
464
|
+
/**
|
|
465
|
+
* @remarks
|
|
466
|
+
* Allows the player onto the server even when the server is at
|
|
467
|
+
* the player limit.
|
|
468
|
+
*
|
|
469
|
+
*/
|
|
470
|
+
ignoresPlayerLimit: boolean;
|
|
471
|
+
/**
|
|
472
|
+
* @remarks
|
|
473
|
+
* The player's name.
|
|
474
|
+
*
|
|
475
|
+
*/
|
|
476
|
+
name?: string;
|
|
477
|
+
/**
|
|
478
|
+
* @remarks
|
|
479
|
+
* The player's xuid.
|
|
480
|
+
*
|
|
481
|
+
*/
|
|
482
|
+
xuid?: string;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* Represents an entry to use with the allow list.
|
|
487
|
+
*/
|
|
488
|
+
export interface AllowListEntryNameInfo {
|
|
460
489
|
/**
|
|
461
490
|
* @remarks
|
|
462
491
|
* The player's name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minecraft/server-admin",
|
|
3
|
-
"version": "1.0.0-beta.1.26.50-preview.
|
|
3
|
+
"version": "1.0.0-beta.1.26.50-preview.22",
|
|
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.50-preview.
|
|
17
|
+
"@minecraft/server": "^1.17.0 || ^2.9.0-rc.1.26.50-preview.22"
|
|
18
18
|
},
|
|
19
19
|
"license": "MIT"
|
|
20
20
|
}
|