Skip to content
Merged

26.2 #13

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
java-version: "25"
cache: maven

- name: Build with Maven
run: mvn -B -ntp clean verify
run: mvn clean package

- name: Select plugin JAR
id: jar
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/modrinth-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Publish to Modrinth (Alpha)

on:
push:
branches: [ main ]
workflow_dispatch:

env:
JAVA_VERSION: '25'

jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: temurin

- name: Build with Maven
run: mvn -B clean package -q

- name: Prepare artifact
id: prepare
run: |
VERSION=$(grep -m1 '<version>' pom.xml | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
ARTIFACT_NAME="SkyeBlock-${VERSION}-${SHORT_SHA}.jar"
cp target/SkyeBlock-*.jar "target/${ARTIFACT_NAME}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
echo "short_sha=${SHORT_SHA}" >> "$GITHUB_OUTPUT"
echo "artifact=${ARTIFACT_NAME}" >> "$GITHUB_OUTPUT"
echo "Built: ${ARTIFACT_NAME}"

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.prepare.outputs.artifact }}
path: target/${{ steps.prepare.outputs.artifact }}

- name: Upload to Modrinth
run: |
VERSION="${{ steps.prepare.outputs.version }}"
SHORT_SHA="${{ steps.prepare.outputs.short_sha }}"
FILE="target/${{ steps.prepare.outputs.artifact }}"

jq -n \
--arg version "$VERSION" \
--arg name "skyeblock.${VERSION}-alpha-${SHORT_SHA}" \
--arg project "${{ secrets.MODRINTH_PROJECT_ID }}" \
'{
version_number: $version,
name: $name,
version_type: "alpha",
game_versions: ["26.2"],
loaders: ["paper", "spigot"],
project_id: $project,
featured: false,
file_parts: ["file"],
dependencies: [
{ project_id: "Vebnzrzj", dependency_type: "optional" },
{ project_id: "DKY9btbd", dependency_type: "optional" },
{ project_id: "1u6JkXh5", dependency_type: "optional" }
]
}' > /tmp/modrinth-data.json

