
Skript 是一个 Paper 插件,使管理员能够为其服务器创建独特且富有启发性的功能。它易于使用,无需任何先验经验即可上手。对于已经知道如何编写插件的人来说,Skript 使得构建原型变得轻松,这些原型随后可以发展成为完整的插件。总的来说,Skript 完全有能力创建一个功能丰富的服务器体验。
关于 Skript
最初由 Njol 于 2011 年在 dev.bukkit.org 上发布,Skript 一直致力于包容性编程。Skript 是一种易于使用的语言,为服务器管理员提供了一条路径,使他们能够轻松地为他们的 Minecraft 服务器创建独特且富有启发性的功能,而无需任何先验经验。如今,该项目已在 GitHub 上继续发展,并且完全由社区制作而成。随着成千上万次的贡献和社区投入的大量时间用于持续开发,Skript 成为了任何服务器所有者都非常强大的插件。
与其他脚本插件不同,Skript 的语法易于理解和使用。重点在于任何人都能编写和阅读的简单英语句子。没有奇怪的语法模式、换行符或复杂的设置。此外,还有一个庞大、乐于助人且快速增长的社区为你提供所需的支持和指导。
特性
Skript 内置了丰富的语法,可用于构建简单和复杂的创作。
自然语法
简单易用且易于理解的英语句子驱动着 Skript 来定制你的服务器。
自定义命令
定义自定义命令以集成你的创作,或者覆盖现有命令以改变其行为。
函数
无需复制粘贴。函数允许你反复运行相同的代码,并支持可定制的输入。
有效的错误消息
虽然传统错误对初学者来说可能更难理解,但 Skript 专注于尽可能简单地呈现它们。如果 Skript 无法为你修复错误,它会以清晰的术语报告哪里出了问题。
可扩展性
社区继续构建增强 Skript 功能的附加组件。如果 Skript 不能做某事,很可能有人已经将其作为附加组件实现了。
例如,使用 Skript 可以轻松构建一个简单的家庭系统:
command /sethome:
permission: skript.home # 此命令所需的权限
description: 设置你的家 # 此命令的描述
executable by: players # 控制台将无法运行此命令
trigger: # 当有人执行 /sethome 时将运行的实际触发器/代码
# 为发送者的位置设置一个唯一变量
set {home::%player%} to location of player
# 向发送者发送一条消息
message "Set your home to <grey>%location of player%<reset>"
command /home:
permission: skript.home
description: 传送你自己到你的家
trigger:
# 检查我们在 /sethome 中使用的变量是否已设置(换句话说,玩家是否曾经运行过 /sethome)
if {home::%player%} is not set:
message "<red>You have not set your home yet! Run /sethome first."
stop trigger # 在此处停止代码,下面的行将不会运行
# 将玩家传送到他们的家
teleport player to {home::%player%}
send "<lime>You have been teleported to your home."
要求
Skript 需要 Paper 才能工作。你没听错,Spigot 无法正常工作。
Skript 支持从 Skript 最新版本发布之日算起的最近 18 个月的 Minecraft 版本。
当新的 Minecraft 版本发布时,我们将尽快提供支持。值得注意的是,最新版本的 Skript 可能在新版本上能正常运行,但不支持任何新功能。
下载 Skript、插件和脚本
Skript
你可以通过点击上方的下载按钮下载 Skript 的最新稳定版本。对于预发布版本,请参阅项目的 GitHub releases 页面。与任何插件一样,将下载的 Skript 文件放入服务器的 plugins 文件夹中。重启服务器,一旦加载完成,你就可以开始使用了。
Addons
Addons 的设置方式与任何插件相同。将下载的文件放入服务器的 plugins 文件夹并重启。某些 Addons 可能有不同的设置或需要进行调整。请务必查看 Addon 的下载页面以获取任何安装说明。
Scripts
创建新脚本很简单。只需在 Skript 的 scripts 目录中创建一个新 .sk 文件。安装脚本的方式与此相同:只需将其移动到相同的 scripts 目录即可。然后,你可以使用 /sk reload <file name> 加载该脚本。
遇到 Skript 问题?
如果你在使用 Skript 时遇到意外行为,可以在我们的 GitHub Repository 上报告为 issue。请注意,此平台仅用于 bug 报告。如果你需要关于脚本的帮助,请查阅下面链接的资源。
资源
获取帮助
社区支持可通过 skUnity Discord 服务器 和 SkriptHub Discord 服务器 获得。skUnity 还提供 面向 Skript 新手的教程。
Skript 文档
教程可在我们的文档站点找到:docs.skriptlang.org。您还可以在此处找到 Skript 提供的所有语法列表。社区构建的文档也可在 skUnity 和 SkriptHub 上获取。
附加组件与脚本
你可以从多个社区平台找到大量附加组件和脚本,包括 skUnity 和 SkriptHub。如同任何能够修改服务器功能的插件或工具一样,在安装时需保持谨慎。
为 Skript 做出贡献
Skript 是一个大型项目,由许多协同工作的部分构成。如果你是 Java 新手,Skript 可能不适合你。由于 Skript 的规模及其开发历史,参与该项目需要具备 Java 编程经验。建议通过探索为其构建的各种附加组件(见下文)来熟悉 Skript 的代码库。有意贡献者应查阅我们的 贡献指南。

