描述
本模组提供系统级窗口操作功能。
不当或恶意使用可能会负面影响用户体验。
请负责任地使用。
这是一个基于 CustomNPCs Unofficial (1.20.1) 的脚本扩展模组,旨在提供原本需要大量使用 Java.type 才能实现的系统级操作。
虽然本模组不涉及任何形式的恶意软件,但部分功能可能存在风险。
强烈建议您在 CustomNPCs Unofficial 中仅向可信赖的人授予脚本权限。
脚本方法
moveWindow(String, int, player)
第一个参数:方向(left、right、up、down)
第二个参数:像素偏移量
将玩家的遊戲視窗朝指定方向移動。
shakeWindow(float, int, int, player)
第一个参数:频率
第二个参数:持续时间(秒)
第三个参数:最大偏移量(像素)
对玩家的游戏窗口施加抖动效果。
hideShowWindow(int, int, player)
第一个参数:间隔(毫秒)
第二个参数:持续时间(秒)
快速隐藏和显示游戏窗口,产生闪烁效果。
resizeWindow(int, int, player)
参数:宽度和高度
调整游戏窗口的大小。
crashGame(player)
立即使游戏崩溃。
(警告:在服务器上使用时,也可能导致服务器崩溃。)
当前状态
如果您正在制作具有类似《Doki Doki Literature Club!》“打破第四面墙”效果的 Minecraft 地图,本模组可能非常适合您的项目。
本模组的初衷是防止通过 CNPC 导入系统类来创建外部 shell 脚本而被滥用,这可能存在安全风险。
本模组不执行也不依赖 shell 操作。安装后,所有提供的功能均可直接在原生 CNPC 脚本环境中使用。
Description
This mod provides system-level window manipulation features.
Improper or malicious use may negatively affect user experience.
Use responsibly.
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 scripting permissions in CustomNPCs Unofficial to people you trust.
Script Methods
moveWindow(String, int, player)
First parameter: direction (left, right, up, down)
Second parameter: pixel offset
Moves the player's game window in the specified direction.
shakeWindow(float, int, int, player)
First parameter: frequency
Second parameter: duration (seconds)
Third parameter: maximum offset (pixels)
Applies a shaking effect to the player's game window.
hideShowWindow(int, int, player)
First parameter: interval (milliseconds)
Second parameter: duration (seconds)
Rapidly hides and shows the game window, creating a flashing effect.
resizeWindow(int, int, player)
Parameters: width and height
Resizes the game window.
crashGame(player)
Immediately crashes the game.
(Warning: When used on a server, this may also crash the server.)
Current Status
If you are creating a Minecraft map with “fourth wall breaking” effects similar to Doki Doki Literature Club!, this mod may be a good fit for your project.
The original purpose of this mod is to prevent the misuse of importing system classes via CNPC to create external shell scripts, which may pose security risks.
This mod does not execute or rely on shell operations. All provided functions can be used directly within the native CNPC scripting environment after installation.
评论 0
登录后参与评分
还没有评论,来抢沙发吧