curl -X POST "https://api.modrinth.com/v2/version" \
-H "Authorization: ${{ secrets.MODRINTH_TOKEN }}" \
-F "data=@/tmp/modrinth-data.json" \
-F "file=@${FILE}"; echo
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
target/*/*
target/maven-status/*


# IDE Files
.idea/
Expand Down
50 changes: 28 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
# Changelog
# SkyeBlock Changelog

All notable changes to this project will be documented in this file.
## 3.3.3 (2026-07-13)

## [3.2.0-1.21.10] - 2025-12-26
- Build now targets Java 21 for 1.21.x dependency compatibility.
- CI/CD: GitHub Actions builds on pushes/PRs, publishes releases on `v*` tags, and maintains a rolling `main-latest` prerelease with auto-generated release notes.
- Packaging: resource filtering adjusted so `.schem` files are included correctly.
- Visitor protection: fixed ProtocolLib packet handling for block/container interaction restrictions.
- Docs/config: added/expanded permission documentation and configuration migration support.
### MC 26.2 & ASP 4.0.0 Support
- Updated Paper API to `26.2.build.60-beta`
- Updated `plugin.yml` api-version to `26.2`
- Integrated Advanced Slime World Manager (ASWM) API 4.0.0
- Two-stage world loading: `readWorld`/`createEmptyWorld` (async) -> `loadWorld` (sync)
- `FileLoader` shading (package `com.infernalsuite.asp.loaders`)
- `LegacySWMLoaderWrapper` for backward compatibility
- Java 21 bytecode target (compatible with Java 25 runtime on MC 26.2)

## [1.21.10 up2]
- Enforce container/workstation access via per-island permissions and visitor settings (blocks external plugins like sell wands on others' chests).
- Permission-aware inventory open/interaction handling integrated with IslandPermissionManager.
### Schematic Bundling
- Schematics are now bundled inside the plugin JAR under `resources/schematics/`
- `SchematicManager` auto-extracts bundled schematics to the data folder on startup
- 16 bundled schematics: advanced, bare_bones, campsite, cozy_grove, desert, fishermans_paradise, igloo, inverted, mineshaft, nether_generic, nether_jail, olympus, orchid, sandy_isle, vanilla, wilson

## [1.21.10-dev] - 2025-12-20
- Updated for Minecraft 1.21.10 API compatibility and opened the 1.21.10-dev line.
- Lowered Java target to 17 for wider host compatibility.
- Added gamerule access checks and new permission bundles (`skyeblock.player`, `skyeblock.settings.gamerules`), with GUI filtering.
- Added `/mobspawning` command registration to plugin.yml.
- Marked WorldGuard and ProtocolLib as soft dependencies; added DEPENDENCIES.md for setup guidance.
- Added new schematic files for multiple environments.
- Allowed admins to bypass visiting-disabled checks when appropriate.
- Build/Maven updates to align with 1.21.10 APIs.
### H2 Database Storage (replaces YAML)
- Added embedded H2 `2.3.232` database (`skyeblock.db` in plugin data folder)
- New `DatabaseManager` class handles all H2 connection, schema, and CRUD operations
- **Island data** (`islands`, `island_visitor_permissions`, `island_coop_members`, `island_pending_invites`, `island_votes`, `island_custom_permissions`) — replaces `island-data.yml`
- **Island settings** (`island_settings`) — replaces `island-settings.yml`
- **Player data** (`player_data`) — replaces `player-data.yml`
- Transactional saves with rollback on failure
- `MERGE INTO` for upserts on single-row updates
- Old YAML files are now ignored; data is written to `skyeblock.db`

## [1.21.4]
- Earlier 1.21.4 work predates this changelog; see git history for details.
### Changes
- `/is` now teleports to your island instead of opening settings (use `/is settings` for settings)
- Rewrote README with full feature, command, and permission reference
- Added GitHub Actions workflow for Modrinth alpha publishing
- Version bumped to 3.3.3
202 changes: 149 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,168 @@
# SkyeBlock

Skyblock plugin for Paper/Spigot (1.21.10 tested) with isolated island worlds, GUI-driven settings, and granular permissions. Dual command style (`/island` and `/sb …`) keeps legacy players happy while giving admins structured subcommands.
A skyblock island plugin for Minecraft 26.2 (Chaos Cubed) on Paper. Each player gets an isolated island world with persistent storage backed by an embedded H2 database. Supports Advanced Slime World Manager for efficient world management.

## Highlights
- Island per player with optional SlimeWorldManager/ASWM storage; hub + spawn helpers.
- GUI settings for islands (gamerules, visiting, deletion guard) with live apply.
- Multiple starter templates (classic, desert, nether) plus drop-in schematics.
- LuckPerms-friendly permissions, split into player base, safe gamerules, and full admin bypass.
- Nether island support with biome control and safe teleports.
## Features

- Isolated island worlds: each island lives in its own world for full separation
- H2 embedded database storage for islands, settings, and player data (no YAML)
- 16 bundled schematic templates extracted from the plugin JAR on first run
- Advanced Slime World Manager (ASWM) 4.0.0 integration for world loading
- GUI-driven settings for gamerules, visiting, and island management
- Per-island gamerule overrides with permission-based access control
- Coop system with role-based access (Visitor, Member, Admin, Co-Owner)
- Voting system with 7-day vote tracking
- Warp system with configurable warp points
- Resource world support (Nether, End)
- Visitor protection with granular permission control
- Nether island auto-creation with biome control
- Island deletion cooldown and try-limit system

## Requirements
- Paper/Spigot 1.21.x
- Java 17+
- Optional: SlimeWorldManager/AdvancedSlimeWorldManager, WorldEdit (dep), LuckPerms.

## Install / Build
- Minecraft 26.2 (Chaos Cubed) server
- Paper or Spigot (api-version 26.2)
- Java 21 or newer
- WorldEdit (required dependency)
- WorldGuard, ProtocolLib (optional, for full functionality)
- Advanced Slime World Manager (optional, for efficient world storage)
- LuckPerms (optional, for permission management)

## Installation

1. Build the plugin:
```bash
cd SkyeBlock
mvn clean package
cp target/skyeblock-*.jar /path/to/server/plugins/
```
Start the server once to generate configs in `plugins/SkyeBlock/`.

## Core Commands
- `/island create <type>` – create an island (classic/desert/nether)
- `/island home` – go to your island
- `/island settings` – open settings GUI (gamerules/visiting/delete)
- `/visit <player>` – visit another island
- `/hub` and `/spawn` – quick travel
- `/sb island …` – subcommand equivalents; `/sb` shows help
- Admin: `/sba …`, `/delete [player]`, `/island list`, `/island status`

## Permissions (key groups)
- `skyeblock.player` – default player bundle (island basics, hub/spawn, warp) **no gamerules**.
- `skyeblock.settings.gamerules` – safe/common gamerules (daylight/weather cycle, keepinventory, mobgriefing/spawn, fire/fall/fire/drown damage, insomnia, immediate respawn, natural regen, announce advancements, elytra check).
- `skyeblock.gamerule.*` – all gamerules; `skyeblock.gamerules.adminbypass` overrides checks.
- `skyeblock.*` – everything (op).

Individual gamerule nodes mirror Bukkit names (e.g., `skyeblock.gamerule.dodaylightcycle`, `skyeblock.gamerule.doweathercycle`, `skyeblock.gamerule.randomtickspeed`).

## Gamerule & Settings GUI
- Access via `/island settings` → main menu → Gamerule Settings.
- Only gamerules you have permission for are shown.
- Boolean rules toggle; numeric rules adjust via clicks/input; applied instantly to the island world.
2. Copy `target/SkyeBlock-*.jar` to your server's `plugins/` directory.
3. Start the server once to generate configuration files in `plugins/SkyeBlock/`.
4. Configure `config.yml` to match your server setup.
5. Restart the server.

## Commands

### Player Commands

| Command | Description |
|---------|-------------|
| `/island` or `/is` | Teleport to your island (or open creation GUI if you have none) |
| `/island create [type]` | Create a new island with the given template |
| `/island tp` | Teleport to your island |
| `/island settings` | Open the island settings GUI |
| `/island edit <title\|desc\|icon>` | Customize your island name, description, or icon |
| `/island set <home\|visit>` | Set custom teleport locations |
| `/island coop <add\|remove\|role\|visit\|list>` | Manage coop members |
| `/island visit [player]` | Visit another player's island or open the browser |
| `/island lock` | Lock your island (coop members only) |
| `/island unlock` | Unlock your island |
| `/island vote <player>` | Vote for another player's island |
| `/island types` | List available island templates |
| `/island help` | Show the help message |
| `/visit [player]` | Visit another player's island |
| `/hub` | Teleport to the hub world |
| `/spawn` | Teleport to the spawn world |
| `/warp [name]` | Open the warp GUI or teleport to a specific warp |
| `/mobspawning` | Check mob spawning status |

### Admin Commands

| Command | Description |
|---------|-------------|
| `/sba <subcommand>` | Admin command with full access |
| `/island list` | List all islands on the server |
| `/island status` | Show server status information |
| `/island delete` | Delete your island (with confirmation GUI) |
| `/islandpermissions [player]` | Manage per-player island permissions |
| `/warpadmin <create\|delete\|reset\|reload>` | Manage warps and resource worlds |
| `/convertislands <scan\|convert>` | Convert old island data format |
| `/mobspawning <status\|reload>` | Manage global mob spawning settings |

## Permissions

### Default Player Permissions (`skyeblock.player`)

Grants access to basic island commands, visiting, coop, voting, warps, and hub/spawn. Does not include gamerule access.

### Gamerule Permissions

- `skyeblock.settings.gamerules` - Access to common safe gamerules (daylight cycle, weather cycle, keep inventory, mob griefing, mob spawning, fire tick, fall damage, fire damage, drowning damage, insomnia, immediate respawn, natural regeneration, announce advancements, elytra movement check)
- `skyeblock.gamerule.*` - Access to all gamerules including advanced ones (random tick speed, spawn radius, entity cramming, command chain length, sleeping percentage, etc.)
- `skyeblock.gamerule.<name>` - Individual gamerule access (e.g., `skyeblock.gamerule.randomtickspeed`)
- `skyeblock.gamerules.adminbypass` - Bypass all gamerule permission checks

### Admin Permissions

- `skyeblock.admin` - Full admin access to all commands
- `skyeblock.admin.convert` - Island data conversion
- `skyeblock.admin.warp` - Warp management
- `skyeblock.admin.mobspawning` - Global mob spawning management

### Island-Specific Permissions

- `skyeblock.island` - Basic island commands
- `skyeblock.island.visit` - Visit other islands
- `skyeblock.island.vote` - Vote for islands
- `skyeblock.island.edit` - Edit island title, description, icon
- `skyeblock.island.coop` - Manage coop members
- `skyeblock.island.lock` - Lock/unlock islands
- `skyeblock.island.set` - Set custom home/visit locations
- `skyeblock.island.delete` - Delete your own island
- `skyeblock.island.permissions` - Manage per-player island permissions

### Warp Permissions

- `skyeblock.warp` - Access to warp GUI
- `skyeblock.warp.spawn`, `skyeblock.warp.nether`, `skyeblock.warp.end`, `skyeblock.warp.pvp`, `skyeblock.warp.shop` - Individual warp access

## Configuration
Generated files live in `plugins/SkyeBlock/`:
- `config.yml` – world names, hub, nether toggle/biome, distances.
- `island-settings.yml` – per-island gamerule values.
- `warps.yml` – warp definitions.
- `schematics/` – bundled island templates; add your own `.schem` files here.

All configuration files are in `plugins/SkyeBlock/`:

### config.yml

- `hub` - Hub world settings (world name, spawn coordinates, teleport-on-join)
- `world` - World settings (nether auto-creation, border size)
- `resource-worlds` - Nether and End resource world configuration
- `island` - Island settings (teleport on join, creation cooldown, template mappings, visiting toggle)
- `messages` - All plugin messages in MiniMessage format
- `schematics` - Schematic template path

### Database

Island data, settings, and player data are stored in `plugins/SkyeBlock/skyeblock.db` (H2 embedded database). The database is created automatically on first startup.

### Warps

Warp definitions are stored in `plugins/SkyeBlock/warps.yml`.

## Island Templates
- Built-in: classic, desert, nether (see `src/main/resources/schematics/`).
- To add: drop a `.schem` into `plugins/SkyeBlock/schematics/`, then reference it via your island type config.

## Development Notes
- Language: Java 17; build: Maven.
- Main entry: `skyeblock.nobleskye.dev.skyeblock.SkyeBlockPlugin`.
- Primary configs/resourceds under `src/main/resources/`.
16 bundled templates are extracted from the plugin JAR on first startup:

## Contributing / Support
PRs and issues welcome. For perms: start players with `skyeblock.player`, grant `skyeblock.settings.gamerules` for safe tweaks, reserve `skyeblock.gamerule.*`/`adminbypass` for staff.
**Easy:** vanilla, bare_bones, campsite, cozy_grove, mineshaft
**Medium:** desert, fishermans_paradise, inverted, orchid
**Hard:** advanced, igloo, nether_jail, olympus, sandy_isle, wilson
**Nether:** nether_generic

To add custom templates, place `.schem` files (WorldEdit format) in `plugins/SkyeBlock/schematics/` and add a mapping entry in `config.yml` under `island.templates`.

## Server Owners
Ensure dependencies (WorldGuard, ProtocolLib) are installed for full functionality. Adjust permissions via your chosen manager (e.g., LuckPerms) to suit your server's needs.
For autoupdating you can use a plugin like
[PluginUpdater](https://modrinth.com/plugin/plugin-updater) which you can find more info [here](https://github.com/OakLoaf/PluginUpdater/wiki/PluginUpdater-Plugin#configuring-pluginupdater)
## Building

```bash
mvn clean package
```

The built JAR includes all dependencies (H2 database, ASWM file loader) shaded in.

## Development

- Language: Java 21 (bytecode target 21)
- Build system: Maven
- Main class: `skyeblock.nobleskye.dev.skyeblock.SkyeBlockPlugin`
- Database: H2 2.3.232 (embedded, file-based)
- Source structure: `src/main/java/` for code, `src/main/resources/` for configs and schematics

## License
Licensed under the GNU Lesser General Public License v3.0 (LGPL-3.0). See LICENSE file for details.

Licensed under the GNU Lesser General Public License v3.0 (LGPL-3.0).
Loading
Loading