v1.28.0 (The Security Update) Changelog
Critical Bug Fixes
- Fixed a bug where disabling the enable chat commands toggle would not disable chat commands (ANDEXDB-65).
Additions
Security
- Added Ultra Security Mode, which makes the add-on a lot more locked down, in that players need to be given permissions by the owner to be able to use most of the features in the add-on. Instead of using tags for player permissions, instead the owner of the world/realm/server need to go into the Main Menu and go into the manage players menu, then find the player, click manage permissions, and give them the desired permissions. ONLY the owner can do this. To configure the owner, you just go to https://www.8crafter.com/andexdb-security-configurator-generator and enter your username and click generate, it will generate a separate behavior pack that you add to your world/realm/server in addition to this add-on, that pack will hardcode who the owner is. To enable ultra security mode the owner has to go to Main Menu > Security > Settings > Security Mode and then click on the button that says, "Ultra Security Mode". NOTE: This is ONLY recommended for realms and servers, if you are on a private world with friends that you trust then this is not needed, this is only for realms and server where you have admins that you don't trust enough that they won't give random people the tags that would normally allow them to have the permissions. This basically eliminates the risk of admins giving random people permissions. However, if you do have a specific admin that you still want to be able to give other players permissions, then just give them the
andexdb.fullControl
permission, it will give them the ability to give players permissions, as well as use any other Ultra Security Mode features that would normally require the owner to use.
Commands
- Added the
\\maze
command. - Added the
\\regenerateblocks
command. - Added the
\\savepos
command. - Added the
\\loadpos
command. - Added the
\\deletesavedpos
command. - Added the
\remexpentity
command.
UIs
Added the "Security" sub-menu to the Main Menu.
Technical
- Added some new functions to the
Array
prototype:
typescript
/**
* Calls a defined async callback function on each element of an array, and returns an array that contains the awaited results.
* @param callbackfn An async function that accepts up to three arguments. The map method calls and awaits the completion of the async callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
* @async
*/
mapAsync<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): Promise<Awaited<U>[]>;
/**
* Awaits each element in the array.
* @returns {Promise<Awaited<T>[]>} The awaited array elements.
* @async
*/
awaitEach(): Promise<Awaited<T>[]>;
- Added the
world
andsystem
classes from the@minecraft/server
module toglobalThis
. - Added the following getter to
globalThis
:
typescript
/**
* A class containing configuration detailing which functions, classes, and constants from the modules to import into their respective properties on the global modules object.
* @see {https://github.com/link modules.main.moduleImportsConfig}
*/
static get moduleImportsConfig(): typeof import("init/classes/moduleImportsConfig").moduleImportsConfig;
- Added the
world
andsystem
classes from the@minecraft/server
module toglobalThis
. - Added
const optionalModuleObjectImportFilePaths
,const moduleOptionalImportPathMap
, andtype optionalModuleObjectImportFilePathsImportMap
to directoryTree. Player.prototype
- Added the following getters to the
Player
class prototype:get playerPermissions(): PlayerPermissions;
get worldEditSelection(): WorldEditSelection;
- Added
get ultraSecurityModeSecurityLevel(): "owner" | "headAdmin" | "admin" | "moderator" | "WorldEdit" | "everyone"
to themodules.cmds.command
class. - Added
get playerPermissions(): PlayerPermissions;
to themodules.cmds.executeCommandPlayerW
class. - Added
get worldEditSelection(): WorldEditSelection;
to themodules.cmds.executeCommandPlayerW
class. - Added
get inputInfo(): InputInfo;
to themodules.cmds.executeCommandPlayerW
class. - Added
lookAt(targetLocation: Vector3): void;
to themodules.cmds.executeCommandPlayerW
class.
- Added the following getters to the
Changes
Player Data Save System
- Added the following new properties that are saved by the player data save system:
ts
inputPermissions?: {
/**
* @deprecated Only exists in format versions below `1.6.0`.
* @deprecated Supercceeded by `Camera`.
*/
cameraEnabled?: boolean;
/**
* @deprecated Only exists in format versions below `1.6.0`.
* @deprecated Supercceeded by `Movement`.
*/
movementEnabled?: boolean;
Camera?: boolean;
Movement?: boolean;
LateralMovement?: boolean;
Sneak?: boolean;
Jump?: boolean;
Mount?: boolean;
Dismount?: boolean;
MoveForward?: boolean;
MoveBackward?: boolean;
MoveLeft?: boolean;
MoveRight?: boolean;
};
/**
* @since format version 1.6.0
* @since v1.28.0-preview.20+BUILD.1
*/
inputInfo?: {
lastInputModeUsed: Player["inputInfo"]["lastInputModeUsed"];
touchOnlyAffectsHotbar: Player["inputInfo"]["touchOnlyAffectsHotbar"];
};
/**
* @since format version 1.6.0
* @since v1.28.0-preview.20+BUILD.1
*/
playerPermissions?: ReturnType<PlayerPermissions["toJSON"]>;
/**
* @since format version 1.6.0
* @since v1.28.0-preview.20+BUILD.1
*/
onJoinActions?: SavedPlayerOnJoinActions;
UIs
- Started working on an edit module imports config menu, to allow for only importing specific modules or only specific functions and classes from those modules upon startup.
Technical
Classes
- The
command
andcommandSettings
classes now have a type parameter which specifies the command type:<T extends "built-in" | "custom" | "unknown" = "unknown">
.
Other
globalThis
- Moved
function getPlayer(playerName: string): Player
frommodules.cmds
toglobalThis
. - Moved
function getPlayerById(playerId: string | number): Player
frommodules.cmds
toglobalThis
.
- Moved
Fixes
Items
- Fixed a bug that has existed since the add-on was released where the Script Runner was not functional (ANDEXDB-66).
- Fixed the interact button text for the Script Runner (
andexdb:script_runner
), old Main Menu item (andexdb:selection_menu
), and Selection Tool (andexdb:selection_tool
).
UIs
- Fixed an issue where the command settings menu would give an error upon opening for custom command.
Ban System
- Fixed a bug that caused the name of the person who banned a player to not be displayed in the kick reason message.
Technical
Classes
- Fixed a StackOverflow error with the setters for some of the properties in the
commandSettings
class.