Skript is a Paper plugin that enables administrators to create unique and inspiring features for their servers. It is simple to use with no prior experience necessary. For those who already know how to write plugins, Skript makes it easy to build prototypes that can later be developed into full plugins. Altogether, Skript is more than capable of creating a feature-rich server experience.
About Skript
Originally released in 2011 on dev.bukkit.org by Njol, Skript has always been about inclusive programming. Skript is an easy-to-use language that provides a path for server admins to easily create unique and inspiring features for their Minecraft server with no prior experience necessary. Today, the project lives on GitHub and is completely community made. With thousands of contributions and community hours poured into continued development, Skript is a very powerful plugin for any server owner.
Unlike other scripting plugins, Skript's syntax is easy to understand and follow. The focus is on simple English sentences that can be written and read by anyone. No odd syntax patterns, line breaks, or difficult setups. Plus, a large, helpful, and rapidly growing community exists to provide you with the support and directions you need.
Features
Skript is packed with useful syntax for building both simple and complex creations.
Natural Syntax
Simple-to-use and easy to understand English sentences power Skript to customize your server.
Custom Commands
Define custom commands to integrate your creations or override existing ones to change their behavior.
Functions
No need to copy and paste. Functions allow you to run the same code over and over again with customizable inputs.
Effective Error Messages
While traditional errors can be harder to understand for beginners, Skript focuses on presenting them as simply as possible. If Skript is unable to fix your error for you, it will report back in clear terms what went wrong.
Extendable
The community continues to build addons that further enhance Skript's capabilities. If Skript cannot do something, it is likely that someone has built as an addon that can.
As an example, it is easy to build a simple home system with Skript:
command /sethome:
permission: skript.home # Permission required for this command
description: Set your home # Description of this command
executable by: players # Console won't be able to run this command
trigger: # The actual trigger/code that will run when someone do /sethome
# Set a unique variable to sender's location
set {home::%player%} to location of player
# Send a message to the sender
message "Set your home to <grey>%location of player%<reset>"
command /home:
permission: skript.home
description: Teleport yourself to your home
trigger:
# Check if that variable we used in /sethome has been set (in other words, if player ever ran /sethome)
if {home::%player%} is not set:
message "<red>You have not set your home yet! Run /sethome first."
stop trigger # stop the code here, lines below won't run
# Teleport the player to their home
teleport player to {home::%player%}
send "<lime>You have been teleported to your home."
Requirements
Skript requires Paper to work. You heard it right, Spigot does not work.
Skript supports the last 18 months of Minecraft versions, counting from the release date of Skript's newest version.
When new Minecraft versions are released, we will work as quickly as possible to support them. It is worth noting that the latest version of Skript may work fine on new versions, but without support for any new features.
Downloading Skript, Addons and Scripts
Skript
You can download the latest stable version of Skript by clicking the download button above. For pre-releases, see the project's GitHub releases page. As with any plugin, place the downloaded Skript file inside the server's plugins folder. Restart the server, and once it loads, you will be ready to begin.
Addons
Addons follow the same setup as any plugin. Place the downloaded file into the server's plugins folder and restart. Some addons may have different setups or require tweaking. Be sure to review the addon's download page for any installation instructions.
Scripts
Creating a new script is easy. Simply create a new .sk file in Skript's scripts directory. Installing a script works the same way: simply move it to that same scripts directory. Then, you can load the script using /sk reload <file name>.
Having an Issue with Skript?
If you experience unexpected behavior with Skript, you can report it as an issue on our GitHub Repository. Understand that this platform is for bug reports only. If you need help with your scripts, please review the linked resources below.
Resources
Getting Help
Community support is available through the skUnity Discord Server, and the SkriptHub Discord Server. skUnity also hosts tutorials for those new to Skript.
Skript Documentation
Tutorials are available on our documentation site: docs.skriptlang.org. You will also be able to find a list of all syntax Skript has to offer. Community-built documentation is available on skUnity and SkriptHub too.
Addons and Scripts
You can find a wide selection of addons and scripts from multiple community platforms, including skUnity and SkriptHub. As with any plugin or tool that has the ability to modify your server's functionality, take caution in what you install.
Contributing to Skript
Skript is a large project with many parts working together. If you are new to Java, Skript is not the project for you. Due to Skript's size and development history, working on the project demands prior Java experience. It can be useful to familiarize yourself with Skript's codebase by exploring many of the addons that have been built for it (see below). Anyone interesed in contributing should review our contributing guidelines.
评论 0
登录后参与评分
还没有评论,来抢沙发吧