feat: 调整插件目录结构 根据兼容性分离

This commit is contained in:
coding
2017-11-30 05:21:52 +00:00
parent a4545051d1
commit 5a5b1d160f
4 changed files with 3 additions and 3 deletions

View File

@ -0,0 +1,24 @@
'use strict';
/**
* PAPI扩展类
*/
/*global Java, base, module, exports, require, __FILE__*/
var PlaceholderAPI;
var bukkit = require('api/server');
if (bukkit.plugin.load("PlaceholderAPI")) {
PlaceholderAPI = ext.getStatic("me.clip.placeholderapi.PlaceholderAPI");
} else {
log.w("PlaceholderAPI 未找到 变量替换功能失效!");
PlaceholderAPI = {
setPlaceholders: function () {
return arguments[1];
}
}
}
exports.$ = function () {
if (arguments.length > 1) {
return PlaceholderAPI.setPlaceholders(arguments[0], arguments[1]);
} else {
return PlaceholderAPI.setPlaceholders(null, arguments[0]);
}
};