Real-time data inspector for Minecraft β inspect, edit, compare and export any block, entity or item.
Features β’ Commands β’ Permissions β’ Configuration β’ API β’ Building β’ Project Structure
DataLens is a Bukkit plugin that gives server operators and developers a powerful lens into the internal data structures of Minecraft objects. Point at any block, entity or player, and instantly explore its full data tree β PDC tags, attributes, potion effects, enchantments, block states and more β through both a paginated chest GUI and chat commands.
Unlike simple NBT viewers, DataLens provides a complete inspect β edit β validate β diff β export pipeline with automatic rollback on failure, a built-in changelog, and a public API for third-party schema registration.
Supported platforms: Bukkit / Spigot / Paper 1.20.x β 1.21.x Β· Java 21+
- Blocks, Entities, Items & Players β inspect any object via raytrace targeting or by player name.
- Full data tree extraction β PDC keys, block states, entity attributes, potion effects, equipment, enchantments, lore, and more are captured into a hierarchical
DataNodetree. - Version-adaptive β pluggable adapter layer auto-detects the server version and loads the appropriate reader/writer (
Paper120Adapter,Paper121Adapter).
- Set / Remove any primitive value by dot-notation path (e.g.
pdc.myplugin:level). - Type validation & coercion β raw string inputs are validated against the target node's
DataTypebefore committing. - Atomic rollback β a deep-copy snapshot is taken before every write; if persistence fails the tree is restored automatically.
- Compare the live data tree against your working copy to see exactly what changed β additions, removals and modifications are displayed with color-coded chat output.
- Dump the complete data tree as JSON (via Jackson) or YAML (via SnakeYAML) directly to chat.
- 54-slot paginated inventory with navigation breadcrumbs.
- Click into compound/list nodes to drill down; use Back to navigate up.
- Color-coded type indicators, pagination controls, and one-click export.
- Every
SETandREMOVEoperation is logged toplugins/DataLens/changelog.logwith timestamps, actor, path, and old/new values. - Configurable β can be disabled entirely.
- Granular permission nodes (
datalens.inspect,datalens.edit,datalens.admin) centralized throughPermissionGuard.
- Third-party plugins can register schemas for their PDC namespaces to improve labelling and validation.
- Programmatic access to
InspectorServiceandSessionServiceviaDataLensPlugin.getAPI().
- Per-player sessions backed by a Caffeine LRU cache with configurable TTL and capacity.
- Read operations are thread-safe; writes enforce main-thread execution.
| Command | Description | Permission |
|---|---|---|
/inspect |
Inspect the block/entity you are looking at (raytrace) | datalens.inspect |
/inspect <player> |
Inspect a named online player directly | datalens.inspect |
/data set <path> <value> |
Edit a primitive value at the given path | datalens.edit |
/data remove <path> |
Delete the node at the given path | datalens.edit |
/data export [json|yaml] |
Export the inspected data tree to chat | datalens.inspect |
/data diff |
Show differences between live data and working copy | datalens.inspect |
Both commands include context-aware tab completion β paths are autocompleted from the live data tree, and values suggest type-appropriate options.
| Node | Description | Default |
|---|---|---|
datalens.inspect |
Inspect blocks, entities and items | op |
datalens.edit |
Edit inspected data values | op |
datalens.admin |
Full administrative access (inherits inspect + edit) | op |
Configuration is stored in plugins/DataLens/config.yml:
debug: false
cache:
session-ttl-seconds: 60 # Idle timeout for player sessions
max-sessions: 100 # Maximum concurrent inspection sessions
inspect:
max-ray-distance: 5.0 # Raytrace distance in blocks for /inspect
changelog:
enabled: true # Enable/disable edit logging
max-entries: 10000 # Maximum changelog entriesOther plugins can interact with DataLens programmatically:
// Obtain the API instance
DataLensAPI api = DataLensPlugin.getAPI();
// Register a schema for your PDC namespace
Schema schema = new Schema("myplugin", List.of(
new SchemaField("level", DataType.INT, "Player level"),
new SchemaField("guild", DataType.STRING, "Guild name")
));
api.registerSchema("myplugin", schema);
// Programmatic inspection
InspectorService inspector = api.getInspectorService();
InspectableObject obj = inspector.inspect(someEntity);
// Session management
SessionService sessions = api.getSessionService();
PlayerSession session = sessions.open(player.getUniqueId(), obj);Requirements: Java 21+, Gradle 8+
# Clone the repository
git clone https://github.com/Parallax-Development/DataLens.git
cd DataLens
# Build the fat JAR (output: build/libs/DataLens-<version>.jar)
./gradlew clean build
# Run a local Paper test server (requires run-paper plugin)
./gradlew runServerThe build produces a shadow JAR that bundles Jackson, Caffeine and the Adventure platform adapter. Server-provided dependencies (Spigot API, SnakeYAML) are excluded.
DataLens/
βββ build.gradle.kts # Build config (Shadow, run-paper)
βββ settings.gradle.kts # Project settings
βββ gradle.properties # Version & Gradle flags
β
βββ src/
βββ main/
β βββ java/dev/darkblade/datalens/
β β βββ DataLensPlugin.java # Plugin entry point & lifecycle
β β β
β β βββ adapter/
β β β βββ common/
β β β β βββ Adapter.java # Version-agnostic data I/O interface
β β β βββ versioned/
β β β βββ Paper120Adapter.java # Paper 1.20.x implementation
β β β βββ Paper121Adapter.java # Paper 1.21.x implementation
β β β
β β βββ api/
β β β βββ DataLensAPI.java # Public API surface for third-party plugins
β β β
β β βββ command/
β β β βββ InspectCommand.java # /inspect β raytrace & named targeting
β β β βββ DataCommand.java # /data β set, remove, export, diff
β β β
β β βββ core/
β β β βββ diff/
β β β β βββ DiffService.java # Recursive tree comparison engine
β β β βββ edit/
β β β β βββ EditService.java # Safe edit pipeline with rollback
β β β β βββ PathResolver.java # Dot-notation path resolution
β β β β βββ PathSegment.java # Path segment model (key / index)
β β β βββ inspect/
β β β β βββ InspectorService.java # Converts live objects to DataNode trees
β β β βββ serialize/
β β β β βββ SerializationService.java # JSON & YAML import/export
β β β βββ session/
β β β β βββ PlayerSession.java # Per-player inspection state & navigation
β β β β βββ SessionService.java # Caffeine-backed session cache
β β β βββ validate/
β β β βββ ValidationService.java # Type validation & coercion
β β β
β β βββ model/
β β β βββ DataNode.java # Core tree node (mutable, deep-copyable)
β β β βββ DataType.java # NBT-compatible type enum
β β β βββ InspectableObject.java # Inspected object wrapper
β β β βββ InspectableType.java # BLOCK / ENTITY / ITEM enum
β β β βββ diff/
β β β β βββ DataDiff.java # Single diff entry model
β β β β βββ DiffType.java # ADDED / REMOVED / CHANGED
β β β βββ schema/
β β β β βββ Schema.java # Namespace schema definition
β β β β βββ SchemaField.java # Individual field descriptor
β β β βββ validation/
β β β βββ ValidationResult.java # Validation outcome (ok / error)
β β β
β β βββ repository/
β β β βββ ChangeLogRepository.java # File-based edit audit log
β β β
β β βββ security/
β β β βββ PermissionGuard.java # Centralized permission checks
β β β
β β βββ service/
β β β βββ DataLensServiceLocator.java # Central service registry
β β β
β β βββ ui/
β β β βββ chat/
β β β β βββ ChatRenderer.java # Tree & diff rendering to chat
β β β βββ gui/
β β β βββ GuiListener.java # Inventory click event handler
β β β βββ InspectorGui.java # 54-slot paginated chest GUI
β β β βββ NodeRenderer.java # ItemStack rendering for data nodes
β β β
β β βββ util/
β β βββ AdapterLoader.java # Runtime version detection & adapter loading
β β βββ PathCompleter.java # Tab-completion for data paths & values
β β βββ PdcUtil.java # PDC reading utilities
β β βββ VersionUtil.java # Server version parsing
β β
β βββ resources/
β βββ plugin.yml # Bukkit plugin descriptor
β βββ config.yml # Default configuration
β
βββ test/
βββ java/dev/darkblade/datalens/
βββ core/
β βββ diff/
β β βββ DiffServiceTest.java
β βββ validate/
β βββ ValidationServiceTest.java
βββ model/
βββ DataNodeTest.java
Copyright Β© 2026 Parallax Development. All rights reserved.