Giter VIP home page Giter VIP logo

bdsaddoninstaller's Introduction

BDSAddonInstaller

Bedrock Dedicated Server Addon Installer is a node tool used for automatically installing, updating, and uninstalling both addons and packs for the Mojang released bedrock servers.

https://www.minecraft.net/en-us/download/server/bedrock/

For help reach out on discord @ http://discord.BedrockRealms.com

Standard Users (command line tool)

How to Install

  1. Install Node.js 14.1.0+
    • Node is used to execute javascript, which this tool is written in.
    • https://nodejs.org/en/ (Make sure you click the right version)
  2. Open a terminal or command prompt.
    • On windows, click start & then type cmd.
  3. Type the below command to install the tool.
    • npm install -g bds-addon-installer

How to Use

  1. Open a terminal or command prompt.
    • on windows, click start & then type cmd
  2. Navigate to the folder where your bedrock server is installed.
    • Example: cd .\Desktop\mcServer\
    • If you need more help it is time to google "how to use command prompt".
  3. Run the tool for the first time to create the BDS-Addons folder.
    • Type "bds-addon-installer" without the quotes.
  4. Copy all of your .mcpack & .mcaddon files into the new BDS-Addons folder.
  5. Run the command again to install the packs.
    • Type "bds-addon-installer" without the quotes.

Command Options

  • bds-addon-installer <path_to_server> [-v] [-r]
    • path_to_server - The relative or full path to the root directory of your server.
    • -r - Removes all installed packs before installing the packs from BDS-Addons/.
    • -v - Enables verbose mode which will log additional details as the script runs.

Notes

  • There are two types of files that this tool can work with. Minecraft packs(.mcpack) which are individual resources, and Minecraft Addons(.mcaddon) which are collections of multiple packs. Minecraft packs will be installed without being altered but the .mcaddon files will be converted into the individual packs it contains before being installed.
    • mySpecialAddon.mcaddon - Converts to ->
      • mySpecialAddon_resource.mcpack
      • mySpecialAddon_behavior.mcpack
  • This tool will check to see if a pack is already installed and up to date. If the new pack has a different version number (even older) it will reinstall the pack. If the versions match nothing will be done.
  • If you want to run a clean installation of all packs you can use the -r option to uninstall all packs before installing those found in the BDS-Addons folder.
  • If you want to completely remove all packs, empty the BDS-Addons folder before running the tool with the -r option.
  • Bedrock Dedicated Servers have required vanilla resources pre-installed. These packs are constantly updated by Mojang, making it difficult to implement a system for differentiating them from custom packs. For this reason the tool assumes that the installed world packs and server packs are synchronized. If you manually installed any pack on just the server, bds-addon-installer may have difficulties uninstalling it.

Advanced Users (module details)

