Update MD Files

This commit is contained in:
Kam committed 2026-03-10 23:54:23 -04:00
1 parent 5ef50c1682
commit 60213303ae
6 files changed
+696 -92

No files matched your search

-92
View File
@@ -1,92 +0,0 @@
# CNPC+ 1.11 Beta - The Scripting Update
🟡 **In Testing**
## Features: ⚒️
- **Syntax Highlighting:**
> Full color-coded script editor. Keywords, types, variables, methods, strings, and comments are all distinct. Scope-aware coloring distinguishes local fields from globals and chained method calls.
- **Autocomplete:**
> Smart suggestions as you type. Context-aware for static vs instance access, shows method parameters, resolves chained calls, and suggests auto imports for classes. Frequently used members prioritized.
- **Error Detection:**
> Catch mistakes before running. Type mismatches, wrong arguments, missing methods, unused imports, duplicate definitions, and more -- all underlined with hover messages explaining the issue.
- **Hover Information:**
> Hover any symbol to see its type, documentation, and declaration. Works on methods, fields, classes, and even generics. Click to pin tooltips in place.
- **Script Editor Overhaul:**
> - **Line Numbers** - Gutter with current line highlighting.
> - **Go To Line** - CTRL+G to jump to any line.
> - **Search & Replace** - CTRL+F / CTRL+H with real-time highlighting.
> - **Go To Definition** - CTRL+Click to jump to any symbol.
> - **Smart Undo/Redo** - Word-level instead of character-level.
> - **Line Operations** - Duplicate, delete, move up/down.
> - **Comment Toggle** - CTRL+/ for selected lines.
> - **Rename** - Rename a symbol across all occurrences.
> - **Smooth Scrolling** - Eased scroll animation.
> - **Indent Guides** - Scope-highlighted vertical indent lines.
> - **Brace Matching** - Highlighted pairs, red for unclosed.
> - **Smart Brackets** - Auto-pairing for `{}`, `()`, `[]`, `""`, `''`.
> - **Fullscreen Mode** - Expand editor to fill the game window.
> - **Shortcut Overlay** - View all keyboard shortcuts at a glance.
- **Java Scripting (Janino):**
> Write scripts in real Java compiled at runtime. Name methods after hooks for automatic wiring. Language selector per tab to switch between Java and JavaScript. External `.java` file support.
- **Client-Side Scripting:**
> Run scripts on the client for responsive experiences. Server-controlled -- off by default, must be explicitly enabled. Script files sync automatically on login and reload.
- **Cloner Tab Overhaul:**
> Folder-based organization for saved NPCs, items, and entries. Full-width directory browser for large collections. Improved tab navigation.
- **Addon API Support:**
> Addons can ship type definitions that load into the script editor automatically. Full autocomplete, hover info, and documentation for addon APIs. Addons can extend existing CNPC+ types with new methods.
- **Animation Improvements:**
> Data store for passing data across animation events and frames. New consumer-based task system for animation lifecycle. Expanded scripting API for animation control.
**Extras**
- Player Dialog Events now work like NPC Dialog Events.
- Attack speed configuration for linked items.
- Client-side balance prediction during Trader interactions.
- Right-click cycling on multi-option NPC buttons (Hair, Eyes, Fur, etc.).
- Fixed quest cooldown for MC Custom and RL Custom timer types.
- Fixed Bard music restarting when opening dialogs.
- Fixed NPC biome spawn settings not saving after editing.
- Fixed block waypoint issues.
- Fixed script config syncing between server and client.
+347
View File
@@ -0,0 +1,347 @@
# Abilities
---
The **Ability System** adds full combat abilities to CustomNPC+. Give your NPCs powerful attacks with visual telegraphs, launch energy projectiles, set traps, chain abilities into combos, and let players unlock abilities of their own.
---
## How Abilities Work
Every ability follows a **phase-based flow**:
- **Wind-up** - The ability charges up. Telegraphs appear on the ground, animations play, and observant players can react
- **Active** - The ability fires. Damage is dealt, projectiles launch, effects apply
- **Dazed** - Optional recovery state if the ability gets interrupted during wind-up
**Settings you can configure:**
- **Cooldown** - Time before the ability can be used again. Supports both a universal cooldown and per-ability cooldowns
- **Targeting** - Aggro Target, Self, AOE on Self, or AOE on Target
- **Range** - Minimum and maximum range for activation
- **Lock Movement** - Lock the caster's movement, rotation, or both during any phase
- **Interruptible** - Allow damage to interrupt the wind-up and force a dazed state
- **Weight** - Priority weighting for NPC ability selection
- **Invulnerability** - Make the caster invulnerable during Wind-up, Active, or both
- **Ignore I-Frames** - Bypass the damage immunity timer for rapid consecutive hits
- **Free on Cast** - The ability enters cooldown the moment it fires, freeing the caster while projectiles or zones persist on their own
- **Magic Damage** - Deal magic damage as a separate damage type with configurable values and split ratios
> Abilities can be configured directly on individual NPCs or saved as **global presets** that update everywhere when edited.
---
## Melee Abilities
Close-range attacks for punishing positioning.
- **Slam** - Leap toward the target in an arc, dealing AOE damage on impact. Configure the radius, knockback, and leap height. Air slams deal reduced damage based on the required leap height
- **Heavy Hit** - A single powerful melee strike with bonus knockback and a configurable hit delay
- **Cutter** - A slashing arc attack in a cone. Configure the angle and reach
> All melee abilities support configurable damage, knockback, and potion effects on hit.
---
## Energy Projectiles
A full projectile system with deep visual customization. Energy projectiles use a **Variant System** — each base type can be configured with variants like dual-fire or barrage patterns.
### Types
- **Orb** - Homing energy spheres that track their target. Supports dual-fire and barrage variants
- **Disc** - Flat spinning projectiles with optional boomerang behavior. Supports vertical and horizontal orientation
- **Beam** - Sustained energy beams connecting the caster to their target. Supports Free Aim mode for manual aiming
- **Laser Shot** - Instant-fire hitscan projectile with configurable width and speed. No homing
### Projectile Settings
Every energy projectile shares these configurable properties:
- **Anchor Point** - Where the projectile spawns: Right Hand, Left Hand, Front, Center, Chest, or Above Head. Supports custom offset anchors
- **Display** - Core color, edge color, glow effect, transparency, and size
- **Homing** - Toggle homing, adjust turn rate and max tracking range
- **Combat** - Damage, knockback, vertical knockback, hit cooldown, and optional AOE splash
- **Hit Type** - How the projectile interacts: Single (hits one), Pierce (passes through), or Multi (hits multiple)
- **Lifespan** - Speed, max age, and max travel distance (up to 150 blocks)
- **Explosions** - Detonate on impact with configurable radius. Block damage can be toggled
---
## Energy Barriers
Defensive energy constructs that block incoming attacks.
- **Dome** - A spherical barrier centered on the caster. Blocks incoming projectiles with configurable damage multipliers, HP, and duration
- **Wall** - A flat energy panel with configurable dimensions. Has an optional launch mode that fires the wall forward, dealing damage and knockback
- **Shield** - A held energy panel that follows the caster's facing direction
**Barrier Properties:**
- HP and durability — barriers break when depleted
- Configurable melee vulnerability
- Damage absorption — attacks on the caster can be redirected to the barrier
- Ally/target filtering for which projectiles are blocked
- Custom position offsets
---
## Defensive Abilities
Reactive stances that protect the caster when hit.
- **Guard** - Reduces incoming damage by a configurable percentage. Lasts until duration expires or max hit count is reached
- **Counter** - Absorbs attacks and counter-attacks the attacker. Counter damage can be flat or a percentage of absorbed damage. Plays a counter animation on each trigger
- **Dodge** - Fully evades incoming attacks, negating all damage. Plays randomized dodge animations from up to three configurable animation slots
> All defensive abilities support configurable duration and max hit counts.
---
## Movement Abilities
Reposition the caster during combat.
- **Charge** - Rush forward in a line, damaging everything in the path. Configure speed, hit width, and knockback
- **Dash** - Quick directional movement without dealing damage
- **Teleport** - Instantly relocate to the target's position
> Charge locks direction during wind-up, so the telegraph accurately shows the attack path.
---
## AOE Abilities
Area control abilities that dominate space.
- **Shockwave** - AOE burst from the caster, dealing damage and knockback in a configurable radius
- **Sweeper** - Wide rotational sweep around the caster with configurable radius and rotation speed. Can run alongside other abilities in chains
- **Vortex** - Creates a pulling force that drags nearby entities toward the center while dealing damage
---
## Hazards & Traps
Ground-based abilities for area denial and ambushes.
### Hazards
Persistent damaging zones that continuously hurt entities inside them. Configure the damage interval, number of zones (up to 20), shape (circle or square), zone height, and duration. Can optionally affect the caster.
**Visual Presets:** Default, Toxic, Inferno, Arcane, Electric, Frost — each with themed colors, particles, and effects.
### Traps
Proximity-triggered abilities that sit dormant until an entity enters the trigger radius. Configure arm time, number of triggers, trigger cooldown, damage radius, and knockback. Traps can be hidden (invisible) until triggered.
**Trap Presets:**
- **Hidden** - Minimal visibility, pure stealth trap
- **Venom** - Applies Poison with toxic green visuals
- **Explosive** - Applies Fire with fiery orange particles
- **Cursed** - Applies Weakness with purple arcane effects
- **Shock** - Applies Mining Fatigue with blue electrical sparks
- **Snare** - Applies Slowness with icy blue visuals
### Zone Visuals
Both hazards and traps have a rich visual system with configurable ground fill, concentric rings, rotating borders, accents (static, swaying, or flickering), lightning arcs, and particle effects with multiple motion types.
---
## Ability Effect
A support ability for applying buffs, debuffs, healing, and custom effects.
**Targeting:**
- **Self** - Affect only the caster
- **AOE Self** - Area-of-effect centered on the caster
**Target Filter (AOE):**
- **Allies** - Only friendly entities (determined by Party for players, Faction for NPCs)
- **Enemies** - Only hostile entities
- **All** - Everyone in range
**What it can apply:**
- Flat and percentage-based healing (instant or over time)
- Vanilla potion effects
- Custom effects from the Custom Effect system
- Mod-registered effect actions
**Built-in Variants:** Self Heal, Healing Aura, Poison Debuff.
---
## Custom Ability
A blank-slate ability type for scripters to build fully custom abilities through script hooks.
**Script Hooks:**
- **Start** - When the ability begins
- **Execute** - When entering the active phase
- **Tick** - Every game tick with phase and tick count
- **Complete** - When the ability finishes
- **Toggle / Toggle Tick** - For toggle-mode abilities with multiple states
Full telegraph control with all shape types, configurable dimensions, colors, and duration. Supports both instant execution and multi-state toggle modes.
---
## Burst System
Abilities can fire **multiple times in rapid succession** as a single use.
- **Burst Amount** - Number of additional repetitions after the initial cast
- **Burst Delay** - Ticks between each burst
- **Replay Animations** - Optionally replay the wind-up animation on each burst
- **Overlap Mode** - Previous entities persist while the next burst fires, allowing stacking effects
> Available on most ability types including energy projectiles, melee abilities, and movement abilities.
---
## Chained Abilities
Chain multiple abilities into **sequential combos** that execute one after another.
- **Ordered Entries** - Each entry references an ability with a configurable delay before it fires
- **Wind-up All** - Optionally wind up all abilities simultaneously before the chain begins
- **Chain Cooldown** - A single cooldown after the entire chain completes
- **Chain Conditions** - Conditions checked once for the whole chain, not per-ability
### Concurrency
Specific ability types can run **concurrently** within a chain — executing alongside the primary ability instead of waiting. Concurrent-capable types include Effect, Hazard, Trap, and Sweeper.
> Chained abilities work with the ability hotbar and support live previewing in the editor.
---
## Telegraph System
**Telegraphs** are visual ground indicators that warn players before an ability lands. They appear during wind-up and shift color before the ability fires.
**Shapes:**
- **Circle** - Filled circle with configurable radius
- **Ring** - Donut shape with inner and outer radius
- **Line** - Rectangle along the attack direction
- **Cone** - Fan/wedge shape with configurable angle
- **Point** - Single point indicator
- **Square** - Square area indicator
**Features:**
- ARGB color customization for both telegraph and warning phase
- Color shifts in the final ticks before firing
- Can follow a moving entity or stay at a fixed position
- Proper ground and air height handling
- Saved as reusable presets shared across abilities
---
## Animations & Sound
Abilities integrate directly with the animation and sound systems.
- **Wind-up Animation** - Plays during charging
- **Active Animation** - Plays when the ability fires
- **Dazed Animation** - Plays during recovery
- **Animation Sync** - Optionally match wind-up duration to animation length
- **Sound Events** - Custom sounds for wind-up and active phases
- **Phase Colors** - Visual color feedback on the caster during wind-up and active
- **Multiple Animations** - Multiple animations can be registered under one common name
> Many ability types include built-in animation names that work automatically when matching animations exist.
---
## Effects & Conditions
### Potion Effects
Abilities can apply potion effects to any entity they hit. Each effect has a configurable type, duration, and amplifier. Supports preset effect types and manual potion IDs for modded effects with amplification up to 255.
**Preset Effects:** Fire, Slowness, Weakness, Poison, Wither, Blindness, Nausea, Hunger, Mining Fatigue
### Conditions
Conditions control when an ability can be used. Each condition can check the **Caster**, the **Target**, or **Both**.
- **HP Threshold** - Health above, below, or equal to a value (flat or percentage)
- **Hit Count** - Caster hit a certain number of times within a time window
- **Has Item** - Entity holding, wearing, or carrying a specific item
- **Quest Completed** - Player has completed a specific quest
- **Has Effect** - Entity has a specific custom effect applied
---
## Player Abilities
Players can unlock and use abilities with a full hotbar system.
### Ability Hotbar
The **Ability Hotbar** is a 12-slot bar for equipping abilities. Hold the **HUD Key** and use the **scroll wheel** to cycle through equipped abilities. The hotbar shows ability icons with cooldown progress and supports horizontal or vertical layouts with 3, 5, or 7 visible slots.
Configure your hotbar through drag-and-drop in the **CNPC+ Inventory Ability Tab**, and customize its appearance in the **HUD Editor** under CNPC+ Inventory Settings.
### Player Features
- **Unlock System** - Players receive abilities via scripting or commands
- **Per-Ability Cooldowns** - Each ability can have its own cooldown on top of the universal cooldown
- **Cancel on Double-Tap** - Double-tap the ability key during wind-up to cancel and enter cooldown immediately
- **Ability Visibility** - Hide or show specific abilities in the HUD
- **State Management** - Abilities are properly cancelled on logout, dimension change, death, and respawn. Movement input is suppressed during ability locks
- **Flight Safety** - Abilities do not affect players who are flying
---
## Scripting API
Full scripting support for ability lifecycle events:
- **StartEvent** *(Cancelable)* - When wind-up begins
- **ExecuteEvent** *(Cancelable)* - When the ability activates
- **InterruptEvent** - When wind-up is interrupted
- **CompleteEvent** - When the ability finishes
- **HitEvent** *(Cancelable)* - On each entity hit. Damage and knockback can be modified
- **TickEvent** - Every tick with current phase and tick count
- **PlayerAbilityEvent** - For player ability actions
### Energy Projectile Scripting
Full scripting for all energy projectile types:
- **Fired** - When the projectile launches
- **Update** - Every tick during flight
- **EntityImpact** - On hitting an entity
- **BlockImpact** - On hitting a block
- **Expired** - When the projectile's lifespan ends
### Ability Extender System
Register custom lifecycle hooks on abilities:
- **onAbilityStart** - When the ability begins
- **onAbilityTick** - Every tick during execution
- **onAbilityComplete** - When the ability finishes
- **onAbilityDamage** - When the ability deals damage
Multiple extenders can be registered per ability. Scripts are instanced — every use gets its own fresh set of variables.
---
## Ability Preview
The ability editor includes a **live preview system**. Test telegraph shapes, animations, projectile visuals, burst patterns, and chained ability sequences directly in the GUI on a dummy NPC — no world effects applied.
---
## Commands
- `/kam ability list` - List all custom abilities
- `/kam ability types` - List all registered ability types
- `/kam ability prebuilts` - List all built-in abilities
- `/kam ability info <name>` - View ability details
- `/kam ability delete <name>` - Delete a custom ability
- `/kam ability reload` - Reload abilities from disk
- `/kam ability give <player> <ability>` - Give an ability to a player
- `/kam ability remove <player> <ability>` - Remove an ability from a player
- `/kam ability giveChain <player> <chain>` - Give a chained ability to a player
- `/kam ability removeChain <player> <chain>` - Remove a chained ability from a player
- `/kam ability player` - Manage player abilities
---
+155
View File
@@ -0,0 +1,155 @@
# Auction House
---
The **Auction House** is a global player marketplace where players can list items, bid against each other, and purchase instantly. Combined with a built-in currency system, it creates a full economy for your server.
---
## Currency System
CNPC+ has a **built-in currency** used across all market features.
- **Fully Configurable** - Name it Coins, Gold, Credits — whatever fits your world. Set a starting balance and max balance cap
- **Profile Persistent** - Currency carries across all your character slots
- **Vault Support** - Integrates with Bukkit-compatible economy plugins if Vault is installed. Falls back to built-in currency otherwise
- **Lifetime Tracking** - Tracks total earned and total spent per player
> Full scripting API support for currency operations on players.
---
## Selling
List any item with a **Starting Price** for competitive bidding. Optionally set a **Buyout Price** so players can skip the wait and buy immediately. Auctions last **24 hours** by default.
- A configurable **Listing Fee** is charged when creating an auction
- A **Sales Tax** is taken from successful sales
- A configurable **minimum listing price** prevents spam listings
---
## Bidding
Compete for items by placing bids. Each bid must be at least **5% higher** than the current bid.
- **Snipe Protection** - Auctions extend when last-second bids come in, giving everyone a fair shot
- **Auto Refund** - If you get outbid, your currency is automatically returned
---
## Buyout
See something you want right now? Hit **Buy Now** to purchase instantly at the seller's Buyout Price. If you're already the highest bidder, you only pay the **difference** between your bid and the buyout.
---
## My Trades
One screen to manage all your auction activity:
- **Active Listings** - Items you're currently selling
- **Active Bids** - Auctions you're competing in
- **Ready to Claim** - Won items and currency waiting for pickup
You can **cancel** your own listings — items are returned as a claim. If there are active bids, a configurable **cancellation penalty** is charged (default 10%).
> Claims expire after **20 days**. Collect your items and currency before they're gone!
---
## Search & Sorting
Find items with search and sort tools. Search filters by both **item name** and **seller name** at the same time.
**Sort Options:**
- Newest
- Ending Soon
- Price (Low to High)
- Price (High to Low)
- Most Bids
---
## Notifications
Get notified immediately when:
- Your item **sells**
- You get **outbid**
- You **win** an auction
- Your auction **expires** with no bids
- A **claim is ready** for pickup
If you're offline, you'll get a full **claim summary** when you log back in.
---
## Trade Slots
Every player gets a limited number of **Trade Slots** (default 8). Slots are shared across Active Listings, Active Bids, **and** Pending Claims — uncollected claims take up space. Pick up your claims to free slots!
> Server owners can grant more slots via permissions (up to 45), or grant **unlimited slots** with `customnpcs.auction.trades.unlimited`.
---
## Item Blacklist
Server owners control what items can be listed on the Auction House.
**Block by:**
- **Item** - Specific registry names like `minecraft:diamond_sword`
- **Wildcard** - Patterns like `minecraft:diamond*` to block all diamond items
- **Mod** - Block all items from a specific mod
- **NBT Tag** - Block items containing certain NBT data
> **Soulbound** and **Profile-Slotbound** items are always blocked automatically. Bound items cannot be traded.
**Blacklist Commands:**
- `/kam auction blacklist add <item|mod|nbt> <value>` - Add to the blacklist
- `/kam auction blacklist remove <item|mod|nbt> <value>` - Remove from the blacklist
- `/kam auction blacklist list [item|mod|nbt]` - View blacklisted entries
- `/kam auction blacklist reload` - Reload from config
- `/kam auction blacklist check` - Check if your held item is blacklisted
---
## Auctioneer Role
A new NPC role that gives players access to the Auction House. Set the Auctioneer role on any NPC and players can interact with them to open the full Auction House — no extra setup needed.
---
## Admin Tools
### Admin Auction GUI
A management interface for server admins with three tabs:
- **Listings** - View and search all active auctions. Stop or cancel any listing
- **Create** - Create server-managed listings with custom seller names, prices, and durations
- **Claims** - Manage the global admin claims pool
### Commands
**Player Commands:**
- `/kam auction open` - Open the Auction House GUI
**Admin Commands:**
- `/kam auction list [page]` - View active auctions in chat
- `/kam auction view <player>` - View a player's auction activity
> Server owners can enable **auction logging** to track all activity — creates, bids, buyouts, sales, expirations, cancellations, and claims. Each log type can be toggled individually.
---
## Scripting API
All auction events are **cancelable**, letting scripts intercept and control behavior:
- **CreateEvent** - Before an auction is created
- **BidEvent** - Before a bid is placed
- **BuyoutEvent** - Before an instant purchase
- **CancelEvent** - Before a listing is cancelled
- **ClaimEvent** - Before a claim is collected
---
+63
View File
@@ -0,0 +1,63 @@
# NPC, Animation & Tool Improvements
---
A collection of improvements to NPCs, animations, items, and tools added alongside the major feature updates.
---
## Cloner Tab Overhaul
The Cloner now supports **folders** for organizing your saved NPCs, items, and entries.
- **Folder System** - Create folders and subfolders to organize the cloner however you like. Works for animations, abilities, forms, auras, outlines, effects, and linked items
- **Full Screen Browser** - A new full-width directory view for browsing large collections
- **Improved Tabs** - Better tab navigation for switching between cloner categories
- **Quick Tags** - Tag-based filtering for fast searching within the cloner
---
## Animation Improvements
- **Data Store** - Animations can store and pass data across events and frames for complex animation logic
- **Task System** - A new consumer-based system for reacting to animation lifecycle events
- **Expanded API** - More animation control exposed to the scripting API
---
## Animated Textures
Items and effects now support **frame-based animated textures**.
- **Linked & Scripted Items** - Configure animated textures with custom frame count and frame time
- **Custom Effects** - Custom effect icons support animation with the same frame system
- **Ability Icons** - Ability icons in the hotbar support animated textures
- **Scripted GUI** - Textured rectangles in scripted GUIs support animation
- **Configurable** - Set frames per row, ticks per frame, and interpolation between frames
---
## NPC API Additions
New scripting API properties for finer control over NPCs:
- **Hitbox Data** - Scale NPC hitbox width and height independently via `IHitboxData`
- **Tint Data** - Control hurt tint (damage flash) and apply persistent color tints with alpha via `ITintData`
- **Behavior Properties** - Sprint, swim, door interaction, fire reactions, tactical chance, and walking range are now scriptable
- **Sound Control** - Full sound management via `ISound` with volume, pitch, repeat, and position
- **Error Reporting** - Script exceptions now report to the Script Console with full stack traces instead of failing silently
---
## Additional Changes
- **Linked Item Attack Speed** - Added attack speed configuration to linked items
- **Right-Click Cycling** - Multi-option NPC buttons (Hair, Eyes, Fur, etc.) can be right-clicked to cycle backwards
- **Legacy Quest Import** - Support for importing quest data from legacy CustomNPCs 1.6.4 format
- **Quest Cooldown Fix** - Fixed cooldown not working for MC Custom and RL Custom timer types
- **Bard Music Fix** - Fixed music restarting or duplicating when opening dialogs
- **Biome Spawn Fix** - Fixed NPC biome spawn settings not saving after editing
- **Block Waypoint Fix** - Fixed issues with block waypoints
- **Script Config Fix** - Fixed script configuration not syncing between server and client
---
+91
View File
@@ -0,0 +1,91 @@
# Script Editor & Scripting Enhancements
---
The script editor has been rebuilt from the ground up into a **full-featured code editor** right inside Minecraft, with syntax highlighting, autocomplete, error detection, and support for writing scripts in Java.
---
## Script Editor
### Writing Code
- **Syntax Highlighting** - Keywords, types, variables, methods, strings, and comments are color-coded automatically. Local variables, global fields, and chained method calls each get their own color
- **Autocomplete** - Smart suggestions for methods, fields, and classes as you type. Knows whether you're in a static or instance context. Frequently used members appear first, and the cursor is placed between parentheses when a method has parameters
- **Auto Imports** - Type a class name and the editor suggests the correct import
- **Error Detection** - Catches mistakes before you run your script. Wrong argument types, missing methods, type mismatches, and unused imports are underlined with detailed error messages on hover
- **Built-in Globals** - Objects like `Math`, `JSON`, `Date`, and `Number` are recognized automatically in JavaScript mode. Script variables like `npc`, `world`, and `event` are also recognized
> Hover over any symbol to see its **full type information**, documentation, and declaration. Hover tooltips support JSDoc with markdown formatting, headings, code blocks, and scrolling for long documentation.
---
### Navigation
- **Go To Line** - `CTRL+G` jumps to any line
- **Search & Replace** - `CTRL+F` to search, `CTRL+H` to replace. All matches highlight in real-time
- **Go To Definition** - `CTRL+Click` any method, field, or type to jump to its definition
- **Fullscreen Mode** - Expand the editor to fill your entire game window
---
### Editing
- **Undo/Redo** - Smart undo that works on whole words, not individual characters
- **Duplicate Line** - `CTRL+D` to duplicate the current line
- **Comment Toggle** - `CTRL+/` to comment or uncomment selected lines
- **Rename** - Rename a variable or method and every occurrence updates at once
- **Move Lines** - Move lines up or down with shortcuts
- **Copy Whole Line** - Copy with nothing selected grabs the entire line
- **Triple Click** - Select an entire line instantly
---
### Visual Polish
- **Line Numbers** - Clean gutter with current line highlighting
- **Smooth Scrolling** - Eased scroll animations
- **Indent Guides** - Vertical lines showing nesting depth, with the current scope highlighted in green
- **Brace Matching** - Matching `{}` braces light up, unclosed braces turn red
- **Smart Brackets** - Typing `{` auto-creates the closing `}` with correct indentation. Same for `()`, `[]`, `""`, and `''`
- **Resizable Panels** - Autocomplete and hover panels can be resized and panned
- **Keyboard Shortcut Overlay** - Press a button to see all available shortcuts
---
## Java Scripting (Janino)
Write scripts in **real Java** instead of JavaScript. Powered by the **Janino** compiler, your Java code is compiled and runs natively.
- **Full Java Language** - Classes, interfaces, enums, generics, lambdas — everything you know from Java
- **Automatic Hook Resolution** - Name your methods after the hook you want (e.g., `init`, `tick`, `interact`) and they're wired up automatically
- **Language Selector** - Each script tab has a dropdown to choose between JavaScript and Java. Mix and match across tabs
- **External Files** - Write `.java` scripts in an external editor and they load automatically
> Java and JavaScript scripts coexist side by side. Pick whichever language fits your workflow.
---
## Client-Side Scripting
Scripts can now run **on the client** for responsive, visual experiences.
- **Server Controlled** - Server owners decide whether client scripting is allowed. Players can't enable it themselves
- **Automatic Sync** - Script files are sent from the server to all clients on login, and re-synced on script reload
- **Safe by Default** - Off by default, must be explicitly enabled in the server config
> Client-side scripts open the door to custom UI effects, visual feedback, and client-only hooks — all while the server stays in control.
---
## Addon API Support
Addon developers can ship **type definitions** alongside their mods, giving scripters full autocomplete and documentation for addon APIs.
- **Automatic Loading** - Any mod can include API definitions and they appear in the script editor automatically
- **Patch Support** - Addons can extend existing CNPC+ types with new methods (e.g., a DBC addon adding `getDBCPlayer()` to the Player type)
- **Full Documentation** - Parameter names, return types, and descriptions show up in autocomplete and hover info
> Scripters get autocomplete for addon APIs with zero setup. Addon developers just include their definitions.
---
+40
View File
@@ -0,0 +1,40 @@
# Trader Enhancements
---
Traders have been upgraded with a **stock system** and **currency integration**, turning them into proper shops with limited supply and real economy support.
---
## Stock System
Traders now support **limited stock** with automatic restocking.
**Stock Modes:**
- **Global** - All players share the same stock pool. When an item sells out, it's gone for everyone until restock
- **Per-Player** - Each player has their own purchase limits. One player buying out stock doesn't affect others
**Restock Timers:**
- **MC Daily / Weekly** - Restock based on Minecraft time
- **RL Daily / Weekly** - Restock based on real-life time
- **Custom** - Set your own interval in MC ticks or real-time
Stock counts, out-of-stock indicators, and restock timers are all visible directly in the trade interface so players know exactly what's available.
> Admins can manually reset stock or cooldowns via the Trader GUI.
---
## Currency Trades
Trades can now require **currency on top of items**. Combine material costs with coin costs for balanced economy progression.
For example, a diamond sword might cost 3 diamonds **plus** 500 coins — creating more meaningful economic choices.
---
## Balance Preview
A **client-side balance preview** shows your expected balance during trades, so you can see exactly how much you'll have left before confirming a purchase.
---