GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - thedrewen/ScriptSDK: Use certain Endstone features directly on your add-ons. By using a JS file on your add-ons and the Endstone plugin.

BranchesTags
Open more actions menu

Latest commit

 

History

105 Commits
105 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
lib
lib
 
 
src/endstone_scriptsdk
src/endstone_scriptsdk
 
 
.gitignore
.gitignore
 
 
CLAUDE.md
CLAUDE.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
pyproject.toml
pyproject.toml
 
 
requirements.txt
requirements.txt
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

ScriptSDK

License Version

Use certain Endstone features directly in your Bedrock add-ons through a JavaScript API. ScriptSDK bridges the gap between Minecraft Bedrock add-ons and Endstone plugin capabilities.

šŸ“‹ Overview

ScriptSDK is a dual-component system:

  • JavaScript/TypeScript SDK: Import and use in your Bedrock add-ons
  • Endstone Plugin: Python-based server plugin that enables the SDK functionality

✨ Features

  • /debug : To enable/disable the plugin's communication logs.

šŸ”© System Features

  • system.groups → Group[]: List of groups initialise

šŸ’« Player Features

  • player.ip → string | null: Player's IP address (automatically populated when player spawns)
  • player.xuid → string | null: Player's Xbox User ID (automatically populated when player spawns)
  • player.device_os → string | null: Player's device OS (automatically populated when player spawns)
  • player.setBossBar(title, color, style, percent) → Promise<void>: Create and assign a boss bar to a player with customizable progress percentage (0-100)
  • player.resetBossBar() → Promise<void>: Reset boss bar to a player.
  • player.sendToast(title, content) → Promise<void>: Send toast notification.
  • player.sendPopup(message) → Promise<void>: Send popup.

šŸ’« Entity Features

  • entity.setNameTagForPlayer(target, newName) → Promise<void>: Set custom entity name visible to specific players
  • entity.resetNameTagForPlayer(target) → Promise<void>: Reset custom entity name to default for a specific target player
  • entity.getNameTagByPlayer(target) → string: Get the custom name tag that a specific entity sees for this player

šŸ›”ļø Group System

Create and manage player groups with custom rules:

import { Group } from 'lib/ScriptSDK';
import { GroupRule } from 'lib/src/enums';

// Create a new group with a rule
const safeZone = new Group('SafeZone', GroupRule.NO_DAMAGE);

// Initialize the group (required before using it)
await safeZone.init();

// Add players to the group
await safeZone.addPlayer(player);

// Remove players from the group
await safeZone.removePlayer(player);

// Get all players in the group
const groupPlayers = safeZone.getPlayers();

// Destroy the group
await safeZone.destroy();

Group Properties:

  • name → string: The name of the group
  • rule → GroupRule: The rule applied to the group
  • is_created → boolean: Whether the group was successfully created
  • is_destroy → boolean: Whether the group has been destroyed

Group Methods:

  • init() → Promise<void>: Initialize the group on the server (must be called before using the group)
  • addPlayer(player | playerName) → Promise<void>: Add a player to the group
  • removePlayer(player | playerName) → Promise<void>: Remove a player from the group
  • hasPlayer(player | playerName) → boolean : Returns a boolean value indicating whether the player is in the group
  • getPlayers() → Player[]: Get all players in the group
  • destroy() → Promise<void>: Delete the group and remove all players from it
  • toJson() → object: Export group to json

šŸ›”ļø Group Rules

Available Rules:

  • GroupRule.NO_PVP (0) - Players in the group cannot attack each other
  • GroupRule.NO_DAMAGE (1) - Players in the group take no damage from any source
  • GroupRule.PVP_ONLY_GROUP (3) - Players can only attack other players in the same group
  • GroupRule.NO_PVP_NO_DAMAGE (4) - Combination of NO_PVP and NO_DAMAGE rules
  • GroupRule.NO_PVP_ONLY_GROUP (5) - Players in the group cannot attack each other (PVP disabled within group only)

šŸŽØ Boss Bar Customization

Available Colors:

  • BossBarColor.BLUE (0) - Blue boss bar
  • BossBarColor.GREEN (1) - Green boss bar
  • BossBarColor.PINK (2) - Pink boss bar
  • BossBarColor.PURPLE (3) - Purple boss bar
  • BossBarColor.REBECCA_PURPLE (4) - Rebecca purple boss bar
  • BossBarColor.RED (5) - Red boss bar
  • BossBarColor.WHITE (6) - White boss bar
  • BossBarColor.YELLOW (7) - Yellow boss bar

Available Styles:

  • BossBarStyle.SOLID (0) - Solid progress bar
  • BossBarStyle.SEGMENTED_6 (1) - 6 segments
  • BossBarStyle.SEGMENTED_10 (2) - 10 segments
  • BossBarStyle.SEGMENTED_12 (3) - 12 segments
  • BossBarStyle.SEGMENTED_20 (4) - 20 segments

šŸ“¦ Installation

For Add-on Developers (JavaScript/TypeScript)

  1. Download the latest release from GitHub Releases
  2. Copy the following files to your add-on project in a lib folder.

Your add-on structure should look like:

scripts/
ā”œā”€ā”€ lib/
│   ā”œā”€ā”€ ScriptSDK.js
│   ā”œā”€ā”€ ScriptSDK.d.ts
│   └── src/...
└── your-script.js

For Server Administrators (Endstone Plugin)

  1. Download the latest plugin wheel (.whl) from GitHub Releases
  2. Place the .whl file in your Endstone server's plugins folder
  3. Restart your server

šŸš€ Quick Start

In your Bedrock Add-on

After copying the SDK files to your lib folder, import it in your main file:

import 'lib/ScriptSDK'; // Initialisation of the library

TypeScript Support

Full TypeScript support with type definitions included:

import { Player } from '@minecraft/server';
import { BossBarColor, BossBarStyle } from 'lib/ScriptSDK';
import { GroupRule } from 'lib/src/enums';
import { Group } from 'lib/src/groups';

// TypeScript will provide autocomplete and type checking
const pvpGroup = new Group('PvPArena', GroupRule.PVP_ONLY_GROUP);
// Initialize the group before using it
await pvpGroup.init();

const setupPlayer = async (player: Player) => {
    
    await player.setBossBar('Health Bar', BossBarColor.RED, BossBarStyle.SOLID, 80);
    await pvpGroup.addPlayer(player);
};

šŸ“ License

This project is licensed under the GPL-2.0 License - see the LICENSE file for details.

šŸ”— Links

  • GitHub Repository
  • Issue Tracker

šŸ¤ Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

šŸ“§ Support

If you encounter any issues or have questions, please open an issue on GitHub.

About

Use certain Endstone features directly on your add-ons. By using a JS file on your add-ons and the Endstone plugin.

Topics

bedrockendstoneminecraftpluginssdk

Resources

Readme
GPL-2.0 license
Activity

Stars

9 stars

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.