Notes

  • This is a ECMAScript module which makes use of import and export statements.
  • This module uses chegs-simple-logger (https://github.com/chegele/Logger).
  • Install the module locally if you will be using it programmatically.
    • npm install bds-addon-installer --save
  • You will need to manually create a BDS-Addons folder at the root of the server.

Options

  • serverPath String - The path to the root of the Bedrock Dedicated Server.
  • verboseMode Boolean - [Optional] Enable all logging details.

Functions

  • installAddon(packPath) - Installs the individual addon located at the provided path.
  • installAllAddons(removeOldPacks) - Installs all packs in the BDS-Addons directory.
  • setLogConfig(logConfig) - Updates logging configuration. https://github.com/chegele/Logger

Example

import BDSAddonInstaller from 'bds-addon-installer';

let serverPath = '/home/chegele/mcServer/';
let addon = '/home/chegele/mcServer/BDS-Addons/CustomAddonTest.mcaddon';

let installer = new BDSAddonInstaller(serverPath);

// These functions are asynchronous, they will run at the same time.
// You can use then or async/await statements to wit for completion.
installer.installAddon(addon);
installer.installAllAddons();

bdsaddoninstaller's People

Contributors

chegele avatar edward3h avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bdsaddoninstaller's Issues

uuid error

캡처

somebody help me!! i don't know this..

ENOTDIR error

I have tried different file paths and i keep getting this error i have followed the basic command line instructions and tried multiple installed servers
Error: ENOTDIR: not a directory, scandir 'C:\Users\jmdef\Desktop\bedrock-server-1.19.51.01\behavior_packs.gitignore'
at Object.readdirSync (node:fs:1451:3)
at findFilesSync (file:///C:/Users/jmdef/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:572:25)
at file:///C:/Users/jmdef/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:483:32
at Array.forEach ()
at mapInstalledPacks (file:///C:/Users/jmdef/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:478:20)
at new BDSAddonInstaller (file:///C:/Users/jmdef/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:99:36)
at file:///C:/Users/jmdef/AppData/Roaming/npm/node_modules/bds-addon-installer/cli.js:76:19
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
errno: -4052,
syscall: 'scandir',
code: 'ENOTDIR',
path: 'C:\Users\jmdef\Desktop\bedrock-server-1.19.51.01\behavior_packs\.gitignore'

When i type in the bds-addon-installer command, i get an error.

When i type i the bds-addon-installer command, I get an Unexpected token error.
image
I've tried uninstalling and reinstalling the npm package, i've updated my node.js version to the latest ersion and it still doesn't work. Any help? The tool used to work great, but now it suddenly doesn't.

Error on install package .mcpack

C:\Users\ennio\Documents\Minecraft Bedrock Server\bedrock-server-1.14.60.5>bds-addon-installer
internal/modules/cjs/loader.js:1149
      throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
      ^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: C:\Users\ennio\AppData\Roaming\npm\node_modules\bds-addon-installer\cli.js
�[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1149:13)�[39m
�[90m    at Module.load (internal/modules/cjs/loader.js:977:32)�[39m
�[90m    at Function.Module._load (internal/modules/cjs/loader.js:877:14)�[39m
�[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)�[39m
�[90m    at internal/main/run_main_module.js:18:47�[39m {
  code: �[32m'ERR_REQUIRE_ESM'�[39m
}

ERR_INVALID_ARG_TYPE

I run the command "bds-addon-installer" it successfully installed 3 out of 4 addons, but the last one gave a error.

Running Bedrock Dedicated Server Addon Installer...
[31/10/2020 20:02:27] GENERAL BDSAddonInstaller - Installing bAsilZadeaCanAlgbPack...
[31/10/2020 20:02:28] GENERAL BDSAddonInstaller - Successfully installed the bAsilZadeaCanAlgbPack pack.
[31/10/2020 20:02:28] GENERAL BDSAddonInstaller - Installing Multiplayer...
[31/10/2020 20:02:30] GENERAL BDSAddonInstaller - Successfully installed the Multiplayer pack.
[31/10/2020 20:02:30] GENERAL BDSAddonInstaller - Installing 7v40rOneplayerSleepSystemBP...
[31/10/2020 20:02:31] GENERAL BDSAddonInstaller - Successfully installed the 7v40rOneplayerSleepSystemBP pack.
[31/10/2020 20:02:31] GENERAL BDSAddonInstaller - Installing 7v41rOneplayerSleepSystemRP...
[31/10/2020 20:02:32] GENERAL BDSAddonInstaller - Successfully installed the 7v41rOneplayerSleepSystemRP pack.[31/10/2020 20:02:33] GENERAL BDSAddonInstaller - Installing lShowHPMOD...
internal/validators.js:92
throw new ERR_INVALID_ARG_TYPE(name, 'number', value);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "fd" argument must be of type number. Received undefined
at Object.write (fs.js:641:3)
at C:\Users\Marlon xdxd\AppData\Roaming\npm\node_modules\bds-addon-installer\node_modules\adm-zip\util\utils.js:160:44
at FSReqCallback.oncomplete (fs.js:171:23) {
code: 'ERR_INVALID_ARG_TYPE'
}
What could cause this error?

Not a directory error

Microsoft Windows [Version 10.0.20348.1726]
(c) Microsoft Corporation. All rights reserved.

E:\Minecraft Server\The Duat>bds-addon-installer

Running Bedrock Dedicated Server Addon Installer...
node:fs:1452
  handleErrorFromBinding(ctx);
  ^

Error: ENOTDIR: not a directory, scandir 'E:\Minecraft Server\The Duat\worlds\The Duat\resource_packs\desktop.ini'
    at Object.readdirSync (node:fs:1452:3)
    at findFilesSync (file:///C:/Users/Aza/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:572:25)
    at file:///C:/Users/Aza/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:483:32
    at Array.forEach (<anonymous>)
    at mapInstalledPacks (file:///C:/Users/Aza/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:478:20)
    at new BDSAddonInstaller (file:///C:/Users/Aza/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:100:35)
    at file:///C:/Users/Aza/AppData/Roaming/npm/node_modules/bds-addon-installer/cli.js:76:19
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
  errno: -4052,
  syscall: 'scandir',
  code: 'ENOTDIR',
  path: 'E:\\Minecraft Server\\The Duat\\worlds\\The Duat\\resource_packs\\desktop.ini'
}

Node.js v18.16.0

Error: ENOTDIR: not a directory

C:\Users\user_name\Documents\bedrockserver>bds-addon-installer -r -v

Running Bedrock Dedicated Server Addon Installer...
[6/20/2020, 9:27:57 PM] DETAIL  BDSAddonInstaller - Reading world name from C:\Users\user_name\Documents\bedrockserver\server.properties
[6/20/2020, 9:27:57 PM] DETAIL  BDSAddonInstaller - Reading manifest data from C:\Users\user_name\Documents\bedrockserver\resource_packs\._chemistry
fs.js:974
  handleErrorFromBinding(ctx);
  ^

Error: ENOTDIR: not a directory, scandir 'C:\Users\user_name\Documents\bedrockserver\resource_packs\._chemistry'
    at Object.readdirSync (fs.js:974:3)
    at findFilesSync (file:///C:/Users/user_name/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:571:25)
    at file:///C:/Users/user_name/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:482:32
    at Array.forEach (<anonymous>)
    at mapInstalledPacks (file:///C:/Users/user_name/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:477:20)
    at new BDSAddonInstaller (file:///C:/Users/user_name/AppData/Roaming/npm/node_modules/bds-addon-installer/index.js:97:36)
    at file:///C:/Users/user_name/AppData/Roaming/npm/node_modules/bds-addon-installer/cli.js:76:19
    at ModuleJob.run (internal/modules/esm/module_job.js:138:23)
    at async Loader.import (internal/modules/esm/loader.js:178:24) {
  errno: -4052,
  syscall: 'scandir',
  code: 'ENOTDIR',
  path: 'C:\\Users\\user_name\\Documents\\bedrockserver\\resource_packs\\._chemistry'
}

The actual folder name is resource_packs\\chemistry, without ._

Node.js version was 14.3.0
BDS version was 1.14.60.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.