CNPC: Dangerous Script Extension
by xiaobiniaox
CNPC: Dangerous Script Extension is a Forge add-on for CustomNPCs Unofficial 1.20.1 that exposes window-manipulation and system-level script methods to NPC scripts.
What it does
The extension gives scripts in the native CustomNPCs scripting environment access to a set of methods that act on the player's game window: one shakes the window, one rapidly hides and shows it to create a flashing effect, and one resizes it. Each method takes the player as a parameter, so a script can target a specific player on the map. The functions work directly inside CNPC scripts once the mod is installed, with no separate setup.
The mod depends on CustomNPCs Unofficial 1.20.1, which must be installed on the server and every player, and it is built on Java.type imports. Its stated purpose is to provide system-level operations that CNPC scripts cannot otherwise perform. The author notes that some features are potentially risky: the mod involves methods that resemble malware, and it is strongly recommended to grant scripting permissions only to people trusted in CustomNPCs Unofficial. The original purpose of a restriction in the base mod was to stop misuse by importing system classes to create external shell scripts, and this extension runs shell operations, which pose security risks.
The mod is published for Forge only, across six game versions 1.20.1 – 1.20.6, and it is licensed as All rights reserved, so it is not open source. It runs on the client and the server, so both need it. The latest Forge file is 1.0.5 for 1.20.1, dated 2026-05-23.
Key features
Window shake effect
A script method shakes the player's game window, taking a float or int frequency, a duration in seconds and a maximum offset in pixels.
Window hide and show
A script method rapidly hides and shows the player's window at a set interval in milliseconds for a set number of seconds, creating a flashing effect.
Window resize
A script method resizes the player's game window to the width and height given as parameters.
Native script access
The functions are called directly from CNPC scripts after installation, so no separate scripting language or command is required.
Compatibility
Latest build for each game version and loader.
Only full game releases are shown. This mod publishes no snapshot builds.
Questions
Does CNPC: Dangerous Script Extension need CustomNPCs Unofficial?
Do servers and players both need the mod?
Why is scripting permission a concern?
Which game versions does the mod support?
In the catalog
CNPC: Dangerous Script Extension is one of 29,952 Game mechanics mods on ModsFinder, and one of 13,316 Game mechanics mods for Forge. 11,154 mods support Minecraft 1.20.6.
More from xiaobiniaox
Similar mods
What the author says
This is a script extension mod based on CustomNPCs Unofficial (1.20.1), designed to provide system-level operations that would otherwise require extensive use of Java.type. While this mod does not involve any form of malware, some features are potentially risky. It is strongly recommended that you only grant…
Official listing
- Modrinth page
- modrinth.com/mod/cnpc-dangerous-script-extension
- Owner
- xiaobiniaox
- Published
- 2026-03-29
- Updated on Modrinth
- 2026-05-23
- Facts verified
- 2026-10-15
