mirror of
https://github.com/Verdurae/PlaceholderPlus.git
synced 2026-11-25 14:24:32 +08:00
1.1.5增量更新
增加默认示例js文件:Js/exampleJS.js,会在Js文件夹不存在的时候生成 这意味着有这个文件夹但是是空的时候就不会生成这个示例文件,省的删不掉看着它糟心,我要点名批评某几个插件
This commit is contained in:
1 parent
d4e53ea858
commit
b44410f40c
4 files changed
+31
-6
No files matched your search
@@ -0,0 +1,14 @@
|
||||
identifier = "exampleJS"
|
||||
author = "Kaminy"
|
||||
version = "1.1.5"
|
||||
|
||||
function onRequest(player, params) {
|
||||
// 示例处理 如果这个玩家是作者的话返回"这个玩家是作者"
|
||||
// 你可以写任意多的判断在这里
|
||||
// params是这个调用的js的参数,形如%exampleJS_参数1_参数2_参数3%,该方法获得的params就是一整段"参数1_参数2_参数3"作为一个参数,需要手动使用_切割
|
||||
if (player.player.getName() === author) {
|
||||
return "这个玩家是作者";
|
||||
} else {
|
||||
return "这个玩家不是作者";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user