Compare commits

..

430 Commits

Author SHA1 Message Date
4435a239d4 v0.28.0-beta.5 2023-10-25 14:32:22 +08:00
4cc5e75f1d chorn: update build config 2023-10-25 12:07:15 +08:00
188641d57a chorn: remove npmignore use files limit 2023-10-25 12:04:43 +08:00
9a25362140 v0.28.0-beta.4 2023-10-25 11:48:18 +08:00
54eaae96bd feat: use pnpm & lock core-js shim 2023-10-25 11:29:01 +08:00
5bf4b1c09e feat: use files limit package file 2023-10-19 17:24:52 +08:00
54bea62735 bump: update deps version 2023-09-12 11:50:38 +08:00
0e4ae5d74f v0.28.0-beta.3 2023-08-16 11:50:54 +08:00
bdad4136ec fix: websocket close logic 2023-08-16 11:47:36 +08:00
a0866c1085 feat: add plugin self method 2023-08-12 17:14:57 +08:00
afd3f91a3f delete: amqp kv web spring package 2023-08-12 17:13:41 +08:00
e70c78a255 v0.28.0-beta.2 2023-08-08 18:11:44 +08:00
9cfac1672a feat: optimize websocket client 2023-08-08 18:06:34 +08:00
9126ec8035 v0.28.0-beta.1 2023-07-30 16:46:42 +08:00
23bc6068b5 feat: optimize websocket client 2023-07-30 16:46:34 +08:00
27b428fbe2 v0.28.0-beta.0 2023-07-26 17:37:26 +08:00
c07f1131c4 refactor: optimize plugin system 2023-07-26 17:35:33 +08:00
002f2c47c6 v0.27.6 2023-07-19 18:22:35 +08:00
8633d9ea95 fix: particle spawner error 2023-07-19 18:21:56 +08:00
07a5d0c8de feat: add plugin checker
Signed-off-by: MiaoWoo <admin@yumc.pw>
2023-02-18 16:01:15 +08:00
dd76e563c8 feat: add qrcode package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2023-02-18 15:21:42 +08:00
7b85ff5b7c feat: 同步 socket.io 上游代码
Signed-off-by: MiaoWoo <admin@yumc.pw>
2023-02-09 13:49:48 +08:00
359aeb9d63 chore: remove client package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2023-02-09 12:44:04 +08:00
3901d9fb5f feat: 更新依赖版本
Signed-off-by: MiaoWoo <admin@yumc.pw>
2023-02-08 17:03:17 +08:00
c2867da047 v0.26.0 2023-02-08 16:24:09 +08:00
65832c9fae feat: 完善粒子播放
Signed-off-by: MiaoWoo <admin@yumc.pw>
2023-02-08 16:23:05 +08:00
d9dffa704d v2.25.1 2022-11-28 17:30:45 +08:00
b39f29de6a v2.25.1-beta.1 2022-11-28 17:18:50 +08:00
56334c6f6e v0.25.1-beta.0 2022-11-28 17:15:39 +08:00
72673b2a67 feat: optimize event slow exec cache
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-28 17:14:29 +08:00
597bdb721a v0.25.0 2022-11-22 17:37:54 +08:00
6e0456d777 feat: 添加注释
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-22 17:35:13 +08:00
fb67b06230 v0.25.0-beta.0 2022-11-22 17:12:22 +08:00
203560dcf2 chore: add --verify-access
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-22 17:10:15 +08:00
3f58f5992c style: xml-http-request.ts
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-22 15:50:54 +08:00
ac16754c9c fix: buffer polyfill error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-22 13:48:41 +08:00
42d637dd63 fix: rename Buffer to BufferPolyfill
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-21 23:27:12 +08:00
df0d246136 feat: upgrade socket.io to v4
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-21 23:18:39 +08:00
e563e1b507 feat: update chat to 1.19.2
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-21 23:17:14 +08:00
3b822c613a dep: update dependencies
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-11-21 14:29:17 +08:00
2967c2a1fe v0.24.3 2022-10-14 14:12:02 +08:00
1c579c9789 feat: framework optimization
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-10-14 10:07:36 +08:00
2fe9bce2ea v0.24.2 2022-07-17 07:13:54 +08:00
496d278a93 fix: item fromJson error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-07-17 07:11:36 +08:00
bdf674b678 v0.24.1 2022-07-07 00:54:16 +08:00
67fe13deac fix: migrate config error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-07-07 00:51:10 +08:00
30846cdc87 v0.24.0 2022-07-06 22:01:09 +08:00
d8d03149df fix: some bug
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-07-06 21:57:36 +08:00
b6d7847a79 v0.23.0 2022-06-20 00:59:07 +08:00
58f59f8260 v0.23.0-beta.0 2022-06-20 00:57:37 +08:00
f3fa14990f v0.23.0-alpha.0 2022-06-20 00:52:40 +08:00
15d1f8392b release: v0.23.0
1. add item api
2. support rollup source map
3. fix database drvice error
4. support loliserver
5. support 1.19 bukkit chat
6. config add migrate options
7.

Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-06-20 00:48:00 +08:00
b5fac23c5c v0.22.0 2022-05-21 15:05:14 +08:00
148f6c28c4 feat enable faster load mode
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-05-21 11:54:40 +08:00
880065495e feat: add database web manager
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-05-21 11:54:09 +08:00
7fc70a92d5 v0.21.2 2022-05-14 16:44:25 +08:00
df6da12a8a feat: modify package description
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-05-14 16:43:50 +08:00
082f2b8f73 v0.21.0 2022-05-14 16:28:17 +08:00
7cd85f3f34 feat: add verify package signle
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-05-14 11:55:05 +08:00
073cf6aaac Revert "feat: lerna link convert"
This reverts commit 4ee8fc9a20.
2022-05-14 10:45:06 +08:00
43aa39b86f feat: remove verify package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-05-14 09:54:15 +08:00
cb58fbdb6c feat: add verify package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-05-13 23:50:02 +08:00
86aacf1a1f feat: optimize ioc loader
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-05-11 10:56:47 +08:00
47413c6766 feat: refactor database
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-05-11 10:54:44 +08:00
4ee8fc9a20 feat: lerna link convert
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-26 07:52:43 +08:00
8d0484eefb feat: add loadMavenDepend & optimize database
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-25 00:41:11 +08:00
579d89ae89 feat: update dependencies
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-21 07:25:55 +08:00
010f561766 v0.20.0 2022-04-19 10:04:56 +08:00
848aacd991 feat: add beta publish script
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-19 09:56:37 +08:00
ab5559b26f v0.20.0-alpha.0 2022-04-19 09:40:08 +08:00
46729b9cf0 feat: optimize config loader
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-19 09:29:57 +08:00
83cad2f52e v0.19.8 2022-04-04 05:17:27 +08:00
a5cb084767 feat: remove global initialize
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-04 05:13:24 +08:00
16ab108186 v0.19.7 2022-04-04 04:28:12 +08:00
a1df719dc9 fix: 修复子命令权限处理异常
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-04 04:27:47 +08:00
41e5754492 v0.19.6 2022-04-03 03:10:13 +08:00
866d1dd62c fix: api interface error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-03 03:07:18 +08:00
8056d3060d v0.19.5 2022-04-03 02:43:11 +08:00
b8440b83de feat: add exit event
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-03 02:41:17 +08:00
b55e662f81 feat: add more event emit
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-02 16:51:08 +08:00
db526e9444 fix: 修复自动化命令参数错误
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-02 15:02:21 +08:00
1b0ea9fa05 v0.19.0 2022-04-01 17:35:48 +08:00
143c960da5 feat: new mjs scanner
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-04-01 17:18:32 +08:00
30fd065bc5 v0.18.0 2022-02-13 00:13:57 +08:00
f4c04829b1 upgrade: dependencies version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-02-12 23:00:24 +08:00
6816e51239 feat: add molang package
1. upgrade bukkit chat
2. fix config update error

Signed-off-by: MiaoWoo <admin@yumc.pw>
2022-02-12 16:29:40 +08:00
5ed61829e1 feat: update typescript version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-12-26 01:21:06 +08:00
72173b4778 v0.17.0 2021-11-04 09:28:18 +08:00
4ee300a22b feat: 优化WebSocket客户端 兼容1.7.10
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-11-04 09:07:48 +08:00
476d98b9c7 feat: 优化websocket
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-10-25 15:56:23 +08:00
cf9153c134 feat: 新增公告接口
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-10-25 15:54:38 +08:00
b3fa8790e3 chore: 依赖版本更新
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-08-14 12:45:38 +08:00
27dafe3307 feat: 配置文件调试日志限制500字符
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-08-14 12:44:58 +08:00
53502e12cf feat: 完善client相关功能 重构server部分
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-08-14 12:43:20 +08:00
774763be13 v0.16.3 2021-08-05 14:39:53 +08:00
cabf09e247 feat: 优化WebSocket客户端 支持WSS
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-08-05 14:35:17 +08:00
2fd10140cf v0.16.2 2021-08-03 17:59:49 +08:00
7afea75454 feat: 更新插件管理模块
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-08-03 17:56:11 +08:00
8a2b0d7c2e chore: 优化部分逻辑
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-08-03 17:30:53 +08:00
586b6acbbc feat: 更新WebSocket 优化逻辑
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-08-03 16:59:43 +08:00
def62e2940 v0.16.1 2021-07-14 15:48:56 +08:00
18329f0a4c chore: 更新依赖版本
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-07-14 15:48:42 +08:00
39612a1ff3 feat: 修改默认超时时间
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-07-14 15:46:32 +08:00
ea1dd6f9ae v0.16.0 2021-07-10 18:28:43 +08:00
66eaf6b8b0 chore: update depends 2021-07-10 18:28:22 +08:00
157782b43e feat: 优化XHR相关功能
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-07-10 18:14:55 +08:00
51fd13e734 v0.15.0 2021-06-22 15:58:29 +08:00
293c69a605 feat: remove some debug output
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-06-22 15:51:50 +08:00
88e59231da feat: add openjdk nashorn shim
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-06-22 15:51:28 +08:00
02dbf535bc refactor: optimize config & plugin load
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-06-22 15:51:13 +08:00
a4368cc9ba feat: bukkit chat support 1.17
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-06-22 15:24:08 +08:00
dbe9657b26 feat: update depends
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-06-22 15:23:47 +08:00
d486e2ab19 feat: add push script
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-03-27 15:29:22 +08:00
293b4e265b v0.14.1 2021-03-27 11:38:56 +08:00
bf34552321 fix: new ts version build error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-03-27 11:35:54 +08:00
4f41357953 v0.14.0 2021-03-26 17:20:41 +08:00
b2177683de chorn: update depends version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-03-26 17:20:22 +08:00
081a934747 feat: update client
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-03-26 16:43:14 +08:00
4f5c9bafa1 fix: config value update error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-03-26 16:42:45 +08:00
1ff3a5ae62 refactor: optimize websocket server
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-03-26 16:42:02 +08:00
93f44e5a00 refactor: rename ployfill to polyfill
Signed-off-by: MiaoWoo <admin@yumc.pw>
2021-03-26 16:18:11 +08:00
67aa4302e0 v0.13.0 2020-12-17 17:04:30 +08:00
df1646dc15 feat: export server & client
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-12-17 17:01:09 +08:00
48cc6325b8 feat: add netty WebSocket client
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-12-17 17:00:27 +08:00
f42d5d12ed feat: js task limit exec time default 3s
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-12-17 17:00:00 +08:00
6617171472 fix: java file lineNumer lose
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-12-17 16:59:06 +08:00
f35c8cd3fb feat: add compile plugin info
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-12-17 16:58:37 +08:00
BuildTools
aa182fb169 v0.12.0 2020-12-07 11:19:12 +08:00
8a15a5398f fix: java thread need direct callback socket
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-12-07 11:13:30 +08:00
ad85c3bc9b feat: 新增Native插件管理
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-12-07 11:12:49 +08:00
a3cbe455a1 feat: 新增粒子相关API(未完成)
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-12-07 11:11:13 +08:00
BuildTools
f7a228975f v0.11.0 2020-11-20 14:26:15 +08:00
299a8e7791 fix: sponge task & command error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-11-20 14:22:28 +08:00
af1e64767a perf: optimize websocket logic
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-11-20 14:21:57 +08:00
f31726e98b feat: support full nodejs event loop
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-11-20 10:28:30 +08:00
4bb2337f39 refactor(core): core task function
move event loop task to @ccms/micro-task thread

BREAKING CHANGE: setTimeout & setInterval no longer run on main thread

Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-11-18 16:32:09 +08:00
c5fac44362 refactor(websocket): upgrade socket.io
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-11-18 16:21:56 +08:00
BuildTools
d7e757bcf8 v0.10.1 2020-11-13 10:02:21 +08:00
c013d0eec5 upgrade: dependencies version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-11-13 09:52:32 +08:00
7f5929bc87 feat: optimize websocket
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-11-13 09:40:47 +08:00
d769a9c8ca fix: task disable error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-11-13 09:40:34 +08:00
c64d167893 v0.10.0 2020-10-31 11:41:26 +08:00
0776d0ddeb feat: optimize config save logic
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-31 11:40:38 +08:00
3f101ca250 feat: add protocol package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-31 10:20:41 +08:00
85f2bd5a10 feat: optimize framework & support depends check
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-13 09:24:58 +08:00
c172bcfad7 v0.9.9 2020-10-02 20:00:31 +08:00
1d2a528bbb fix: continer Autowired error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-02 19:57:10 +08:00
d80e858a89 v0.9.8 2020-10-02 18:59:52 +08:00
24fc6dc464 feat: add .editorconfig
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-02 18:54:28 +08:00
e38666f12d feat: define config save & load
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-02 18:53:31 +08:00
c7079dd82e fix: Autowired Java class error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-02 18:48:37 +08:00
0fea6b5537 fix: server method error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-02 16:43:18 +08:00
00a84fb58a feat: hide internal function
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-02 16:21:09 +08:00
80fbc071ed refactor: update type define
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-10-02 16:20:33 +08:00
14f20897d6 feat: update javatypes version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-26 14:50:04 +08:00
a84b82d206 v0.9.7 2020-09-25 10:13:59 +08:00
80111d5ada fix: config inject error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-25 10:12:28 +08:00
fb7e27af82 v0.9.6 2020-09-24 19:26:04 +08:00
e9a2aa9745 refactor: plugin system & config manager
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-24 18:36:10 +08:00
4741e341b7 v0.9.5 2020-09-24 15:36:45 +08:00
1b4b249859 fix: command tab complate error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-24 15:27:34 +08:00
78100e8696 v0.9.4 2020-09-24 13:51:39 +08:00
d0a0e2dd71 feat: compatible 1.8.8 chat
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-24 13:48:14 +08:00
7962aa5da0 fix: sponge command dispatch error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-24 10:51:31 +08:00
0667201605 feat: update client support mcsso
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-24 10:33:38 +08:00
afd04ed972 fix: command registry error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-24 10:33:16 +08:00
9c137574f5 refactor: extract proxy & fix bungee chaneel
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-24 10:31:20 +08:00
6597b261fd feat: update dependencies version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-23 17:52:15 +08:00
8432f7fbab v0.9.3 2020-09-23 11:26:09 +08:00
e731de2162 fix: bungee task error 2020-09-23 11:25:53 +08:00
b87fb08d1c feat: optimize task impl
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-22 18:42:39 +08:00
e7077b1315 feat: add bungee proxy
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-22 17:36:32 +08:00
05e9feee9b feat: update Autowired & support command alias
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-22 17:36:04 +08:00
af85703bd9 refactor: chat & command tabComplete
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-09-22 15:29:12 +08:00
68a996f830 v0.9.2 2020-09-17 17:45:04 +08:00
8f944e0b14 feat: update ms system 2020-09-17 17:44:48 +08:00
6910ea3e26 v0.9.1 2020-08-14 16:09:46 +08:00
d01938487a fix: bukkit chat init error & config save error 2020-08-14 16:05:44 +08:00
606f097989 v0.9.0 2020-07-28 09:51:56 +08:00
a3cf4fa476 feat: optimize plugin event registry
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-28 09:41:10 +08:00
3c1ff6ea41 feat: impl bukkit chat api
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-28 09:39:52 +08:00
2990cdc4aa feat: add chat api
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-28 09:39:15 +08:00
f301d130f9 revent: qrcode.ts
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-27 01:08:45 +08:00
0ae4764c85 backup: new qrcodeSigned-off-by: MiaoWoo <admin@yumc.pw>
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-27 01:07:35 +08:00
8def6257df fix: readSourceMap split error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-26 21:33:58 +08:00
f62d198166 feat: add keyvalue package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-24 18:45:56 +08:00
0c71bc3582 v0.8.4 2020-07-23 14:22:30 +08:00
ea99cbea1d feat: opitmize plugin manager
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-23 13:44:55 +08:00
b400ab81f0 feat: add qrcode lib
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-23 13:44:39 +08:00
63ff11def1 fix: reflect method error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-11 15:08:02 +08:00
b1a4c65adb fix: unregistry controller error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-06 17:41:50 +08:00
9b28cd4de0 feat: debug print error stack
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-06 17:41:15 +08:00
e55d48d713 feat: add plugin web stage
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-06 16:10:33 +08:00
3ea72f0aac feat: add ServerChecker
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-06 16:07:16 +08:00
fe1ee3883a fix: spring tab complate error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-06 16:07:00 +08:00
083a01f29f feat: split plugin ext stage exec
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-06 16:06:47 +08:00
0b0a3bb836 fix: reload plugin not effect
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-02 18:30:56 +08:00
9bb8278477 v0.8.3 2020-07-02 17:08:20 +08:00
92647fbea2 feat: enable compilerOptions importHelpers
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-02 16:57:16 +08:00
1928551023 feat: update typescript version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-02 11:23:14 +08:00
018889b5eb v0.8.2 2020-07-01 14:41:21 +08:00
05244f9bef feat: update dep version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-07-01 14:33:16 +08:00
36c9d4ad99 feat: complate @ccms/web package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-30 16:02:39 +08:00
0bc513d580 feat: optimize process & plugin loader and scanner
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-30 15:58:51 +08:00
678f4ca8a4 fix: boardcast error when socket send packet
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-30 14:02:18 +08:00
f4aa568f0c v0.8.1 2020-06-23 16:15:17 +08:00
1bb938dcbd feat: update config & package.json
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-23 16:07:55 +08:00
dc4e554a35 feat: update script
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-23 15:53:24 +08:00
7c016f6ba6 feat: optimize plugin scan & load
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-23 15:51:55 +08:00
cfef52aecd v0.8.0 2020-06-22 18:58:05 +08:00
53ee92e20d feat: use @javatypes defiend java type
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-22 10:44:17 +08:00
9b5a303c21 feat: complate database & web
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-20 16:39:03 +08:00
4c0a77ed23 feat: add amqp & web interface
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-20 16:38:14 +08:00
46173ff549 feat: support loader & scanner
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-17 18:39:24 +08:00
2fb7ddd890 feat: add exit hook
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-17 18:36:25 +08:00
e2505597ff feat: add web package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-17 18:34:20 +08:00
17ed9d7d52 feat: support Autowired and JSClass inject
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-17 18:34:01 +08:00
5a9e33e695 feat: add thread pool factory
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-17 18:28:12 +08:00
b98409abe7 feat: add amqp package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-17 18:27:36 +08:00
5420ad460c feat: optimize type file generate
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-02 18:06:15 +08:00
9587a748eb feat: add scope login script
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-02 18:03:22 +08:00
ac2a4f3d6e feat: add nocolor stack
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-02 18:02:49 +08:00
d888d9ab4e feat: add node-shim & move plugin interface
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-02 18:01:56 +08:00
2582d51a98 feat: add @ccms/database
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-02 18:00:26 +08:00
843b65f13b feat: complate server & update spring
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-02 17:50:47 +08:00
c2857a0566 feat: update console
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-06-02 17:15:54 +08:00
684a033525 feat: compatible brower behavior
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-30 10:43:33 +08:00
503ca79dab fix: websocket session send synchronized
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-30 10:18:01 +08:00
46768e4cdd feat: modify ws on Message params
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-26 18:48:46 +08:00
f61360f739 v0.7.0 2020-05-26 16:04:34 +08:00
8fbf9ef29d feat: update docs
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-26 15:54:56 +08:00
d6138bc6f4 feat: add spring support
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-26 15:53:41 +08:00
c37a7cb772 feat: support tomcat websocket
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-26 15:45:40 +08:00
4e1a77cc50 v0.6.7 2020-05-15 18:24:24 +08:00
d614b3741e feat: add npm publish script 2020-05-15 16:50:12 +08:00
738bc50939 feat: link .npmignore file 2020-05-15 16:46:47 +08:00
167abfe3d9 v0.6.6 2020-05-15 16:20:21 +08:00
aab5c86588 feat: support nukkit getRootLogger
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-15 16:10:55 +08:00
5cd02ac08a feat: support get root Logger
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-15 15:48:38 +08:00
0b67ddce42 feat: support config auto save
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-15 14:28:40 +08:00
1e2c17456e feat: optimize import
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-14 19:04:19 +08:00
8731f5d9ef feat: support handshark & boardcast
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-14 19:03:41 +08:00
fb3803cae9 feat: update dep version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-14 09:56:13 +08:00
84e4052871 feat: add global eventCenter & static console source map
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-13 18:41:05 +08:00
2dc662a4d4 v0.6.5 2020-05-12 14:35:26 +08:00
2b017d9208 feat: optimize framework
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-12 14:22:31 +08:00
0ca8ae944c feat: ignore if trace.fileName is empty
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-11 22:13:31 +08:00
1e03b104df feat: add node shim
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-11 22:13:03 +08:00
7ba34e7e01 v0.6.4 2020-05-11 17:52:13 +08:00
c016b1db34 feat: add npmignore
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-11 17:46:57 +08:00
3d1ed08473 v0.6.3 2020-05-11 17:32:02 +08:00
34ee276556 feat: support address arg
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-11 17:24:26 +08:00
53f20a9a8f feat: compatible blockly plugin
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-11 17:20:50 +08:00
76fd6b8318 feat: add i18n load tip
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-11 17:19:44 +08:00
dfff666284 feat: ignore jar:file stack info
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-10 16:25:04 +08:00
44fab858d3 feat: add incremental compiler config
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-10 16:24:19 +08:00
fea58a4dd6 feat: support basic plugin... 2020-05-08 18:41:56 +08:00
71308a13a1 feat: update init command... 2020-05-08 10:11:30 +08:00
34f9b088c7 feat: update gitpod init command... 2020-05-08 10:05:47 +08:00
70929d7ceb feat: add gitpod config... 2020-05-08 09:53:18 +08:00
2beca068a4 feat: complate deploy feature 2020-05-08 00:50:30 +08:00
e0ab8a5a7b v0.6.2 2020-05-07 18:38:28 +08:00
e6f9326ae3 fix: reload & download error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-07 18:33:10 +08:00
58cbacdc85 v0.6.1 2020-05-07 17:18:38 +08:00
dcbdbcfcdc feat: update docs & MSPM
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-07 17:13:48 +08:00
1662e8e0e9 feat: support source map & reload
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-07 17:12:15 +08:00
73fa62a23e v0.6.0 2020-05-03 00:15:06 +08:00
ca79161505 refactor: rename scope to @ccms
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-05-03 00:14:47 +08:00
be4fe82588 v0.5.0 2020-04-26 10:24:49 +08:00
8ec21a7f99 feat: merge stage exec & catch error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-26 10:19:44 +08:00
1431ce0a6e feat: update plugin & websocket
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-24 16:42:36 +08:00
e9c13e44b4 feat: support stage decorators and remove space plugin floder
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-24 15:38:00 +08:00
6b838ae55d fix: netty inject error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-24 13:05:46 +08:00
de99c0dd92 feat: support base64 source map
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-24 13:04:45 +08:00
b92cfccb84 v0.4.2 2020-04-07 13:39:50 +08:00
b03c311956 feat: add 1.8.8 reflect & export io namespace
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-07 13:31:20 +08:00
a164f08e1e feat: console执行异常只打印一次
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-03 13:32:54 +08:00
d850c4a16f feat: cancel all task when disable engine
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-03 11:36:06 +08:00
17fbfabff5 feat: use module export
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-01 17:53:12 +08:00
e84882e076 feat: add internal node moudle punycode
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-01 14:39:00 +08:00
f224b417bb feat: merge decorators meta interface
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-01 11:08:57 +08:00
f9458e66c1 feat: add pipeline reflect
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-04-01 11:08:15 +08:00
d22cb515f7 upgrade: js-yaml version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-31 16:16:13 +08:00
595e11ddfd v0.4.1 2020-03-31 16:16:40 +08:00
328d93cd3f fix: disable server error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-31 14:53:23 +08:00
ccaa268362 feat: add new nodejs modules
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-31 14:51:44 +08:00
b04f4899ca feat: instance i18n object
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-30 18:49:08 +08:00
4677fba701 v0.4.0 2020-03-25 13:54:45 +08:00
cbfbc28504 feat: export error handle & merge config
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-24 18:30:50 +08:00
2042b49e0d feat: add api doc
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-24 17:59:18 +08:00
aee0457d9f fix: sourceMap sometime error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-24 15:02:20 +08:00
9b69b1221b fix: ack callback call twice
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-24 14:52:50 +08:00
cbb73b451f feat: optimize framework add error catch(only log)
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-24 13:27:11 +08:00
5844ca9e7d style: change error color
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-24 13:26:15 +08:00
b6318cb8c1 feat: complate sockt.io server
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-23 18:33:12 +08:00
efd1e5bd62 feat: add adapter and socket
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-23 00:58:53 +08:00
5549bdd804 feat: tracatch plugin build
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-21 15:48:45 +08:00
926fc3b17a feat: add nodejs package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-21 15:47:59 +08:00
9dae44278d feat: complate socket.io base framework
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-21 15:47:42 +08:00
2fb62b26a0 v0.3.2 2020-03-18 11:19:08 +08:00
a1e50285a9 fix: source map print error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-18 11:15:49 +08:00
25dbefef6f refactor: move docs to MiaoDocs
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-10 13:19:48 +08:00
5ef16c5f21 update: README
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-04 02:23:37 +08:00
5f0075272c feat: modify stage order
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-04 02:11:55 +08:00
38469741fd feat: update readme and fix container package error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-04 02:04:35 +08:00
bbc6058347 feat: add docs package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-04 02:04:02 +08:00
2254f22936 v0.3.1 2020-03-03 01:14:22 +08:00
9de4038788 feat: public types package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-03 01:11:49 +08:00
0f8243a7ad feat: update readme
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-02 22:38:34 +08:00
95ac5d1800 feat: update MCBBS.MD
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-02 22:37:08 +08:00
5132019ce6 feat: add error handle
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-02 22:28:27 +08:00
d7061c0c9d remove: manager package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-02 21:00:54 +08:00
f28a1e3c66 feat: add complate function
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-02 00:32:07 +08:00
cf3f840b3c feat: optimize types ref
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-01 20:28:16 +08:00
12b3973b38 fix: Dependency cycles
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-01 19:37:34 +08:00
b95b4f6928 feat: add i18n to ployfill
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-01 17:01:27 +08:00
f821998801 feat: add NativePluginManager
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-03-01 15:19:43 +08:00
27b5642047 feat: add download and getPluginsFolder
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-29 22:28:43 +08:00
85b3bba5d0 feat: upgrade typescript
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-29 18:21:02 +08:00
343f4ba04b feat: add command error i18n
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-29 00:44:11 +08:00
00b27e8999 feat: add normal env task
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-27 18:20:45 +08:00
97877832c4 feat: channel add ext data
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-27 18:14:17 +08:00
33d29271f9 fix: servers check error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-27 17:57:29 +08:00
9f0e732e37 v0.3.0 2020-02-27 12:27:19 +08:00
c2b3372d74 feat: optimize code
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-27 12:26:04 +08:00
8a0fcfae8b feat: improve i18n scope
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-27 12:11:18 +08:00
08ca3db67b feat: support i18n translate
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-27 01:58:23 +08:00
813f761e47 feat: add package i18n
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-27 01:57:44 +08:00
5728c48f16 feat: remove async check
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-26 10:43:47 +08:00
106abc76e1 feat: unmanaged baseEventDir
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-26 10:36:30 +08:00
6a5b1598d4 feat: use inversify autoProvide inject
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-26 10:15:33 +08:00
0ade2b2855 feat: exclude async event monitor
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-25 23:32:12 +08:00
6cf446e54b fix: event execute class type error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-25 23:15:39 +08:00
da07acc6b0 fix: nukkit unregister event error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-25 18:25:16 +08:00
f7207d99ba feat: add channel support for bungee bukkit sponge
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 18:36:08 +08:00
57f2b37401 feat: update ignore file
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 16:35:19 +08:00
8f864222ae v0.2.1 2020-02-24 16:27:49 +08:00
c33b78b029 feat: add nukkit support
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 16:25:54 +08:00
b5b9d3f230 feat: inject config folder
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 16:25:16 +08:00
93fa3e2460 feat: add config support
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 16:24:36 +08:00
c1ef761ec7 feat: update typescript version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 15:28:47 +08:00
19e7692756 feat: add nukkit support
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 04:02:29 +08:00
0fbccbc05f feat: add nukkit package 2020-02-24 04:01:39 +08:00
b2a24943a4 v0.2.0 2020-02-24 00:21:48 +08:00
063fc51f40 feat: set manager and client to private
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 00:19:13 +08:00
126789d49a feat: add config decorator bate
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 00:12:32 +08:00
21394a3b4b feat: update mcbbs file
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-24 00:11:46 +08:00
11c91600da feat: add auto respawn support
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-23 22:35:05 +08:00
c13c4aefca fix: some bug at xhr and console
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-23 22:33:51 +08:00
4fa67549fb feat: update main script
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-19 19:03:09 +08:00
26f4c24659 feat: add source map support
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-19 19:00:26 +08:00
82cf6e6f53 feat: add mc console client package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-19 18:59:02 +08:00
e3f3f9ca4e feat: remove script npx
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-19 18:56:02 +08:00
24d77ea34d feat: add source map support(only local)
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-15 19:39:45 +08:00
b28da75420 feat: enable sourceMap
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-15 18:49:18 +08:00
caa30083d3 feat: update dependencies version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-15 18:48:46 +08:00
2ddd8c3879 fix: bungee unregister error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-14 04:02:37 +08:00
1eefb729d7 feat: chat compatible catserver
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-14 04:02:18 +08:00
b6f3a31eca feat: add bungee tab complate
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-09 22:07:00 +08:00
d1b6a4d4b2 feat: add core-js
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-09 22:06:45 +08:00
81fa66684a fix: compile error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-02 01:58:07 +08:00
0b6c174e42 feat: use dom types and set Proxy global
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-02 01:56:45 +08:00
bf33381e30 feat: update Proxy handle and optimize core index
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-01 03:37:56 +08:00
44422d4dcf feat: update Readme
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-01 02:54:03 +08:00
97b499c0b4 feat: add websocket package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-01 02:47:39 +08:00
8ccfe499df feat: add plugin stage log
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-01 02:46:55 +08:00
f6df0a2c47 feat: move type bind and export impl function
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-01 02:46:06 +08:00
e2f32fd0bf feat: move global declare to @ms/ployfill
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-02-01 02:44:23 +08:00
1e00dc6530 fix: sponge task callSyncMethod
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-17 17:45:39 +08:00
de491bdd62 feat: optimiz plugin system
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-17 17:45:13 +08:00
30ec92fd65 feat: add tellraw string
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-17 17:44:08 +08:00
f869a524ff feat: plugin & cmd add server check
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-17 11:11:20 +08:00
72627c08bc feat: use inject container
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-17 11:10:30 +08:00
0595c3c046 fix: bungee event error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-17 11:09:16 +08:00
2063a2484d feat: add callSyncMethod
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-17 11:08:51 +08:00
a0304183c4 feat: add plugin controller
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-16 17:28:10 +08:00
e442da5b3b feat: update plugins
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-16 17:27:24 +08:00
54d12749dc feat: add bungee support
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-16 17:26:31 +08:00
7955f1663a feat: complete event and dispatch command
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-16 17:19:10 +08:00
032ef3e37d feat: add tellraw & Proxy utils
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-15 18:38:22 +08:00
d500546236 feat: formatting code & remove chinese
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-15 16:48:18 +08:00
c9d62cc617 feat: completion base func
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-15 16:44:14 +08:00
fb37d46acc feat: add bungee package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-15 16:43:00 +08:00
5099430289 feat: add server module
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-14 17:44:20 +08:00
73690a2668 feat: upgrade version
Signed-off-by: MiaoWoo <admin@yumc.pw>
2020-01-08 09:48:37 +08:00
7ab3443351 feat: update gitignore 2019-11-09 18:35:26 +08:00
b60259c345 feat: add jdk support 2019-11-09 18:34:54 +08:00
7b67dc7719 feat: move type def to other package 2019-11-07 15:02:05 +08:00
5a29133561 feat: add illegal plugin check
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-11-05 17:03:49 +08:00
c0106e941b feat: support async task
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-11-05 17:02:58 +08:00
736760b2ee feat: update plugin register
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-11-04 20:28:52 +08:00
83cc4b6a54 feat: update config and add XHR
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-11-04 20:26:22 +08:00
24013bf240 fix: command remove error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-11-04 20:21:31 +08:00
a3cf7eb036 feat: add xhr
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-11-04 20:20:08 +08:00
0012da9855 refactor: update http use XHR
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-11-04 20:19:50 +08:00
364463dc6a feat: add server interface
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-11-04 20:18:30 +08:00
8e94683757 feat: update ignore file
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-10-29 15:38:55 +08:00
e1530c49ee style: format file
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-27 18:40:35 +08:00
4c0290bf21 feat: share decorators container
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-27 18:39:40 +08:00
10cb22c510 feat: add XMLHttpRequest
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-27 18:39:03 +08:00
b939c7c891 feat: supoort mod server scan event
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-27 09:49:45 +08:00
032f4d98ae fix: type instance error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-25 10:10:35 +08:00
ae1519ea4f fix: not exist type mapping
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-25 10:10:22 +08:00
a96756e1ac feat: add sponge typings
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-25 09:55:00 +08:00
35f2dbf162 feat: add type extend and interface
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-24 17:20:18 +08:00
c153f9babb feat: update type defiend
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-24 15:02:03 +08:00
0c8d3a04bd v0.1.1 2019-09-24 10:15:06 +08:00
0491e6fac9 feat: modify import to reference type
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-24 10:12:40 +08:00
7137325491 v0.1.0 2019-09-23 00:41:04 +08:00
8f183d1ca3 feat: update registry in every package
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-23 00:39:13 +08:00
db800a4038 feat: add cli sh and add hosted url in package.json
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-23 00:34:38 +08:00
a851bb543b feat: update deps
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-23 00:19:43 +08:00
81c76f4977 feat: add example plugins
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-22 23:31:52 +08:00
7ca81db573 doc: add jsdoc
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-22 18:02:28 +08:00
b0915648ea fix: bukkit task error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-22 18:01:50 +08:00
9121683e77 feat: add start time
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-22 18:01:35 +08:00
8f5882ff0a feat: modify sponge event mapping handle
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-22 18:01:13 +08:00
38bd2f5187 feat: add remove plugin on disable
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-22 18:00:18 +08:00
514ac27aca feat: add build:plugins
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-22 17:59:25 +08:00
60f6a4e18d feat: add readme and update ts config
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-21 15:06:17 +08:00
046c86681b feat: support multi stage load
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-21 15:05:37 +08:00
5ea4b6bdaf feat: complate command event and task
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-21 15:04:47 +08:00
500384326f feat: add task and optimize command
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-21 15:04:25 +08:00
eb1bab7e76 feat: update command and complate task
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-21 14:58:00 +08:00
928f73a4bf fix: command registry error
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-20 09:09:29 +08:00
c3522aea64 feat: add build script
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-19 19:00:35 +08:00
e5bab5763c feat: complate event and command module
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-19 18:59:32 +08:00
34c598e6d8 feat: optimize api
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-19 18:59:00 +08:00
d06321d9b5 feat: complete event module fix tab completer 2019-09-19 18:58:01 +08:00
bee7e19fc3 feat: add bukkit class type
Signed-off-by: MiaoWoo <admin@yumc.pw>
2019-09-12 17:54:17 +08:00
1285 changed files with 39057 additions and 38642 deletions

12
.editorconfig Normal file
View File

@@ -0,0 +1,12 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

4
.gitignore vendored
View File

@@ -1,4 +1,4 @@
.yarn*
.vscode
node_modules
dist
package-lock.json
yarn.lock

10
.gitpod.Dockerfile vendored Normal file
View File

@@ -0,0 +1,10 @@
FROM gitpod/workspace-full
USER gitpod
# Install custom tools, runtime, etc. using apt-get
# For example, the command below would install "bastet" - a command line tetris clone:
#
# RUN sudo apt-get -q update && # sudo apt-get install -yq bastet && # sudo rm -rf /var/lib/apt/lists/*
#
# More information: https://www.gitpod.io/docs/config-docker/

5
.gitpod.yml Normal file
View File

@@ -0,0 +1,5 @@
tasks:
- init: yarn && yarn bs && yarn build
command: yarn watch
# image:
# file: .gitpod.Dockerfile

View File

@@ -8,15 +8,28 @@
```txt
└─packages
├─api 全平台兼容的接口
├─core 核心代码 用于引导加载
├─common 公共类库代码 例如 http reflect 模块
├─container IOC容器 用于注入具体实现
├─nashorn Nashorn 的类型定义
├─bukkit BukkitAPI内部实现
├─sponge SpongeAPI内部实现
├─plugin 插件管理器
└─plugins 这里当然是插件啦
├─bukkit 只兼容Bukkit的插件
└─sponge 只兼容Sponge的插件
├─api 全平台兼容的接口
├─core 核心代码 用于引导加载
├─common 公共类库代码 例如 http reflect 模块
├─compile 编译器相关功能
├─client NodeJS 的 Minecraft 客户端 已迁移至 ms-client
├─container IOC容器 用于注入具体实现
├─database 数据库相关功能
├─protocol 协议处理相关功能
├─service 服务相关功能
├─i18n 多语言环境相关支持
├─polyfill Nashorn 的一些自定义增强
├─nashorn Nashorn 的类型定义
├─nodejs NodeJS 的部分 Java 实现
├─bungee BungeeCordAPI 内部实现
├─bukkit BukkitAPI 内部实现
├─sponge SpongeAPI 内部实现
├─nukkit NukkitAPI 内部实现
├─molang MoLang 解析库
├─qrcode 二维码相关类库
├─plugin 插件管理器
├─websocket WebSocket 相关实现
| ├─client 基于 Netty 的 WebSocket 客户端
| └─server 基于 Netty 的 WebSocket 服务端
└─type 类型定义 已迁移到 @javatypes
```

62
cli.sh
View File

@@ -1,62 +0,0 @@
#!/bin/bash
SHELL_PREFIX="[FAAS-CLI]"
# Shell Base Script
set -e
c_red="\033[38;5;1m"
c_blue="\033[38;5;4m"
c_green="\033[38;5;2m"
c_reset="\033[0m"
c_yellow="\033[38;5;3m"
c_prefix="${c_blue}${SHELL_PREFIX}>>${c_reset}"
dateStr() {
echo -e "[$(date '+%H:%M:%S')]"
}
info() {
echo -e "${c_prefix}$(dateStr) ${*}"
}
warn() {
echo -e "${c_prefix}$(dateStr) ${c_yellow}${*}${c_reset}"
}
error() {
echo -e "${c_prefix}$(dateStr) ${c_red}${*}${c_reset}"
}
#====================
cd $(dirname $0)
# User Input Variable
action=
while [[ $# -gt 0 ]]; do
case "$1" in
-a)
action="$2"
shift
;;
-*)
echo "Illegal option $1"
;;
esac
shift $(( $# > 0 ? 1 : 0 ))
done
case "${action}" in
undo)
hash=$(git log -n 1 --format=format:%H)
tag=$(git tag -l --contains=${hash})
if [[ -z "${tag}" ]]; then
error "last commit not have tag exit..."
exit 0
fi
git reset HEAD^
git tag -d ${tag}
git push origin master -f
git push origin :${tag}
;;
esac

View File

@@ -1,318 +1,11 @@
为了方便阅读 我对帖子进行了分页 请点击目录阅读!
- 构建状态 [![Build Status](https://ci.yumc.pw/job/Minecraft/job/MiaoScript/badge/icon?style=flat-square)](https://ci.yumc.pw/job/Minecraft/job/MiaoScript/)
- 当前版本 ![Build Status](https://ci.yumc.pw/job/Minecraft/job/MiaoScript/badge/icon?style=flat-square&subject=VERSION&status=0.1.0beta&color=darkturquoise)
- 下载地址 [![Build Status](https://ci.yumc.pw/job/Minecraft/job/MiaoScript/badge/icon?style=flat-square&subject=MiaoScript&status=DOWNLOAD&color=darkgreen)](http://w.yumc.pw/free.html#MiaoScript-download)
- 更新日志 [![Build Status](https://ci.yumc.pw/job/Minecraft/job/MiaoScript/badge/icon?style=flat-square&subject=MiaoScript&status=CHANGELOG&color=green)](https://docs.yumc.pw/MiaoScript/CHANGELOG.html)
- 安装文档 [![Build Status](https://ci.yumc.pw/job/Minecraft/job/MiaoScript/badge/icon?style=flat-square&subject=MiaoScript&status=MiaoDoc%20USER&color=red)](https://docs.yumc.pw/MiaoScript/1-user/1.1-check-env.html)
- 开发文档 [![Build Status](https://ci.yumc.pw/job/Minecraft/job/MiaoScript/badge/icon?style=flat-square&subject=MiaoScript&status=MiaoDoc%20DEVELOP&color=darkred)](https://docs.yumc.pw/MiaoScript/2-develop/1.1-check-env.html)
- 兼容服务端 Spigot CatServer Sponge BungeeCord Nukkit(没错 他还兼容Nukkit)
## 插件简介
### 腐竹版本(开发中)
- 此插件可以实现跨端使用 `TypeScript` 开发 脚本插件
- 目前已经兼容 `Spigot` `Sponge`
- 后续计划兼容 `BungeeCord` `Nukkit`
## 起源 (可以略过)
### 简介
> 这个坑是我自己刨的 但是发现坑太大 需要更多的人一起填
### 起源
- 诞生于 `2016年08月25日` 这是 Git 上的第一个提交 具体啥时候我也忘了
- 起初 `MiaoScript` 只是用于服务器其他插件的变量执行 并且依赖于PAPI(不知道是啥的自己百度)
- 比如 [`MiaoMenu`](http://w.yumc.pw/zc/MiaoMenu.html) 的部分复杂脚本
- 比如 [`MiaoChat`](http://mcbbs.net/thread-631240-1-1.html) 的聊天变量
- 突然有一天 圈内的大佬 `QSB` @qiu1995 过来找我 说能不能用脚本监听玩家的事件
- PS: 这货自从用过 `DeluxeMenu` 之后就喜欢上了用JS写菜单
- 当初感觉没啥问题 就出了第一个简易的 `MiaoScript` 版本 还是用 yml 做的配置文件
- 但是由于设计 BukkitAPI 等内容 对Java要求太高 后来 邱也弃坑了 我也弃坑了
### 刨坑
- 时隔多年(也就一年) 看到了Sponge的兴起 (估摸着是MCPC系列的MOD端都弃坑了)
- 同时 这期间 收到很多腐竹的单子 但是又是非常基础的东西
- 比如 开服给玩家发一条消息啦
- 比如 修改玩家某些数据啦
- 这些东西实际上也就几行代码的事情
- 同时 很多想入坑 插件开发 但是又有一些被卡死在环境搭建上
- 比如 `Bukkit` 需要 `BukkitAPI`
- `Sponge` 需要 `SpongeAPI` 如果涉及 `MOD` 还要 `Forge` 环境
- 再或者 BungeeCord 的插件开发 我也是经常懒得搞
- 当然 最主要的是 某个 咕咕咕的群 天天有人问我 喵系插件能不能支持 Sponge
- 内心当然是拒绝的 现在要上班养老婆孩子(咳咳 不要以为我是大叔 我也才刚毕业而已) 那里还有时间免费给你们写插件
- 于是乎 我又想起了当初的 `MiaoScript`
- 突发奇想 一个插件的雏形出现在我的脑海中
- 可以兼容多种服务器
- 不需要开发环境 有记事本就可以开发
- 语法要简单 比如 JavaScript
- 能够自动搜索安装依赖(毕竟很多人天天问我为何喵系插件跑不起来 都是缺少PAPI)
- 能够不重启更新插件(当然得保证代码安全的前提下)
- 在 2017年9月14号(距离 第一个版本正式版发布(2016-09-21) 相差一年整)
- 一个全新的 `MiaoScript` 诞生了
- Java部分代码 只有一个启动类
- 核心全部由 JS 编写
- 兼容 `CommonJS` 规范
- 实时重载
### 进展
- [项目发布](https://git.yumc.pw/502647092/MiaoScript/releases)
- [项目代码](https://git.yumc.pw/502647092/MiaoScript)
- [项目脑图](http://naotu.baidu.com/file/293b9a0fc7cef23c69de81c55e3617d5?token=1eee8fd759198eb7)
### 规划
- 初期只会支持JS类型的插件开发
- 二期会出一个建议版本的MS脚本 可以用简单的语法实现简单的功能
- 各个层级会有依赖控制 比如 `MS脚本 => JS脚本 => 调用Java原生API`
## 框架设计
### MiaoScript TS 实现
项目具体实现 由 TypeScript 进行编写 然后编译至 `es5` 用于兼容 Java8 的 `Nashorn`
### Project Structure
```txt
└─packages
├─api 全平台兼容的接口
├─core 核心代码 用于引导加载
├─common 公共类库代码 例如 http reflect 模块
├─container IOC容器 用于注入具体实现
├─nashorn Nashorn 的类型定义
├─bukkit BukkitAPI内部实现
├─sponge SpongeAPI内部实现
├─plugin 插件管理器
└─plugins 这里当然是插件啦
├─bukkit 只兼容Bukkit的插件
└─sponge 只兼容Sponge的插件
```
详细的内容就不逼逼了 自己看代码吧
Github: https://github.com/circlecloud/ms
## 插件开发基础
### 开发IDE (推荐VSCode或者MiaoScrit在线IDE)
如果只是简单的开发 你可用记事本 (但是没有任何补全和错误提示)
### 开发环境准备(针对高级用户))
- 安装 `NodeJS` 和 `Yarn`
- 拉取代码
- `git clone https://github.com/circlecloud/ms.git`
- 进入目录 `ms`
- 安装 npm 包
- `yarn`
- 编译一次生成对应的类库
- `yarn build`
### 直接在 MiaoScript Online WebIDE 开发
填坑中...
## 基本插件框架
### HelloWorld 示例插件
先来一个 `HelloWorld.ts` 插件示范!
```ts
import { plugin, interfaces, cmd, listener, tab } from '@ms/plugin'
@plugin({ name: 'HelloWorld', version: '1.0.0', author: 'MiaoWoo', source: __filename })
export class HelloWorld extends interfaces.Plugin {
load() {
this.logger.log('Test Plugin load from MiaoScript Plugin System...');
}
enable() {
this.logger.log('Test Plugin enable from MiaoScript Plugin System...');
}
disable() {
this.logger.log('Test Plugin disable from MiaoScript Plugin System...');
}
bukkitload() {
this.logger.log('Load When ServerType is Bukkit!')
}
bukkitenable() {
this.logger.log('Enable When ServerType is Bukkit!')
}
bukkitdisable() {
this.logger.log('Disable When ServerType is Bukkit!')
}
spongeload() {
this.logger.log('Load When ServerType is Sponge!')
}
spongeenable() {
this.logger.log('Enable When ServerType is Sponge!')
}
spongedisable() {
this.logger.log('Disable When ServerType is Sponge!')
}
@cmd()
hello(sender: any, command: string, args: string[]) {
this.logger.log(sender, command, args);
this.logger.sender(sender, JSON.stringify({ command, args }));
}
@tab()
tabhello(_sender: any, _command: string, _args: string[]) {
return ['world']
}
@listener({ servertype: 'bukkit' })
playerjoin(event: any) {
this.logger.console(`§aBukkit PlayerJoinEvent: §b${event.player.name}`)
setTimeout(() => this.logger.sender(event.player, `§a欢迎来到 §bMiaoScript §a的世界!`), 10);
}
@listener({ servertype: 'sponge' })
clientconnectionevent$join(event: any) {
this.logger.console(`§aSponge ClientConnectionEvent.Join: §b${event.targetEntity.name}`)
setTimeout(() => this.logger.sender(event.targetEntity, `§a欢迎来到 §bMiaoScript §a的世界!`), 10);
}
}
```
- 进入 `ms`目录
- 执行编译 `yarn build:plugins`
- 从 `packages/plugins/dist` 中复制 `HelloWorld.js` 文件 到对应的插件目录
- Bukkit: plugins/MiaoScript/plugins/
- Sponge: config/miaoscript/plugins/
- 重载 `MiaoScript`
- 打开客户端进入游戏 预览一下效果
- 从 Spigot 服务端进入
![image.png](https://i.loli.net/2019/09/22/2BZuwF65WV1xGnv.png)
![image.png](https://i.loli.net/2019/09/22/m2CftwbalnXsxvg.png)
- 从 Sponge 服务端进入
![image.png](https://i.loli.net/2019/09/22/QD1jrShtJpPXyVl.png)
![image.png](https://i.loli.net/2019/09/22/GzLFVC3sjAJ4obm.png)
## 注册插件
- 从上面的示例可以看到 一个插件 通过注解 `@plugin` 即可启动
- 此注解接受一个 `PluginMetadata` 对象 定义如下
```ts
export interface PluginMetadata {
/**
* 插件名称
*/
name: string;
/**
* 前缀
*/
prefix?: string;
/**
* 插件版本
*/
version: string;
/**
* 插件版本
*/
author: string | string[];
/**
* 插件源文件 必须指定为 __filename
*/
source: string;
/**
* 插件本体
*/
target?: any;
}
```
### 插件生命周期
MiaoScript的生命周期遵循了 Bukkit 的生命周期
MiaoScript针对不同的服务端 提供了扩展的周期
以服务端类型开头阶段名结束 例如 `bukkitload` `spongeenbale`
扩展的生命周期只会在特定的服务器执行
### load 加载阶段
此阶段通常用于初始化基础配置 数据库链接等
某些对外提供功能的插件 需要在此阶段初始化完成
### enable 启动阶段
此阶段通常用于注册命令 注册事件等
由于命令和事件 MiaoScript 已经托管了 所以开发者可以直接用注解实现
### disable 关闭阶段
此阶段通常用于注销命令 注销事件等
由于命令和事件 MiaoScript 已经托管了 所以开发者可以直接用注解实现
## 注册命令/补全
### cmd 命令
命令 就是玩家在Minecraft中执行命令 下面是一个示例的命令
- 命令是一个 `function` 通过 `@cmd` 注解注册
- 命令注册时默认使用方法名称为命令名称 当前你可以传入 name 参数指定命令名称 例如 `{name: 'test'}`
- 接受三个参数 `sender: any, command: string, args: string[]`
- 分别代表 命令发送者 命令名称 命令参数
```ts
@cmd()
hello(sender: any, command: string, args: string[]) {
this.logger.log(sender, command, args);
this.logger.sender(sender, JSON.stringify({ command, args }));
}
```
### tab 补全
补全就是 玩家在Minecraft执行命令时 使用 Tab键 补全
- 补全是一个 `functio` 一般以 `tab` 开头 需要补全的命令结尾 通过 `@tab` 注解注册
- 补全注册时默认使用方法名称为补全名称 当前你可以传入 name 参数指定命令名称 例如 `{name: 'test'}`
- 接受三个参数 `sender: any, command: string, args: string[]`
- 分别代表 命令发送者 命令名称 命令参数
_注意: 当补全命令未注册时 补全无效! 且补全和命令必须在同一个Class内!_
```ts
@tab()
tabhello(_sender: any, _command: string, _args: string[]) {
return ['world']
}
```
## 监听事件
事件是指 Minecraft 中发生的各种事情
- 监听事件是一个 `function` 通过 `@listener` 注册
- 事件名称默认为方法名称
- 所有类型服务端的事件 MiaoScript 都会进行一次映射 方便使用
- 例如 `PlayerJoinEvent` 会映射为 `PlayerJoinEvent, playerjoinevent, playerjoin` 等
- 一般规则就是 类名直接小写 如果遇到子类 则保留 `$`
- 例如 `ClientConnectionEvent.Join` 会映射为 `clientconnectionevent$join`
- 事件的注可以传入 `servertype` 来指定这个事件类型的服务端加载 默认是所有服务端都加载
- 事件监听方法的第一个参数就是本次事件的具体内容 (这里就需要自己去查询对应的JavaDoc了)
```ts
@listener({ servertype: 'bukkit' })
playerjoin(event: any) {
this.logger.console(`§aBukkit PlayerJoinEvent: §b${event.player.name}`)
setTimeout(() => this.logger.sender(event.player, `§a欢迎来到 §bMiaoScript §a的世界!`), 10);
}
@listener({ servertype: 'sponge' })
clientconnectionevent$join(event: any) {
this.logger.console(`§aSponge ClientConnectionEvent.Join: §b${event.targetEntity.name}`)
setTimeout(() => this.logger.sender(event.targetEntity, `§a欢迎来到 §bMiaoScript §a的世界!`), 10);
}
```
## 插件列表
暂无
> 注意: 一楼的列表是老版本的 新版本无法加载!
- 先上几张图

View File

@@ -1,16 +1,15 @@
{
"version": "0.1.0",
"useWorkspaces": true,
"npmClient": "yarn",
"packages": [
"packages/*"
],
"command": {
"run": {
"stream": true
},
"publish": {
"registry": "https://repo.yumc.pw/repository/npm-hosted/"
}
"version": "0.28.0-beta.5",
"npmClient": "pnpm",
"packages": [
"packages/*"
],
"command": {
"run": {
"stream": true
}
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -6,16 +6,30 @@
"author": "MiaoWoo <admin@yumc.pw>",
"license": "MIT",
"scripts": {
"clean": "npx lerna run clean",
"watch": "npx lerna run watch --parallel",
"build": "npx lerna run build",
"build:plugins": "npx lerna run build --scope=@ms/plugins",
"lp": "npx lerna publish"
"bs": "lerna bootstrap",
"clean": "lerna run clean",
"watch": "lerna run watch --parallel",
"build": "lerna run build",
"ug": "pnpm up -r -i",
"np": "./script/push.sh",
"lsp": "npm login -scope=@ccms",
"lp": "lerna publish --force-publish",
"lpb": "lerna publish prerelease --preid beta --dist-tag beta --force-publish",
"lpc": "lerna publish --canary --preid beta --pre-dist-tag beta --force-publish",
"lpf": "lerna publish from-package --yes",
"sync": "./script/sync.sh"
},
"workspaces": [
"packages/*"
],
"devDependencies": {
"lerna": "^3.16.4"
"lerna": "^7.2.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^5.0.5",
"typescript": "^5.2.2",
"tslib": "^2.6.2",
"@types/node": "^20.8.8",
"@ccms/nashorn": "^0.28.0-beta.3",
"@javatypes/jdk": "^0.0.3"
}
}

View File

@@ -1,4 +0,0 @@
/node_modules
/dist
/package-lock.json
/yarn.lock

View File

@@ -1,22 +0,0 @@
src
test
typings
bundled
build
coverage
docs
wiki
gulpfile.js
bower.json
karma.conf.js
tsconfig.json
typings.json
CONTRIBUTING.md
ISSUE_TEMPLATE.md
PULL_REQUEST_TEMPLATE.md
tslint.json
wallaby.js
.travis.yml
.gitignore
.vscode
type_definitions

View File

@@ -1,6 +1,6 @@
{
"name": "@ms/api",
"version": "0.1.0",
"name": "@ccms/api",
"version": "0.28.0-beta.5",
"description": "MiaoScript api package",
"keywords": [
"miaoscript",
@@ -12,22 +12,26 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
"publishConfig": {
"registry": "https://repo.yumc.pw/repository/npm-hosted/"
},
"files": [
"dist/*.js",
"dist/*.ts",
"dist/*.map"
],
"scripts": {
"clean": "rimraf dist",
"watch": "npx tsc --watch",
"build": "yarn clean && npx tsc",
"watch": "tsc --watch",
"build": "pnpm clean && tsc",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"dependencies": {
"@ms/common": "^0.1.0",
"@ms/container": "^0.1.0"
"@ccms/common": "^0.28.0-beta.5",
"@ccms/container": "^0.28.0-beta.5",
"@ccms/i18n": "^0.28.0-beta.5",
"@ccms/polyfill": "^0.28.0-beta.5",
"base64-js": "^1.5.1",
"source-map-builder": "^0.0.7"
},
"devDependencies": {
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.0",
"typescript": "^3.6.2"
"@types/base64-js": "^1.3.0"
}
}

View File

@@ -0,0 +1,66 @@
import { injectable } from "@ccms/container"
export namespace channel {
/**
* handle plugin message
* @param data byte[]
*/
export type ChannelListener = (data: any, exts?: any) => void
@injectable()
export abstract class Channel {
private listenerMap = [];
/**
* 注册通道
* @param plugin 插件
* @param channel 通道
* @param exec 执行器
*/
listen(plugin: any, channel: string, exec: ChannelListener) {
if (!plugin || !plugin.description || !plugin.description.name) throw new TypeError('Plugin can\'t be undefiend!')
let name = plugin.description.name
let listener = this.register(channel, exec)
if (!this.listenerMap[name]) this.listenerMap[name] = []
let offExec = () => {
this.unregister(channel, listener)
console.debug(`[${name}] unregister channel ${channel}`)
}
var off = {
channel,
listener,
off: offExec
}
this.listenerMap[name].push(off)
console.debug(`[${name}] register channel ${channel} => ${exec.name || '[anonymous]'}`)
return off
}
/**
* 关闭插件注册的通道
* @param plugin 插件
*/
disable(plugin: any) {
var channelCache = this.listenerMap[plugin.description.name]
if (channelCache) {
channelCache.forEach(t => t.off())
delete this.listenerMap[plugin.description.name]
}
}
/**
* Send Channel Message
* @param player recover target
* @param channel ChannelName
* @param data byte[]
*/
abstract send(player: any, channel: string, data: any)
/**
* register channel
* @param channel ChannelName
*/
abstract register(channel: string, listener: ChannelListener): any
/**
* unregister channel
* @param channel ChannelName
*/
abstract unregister(channel: string, listener?: any): void
}
}

31
packages/api/src/chat.ts Normal file
View File

@@ -0,0 +1,31 @@
import { injectable } from '@ccms/container'
export namespace chat {
@injectable()
export abstract class Chat {
/**
* sendJsonChat
* @param sender reciver
* @param json json
* @param type chat Type 0: chat 1: system 2: actionBar
*/
sendJson(sender: any, json: string | object, type = 0) {
throw new Error("Method not implemented.")
}
sendMessage(sender: any, message: string) {
throw new Error("Method not implemented.")
}
sendActionBar(sender: any, message: string) {
throw new Error("Method not implemented.")
}
clearActionBar(sender: any) {
this.sendActionBar(sender, '')
}
sendTitle(sender: any, title: string, subtitle: string = '', fadeIn: number = 20, time: number = 100, fadeOut: number = 20) {
throw new Error("Method not implemented.")
}
clearTitle(sender: any) {
this.sendTitle(sender, '', '', 0, 0, 0)
}
}
}

View File

@@ -1,68 +1,125 @@
import { injectable } from "@ms/container";
import i18n from '@ccms/i18n'
import { injectable } from "@ccms/container"
import { plugin } from './plugin'
export namespace command {
@injectable()
export abstract class Command {
on(plugin: any, name: string, exec: { cmd: Function, tab?: Function }) {
var cmd = this.create(plugin, name);
console.debug(`插件 ${plugin.description.name} 创建命令 ${name}(${cmd})...`)
/**
* first time script engine need optimize jit code
* so ignore first slow exec notify
*/
private cacheSlowKeys = {};
/**
* 注册插件命令
* @param plugin 插件
* @param name 命令
* @param exec 执行器
*/
on(plugin: plugin.Plugin, name: string, exec: { cmd: Function, tab?: Function }) {
var cmd = this.create(plugin, name)
if (!cmd) { throw Error(`Plugin ${plugin.description.name} can't create Command ${name}!`) }
console.debug(i18n.translate("ms.api.command.register", { plugin: plugin.description.name, name, cmd }))
if (exec.cmd && typeof exec.cmd === "function") {
this.onCommand(plugin, cmd, exec.cmd);
this.onCommand(plugin, cmd, exec.cmd)
} else {
throw Error("CommandExec Must be a function... Input: " + exec.cmd)
throw Error(i18n.translate("ms.api.command.register.input.error", { exec: exec.cmd }))
}
if (exec.tab && typeof exec.tab === "function") {
this.onTabComplete(plugin, cmd, exec.tab);
this.onTabComplete(plugin, cmd, exec.tab)
}
}
off(plugin: any, name: string) {
console.debug(`插件 ${plugin.description.name} 注销命令 ${name}...`)
this.remove(plugin, name);
public tabComplete(sender: any, input: string, index?: number): string[] {
throw new Error("Method not implemented.")
}
/**
* Create Server Command Object
* 取消命令注册
* @param plugin 插件
* @param name 命令
*/
protected abstract create(plugin: any, command: string);
protected abstract remove(plugin: any, command: string);
protected abstract onCommand(plugin: any, command: any, executor: Function);
protected abstract onTabComplete(plugin: any, command: any, tabCompleter: Function);
off(plugin: plugin.Plugin, name: string) {
console.debug(i18n.translate("ms.api.command.unregister", { plugin: plugin.description.name, name }))
this.remove(plugin, name)
}
protected setExecutor(plugin: any, command: any, executor: Function) {
return (sender: any, _, command: string, args: string[]) => {
protected abstract create(plugin: plugin.Plugin, command: string): any
protected abstract remove(plugin: plugin.Plugin, command: string): void
protected abstract onCommand(plugin: plugin.Plugin, command: any, executor: Function)
protected abstract onTabComplete(plugin: plugin.Plugin, command: any, tabCompleter: Function)
protected setExecutor(plugin: plugin.Plugin, command: any, executor: Function) {
return (sender: any, _: any, command: string, args: string[]) => {
try {
return executor(sender, command, Java.from(args));
} catch (ex) {
console.console(`§6玩家 §a${sender.name} §6执行 §b${plugin.description.name} §6插件 §d${command} ${Java.from(args).join(' ')} §6命令时发生异常 §4${ex}`);
console.ex(ex);
console.sender(sender, [`§6执行 §b${plugin.description.name} §6插件 §d${command} ${Java.from(args).join(' ')} §6命令时发生异常`, ...console.stack(ex)])
return true;
let time = Date.now()
let result = executor(sender, command, Java.from(args))
this.checkSlow(Date.now() - time,
"ms.api.command.execute.slow",
plugin, command, sender, args)
return result
} catch (ex: any) {
this.printError(ex, "ms.api.command.execute.error",
plugin, command, sender, args)
return true
}
}
}
protected setTabCompleter(plugin: any, command: any, tabCompleter: Function) {
return (sender: any, _, command: string, args: string[]) => {
protected setTabCompleter(plugin: plugin.Plugin, command: any, tabCompleter: Function) {
return (sender: any, _: any, command: string, args: string[]) => {
try {
var token = args[args.length - 1];
var complete = tabCompleter(sender, command, Java.from(args)) || [];
return this.copyPartialMatches(complete, token);
} catch (ex) {
console.console(`§6玩家 §a${sender.name} §6执行 §b${plugin.description.name} §6插件 §d${command} ${Java.from(args).join(' ')} §6补全时发生异常 §4${ex}`);
console.ex(ex);
console.sender(sender, [`§6执行 §b${plugin.description.name} §6插件 §d${command} ${Java.from(args).join(' ')} §6补全时发生异常 §4${ex}`, ...console.stack(ex)]);
return [];
let time = Date.now()
var token = args[args.length - 1]
var complete = tabCompleter(sender, command, Java.from(args)) || []
let result = this.copyPartialMatches(complete, token)
this.checkSlow(Date.now() - time,
"ms.api.command.tab.completer.slow",
plugin, command, sender, args)
return result
} catch (ex: any) {
this.printError(ex, "ms.api.command.tab.completer.error",
plugin, command, sender, args)
return []
}
}
}
protected copyPartialMatches(complete: string[], token: string, array: string[] = []): string[] {
if (!token) { return complete }
complete.forEach(function(e) {
complete.forEach(function (e) {
if (typeof e === "string" && e.toLowerCase().startsWith(token.toLowerCase())) {
array.push(e)
}
});
})
return array
}
private checkSlow(cost: number, key: string, plugin: plugin.Plugin, command: string, sender: any, args: any[]) {
if (cost > global.ScriptSlowExecuteTime) {
let completerKey = `${plugin.description.name}-${key}-${command}-${sender.name}`
if (!this.cacheSlowKeys[completerKey]) {
return this.cacheSlowKeys[completerKey] = cost
}
console.i18n(key, {
player: sender.name,
plugin: plugin.description.name,
command,
args: Java.from(args).join(' '),
cost
})
}
}
private printError(error: Error, key: string, plugin: plugin.Plugin, command: string, sender: any, args: any[]) {
let message = i18n.translate(key, {
player: sender.name,
plugin: plugin.description.name,
command,
args: Java.from(args).join(' '),
error
})
console.console(message)
console.ex(error)
if (sender.name != 'CONSOLE') {
console.sender(sender, [message, ...console.stack(error)])
}
}
}
}

View File

@@ -1,150 +1,260 @@
let Arrays = Java.type('java.util.Arrays');
let Level = Java.type('java.util.logging.Level');
let ignoreLogPrefix = ['java.', 'net.minecraft.', 'org.bukkit.', 'jdk.nashorn.'];
import i18m from '@ccms/i18n'
import { SourceMapBuilder } from 'source-map-builder'
import * as base64 from 'base64-js'
const Arrays = Java.type('java.util.Arrays')
const Level = Java.type('java.util.logging.Level')
const Paths = Java.type('java.nio.file.Paths')
const ignoreLogPrefix = ['java.', 'javax.', 'sun.', 'net.minecraft.', 'org.bukkit.', 'jdk.internal.dynalink.', 'jdk.nashorn.', 'org.openjdk.nashorn', 'io.netty.', 'org.spongepowered.', 'org.apache', 'org.springframework']
enum LogLevel {
ALL,
TRACE,
DEBUG,
INFO,
WARN,
ERROR,
FATAL,
OFF
}
const sourceMaps: { [key: string]: SourceMapBuilder } = {}
const sourceFileMaps: { [key: string]: string } = {}
global.setGlobal('MiaoScriptSourceMaps', sourceMaps)
global.setGlobal('MiaoScriptSourceFileMaps', sourceFileMaps)
export namespace jsconsole {
export function readSourceMap(fileName: string, lineNumber: any) {
try {
if (fileName.endsWith('js') || fileName.endsWith('ms')) {
if (sourceMaps[fileName] === undefined) {
sourceMaps[fileName] = null
let sourceLine = base.read(fileName).split('\n')
let lastLine = sourceLine[sourceLine.length - 1] || sourceLine[sourceLine.length - 2]
// lastLine is similar //# sourceMappingURL=data:application/json;base64,
if (lastLine.startsWith('//# sourceMappingURL=')) {
let sourceContent = null
let sourceMappingURL = lastLine.split('sourceMappingURL=', 2)[1]
if (sourceMappingURL.startsWith('data:application/json;base64,')) {
sourceContent = String.fromCharCode(...Array.from(base64.toByteArray(sourceMappingURL.split(',', 2)[1])))
} else if (sourceMappingURL.startsWith('http://') || sourceMappingURL.startsWith('https://')) {
// TODO
} else {
let file = Paths.get(Paths.get(fileName, '..', sourceMappingURL).toFile().getCanonicalPath()).toFile()
if (file.exists()) {
sourceContent = base.read(file)
sourceFileMaps[fileName] = file.getCanonicalPath()
} else if (global.debug) {
console.debug('readSourceMap can\'t found', fileName, 'source map file', sourceMappingURL)
}
}
if (sourceContent) {
sourceMaps[fileName] = new SourceMapBuilder(JSON.parse(sourceContent))
}
}
}
if (sourceMaps[fileName]) {
let sourceMapping = sourceMaps[fileName].getSource(lineNumber, 25, true, true)
if (sourceMapping) {
fileName = Paths.get(fileName, '..', sourceMapping.sourcePath).toFile().getCanonicalPath()
lineNumber = sourceMapping.mapping.sourceLine
}
}
}
} catch (error: any) {
console.debug('search source map', fileName, 'line', lineNumber, 'error:', error)
if (global.debug) {
console.ex(error)
}
}
return {
fileName,
lineNumber
}
}
export function getStackTrace(ex: Error, color: boolean = true): string[] {
if (!ex) return []
let stack = ex.getStackTrace()
let cache = [(color ? '§c' : '') + ex]
//@ts-ignore
if (stack.class) {
stack = Arrays.asList(stack)
}
stack.forEach(trace => {
if (!trace.fileName || trace.fileName.startsWith('jar:file:') || trace.fileName.startsWith('file:')) { return }
if (trace.className.startsWith('<')) {
let { fileName, lineNumber } = readSourceMap(trace.fileName, trace.lineNumber)
if (fileName.startsWith(root)) { fileName = fileName.split(root)[1] }
if (color) {
cache.push(` §e->§c ${fileName}:${lineNumber}(${trace.lineNumber}) => §4${trace.methodName}`)
} else {
cache.push(` -> ${fileName}:${lineNumber}(${trace.lineNumber}) => ${trace.methodName}`)
}
} else {
let className = trace.className
var fileName = trace.fileName as string
var lineNumber = trace.lineNumber
if (className.startsWith('jdk.nashorn.internal.scripts') || className.startsWith('org.openjdk.nashorn.internal.scripts')) {
className = className.substr(className.lastIndexOf('$') + 1)
var { fileName, lineNumber } = readSourceMap(fileName, lineNumber)
if (fileName.startsWith(root)) { fileName = fileName.split(root)[1] }
} else {
if (!global.debug) {
for (let prefix in ignoreLogPrefix) {
if (className.startsWith(ignoreLogPrefix[prefix])) {
return
}
}
} else if (className.startsWith('jdk.nashorn.internal.') || className.startsWith('org.openjdk.nashorn.internal.')) {
return
}
}
if (color) {
cache.push(` §e->§c ${className}.${trace.methodName}(§4${fileName}:${lineNumber}§c)`)
} else {
cache.push(` -> ${className}.${trace.methodName}(${fileName}:${lineNumber})`)
}
}
})
return cache
}
}
export class MiaoScriptConsole implements Console {
Console: NodeJS.ConsoleConstructor;
Console: any
memory: any
private _name: string = '';
private _name: string = ''
private _level: LogLevel = LogLevel.INFO
protected logger: any;
protected prefix: string = '§6[§bMiaoScript§6]§r ';
protected logger: any
public prefix: string = '§6[§bMiaoScript§6]§r '
constructor(name?: string) {
this.name = name;
this.logger = global.logger;
this.name = name
this.logger = global.logger
if (global.debug) {
this._level = LogLevel.DEBUG
}
if (global.level?.toUpperCase() === "TRACE") {
this._level = LogLevel.TRACE
}
}
get name() {
return this._name;
return this._name
}
set name(name: string) {
if (name) {
this._name = `[${name}] `;
// noinspection JSUnusedGlobalSymbols
this.prefix = `§6[§cMS§6][§b${name}§6]§r `;
this._name = `[${name}] `
this.prefix = `§6[§cMS§6][§b${name}§6]§r `
}
}
log(...args): void {
this.logger.info(this.name + args.join(' '));
log(...args: any[]): void {
this.logger.info(this.name + args.join(' '))
}
info(...args) {
this.logger.info(this.name + args.join(' '));
};
warn(...args) {
this.logger.warning(this.name + args.join(' '));
};
error(...args) {
this.logger.log(Level.SEVERE, this.name + args.join(' '));
};
debug(...args) {
info(...args: any[]) {
this.logger.info(this.name + args.join(' '))
}
warn(...args: any[]) {
this.logger.warning(this.name + args.join(' '))
}
error(...args: any[]) {
this.logger.log(Level.SEVERE, this.name + args.join(' '))
}
debug(...args: any[]) {
if (global.debug) {
this.logger.info(this.name + '[DEBUG] ' + args.join(' '));
this.logger.info(this.name + '[DEBUG] ' + args.join(' '))
}
};
}
trace(...args: any[]): void {
if (this._level <= LogLevel.TRACE) {
this.logger.info(this.name + '[TRACE] ' + args.join(' '))
}
}
sender(...args) {
this.info(args)
}
console(...args) {
this.info(args)
}
i18n(name: string, param?: { [key: string]: any }) {
this.console(i18m.translate(name, param))
}
object(obj) {
for (var i in obj) {
this.logger(i, '=>', obj[i])
for (const i in obj) {
this.info(i, '=>', obj[i])
}
};
}
ex(ex: Error) {
this.stack(ex).forEach(line => this.console(line))
};
stack(ex: Error): string[] {
var stack = ex.getStackTrace();
var cache = ['§4' + ex];
//@ts-ignore
if (stack.class) {
stack = Arrays.asList(stack)
}
stack.forEach(function(trace) {
if (trace.className.startsWith('<')) {
var fileName = trace.fileName
if (fileName.startsWith(root)) { fileName = fileName.split(root)[1] }
cache.push(` §e->§c ${fileName} => §4${trace.methodName}:${trace.lineNumber}`)
} else {
var className = trace.className;
var fileName = trace.fileName
if (className.startsWith('jdk.nashorn.internal.scripts')) {
className = className.substr(className.lastIndexOf('$') + 1)
if (fileName.startsWith(root)) { fileName = fileName.split(root)[1] }
} else {
for (var prefix in ignoreLogPrefix) {
if (className.startsWith(ignoreLogPrefix[prefix])) {
return;
}
}
}
cache.push(` §e->§c ${className}.${trace.methodName}(§4${fileName}:${trace.lineNumber}§c)`);
}
});
return cache;
}
stack(ex: Error, color: boolean = true): string[] {
return jsconsole.getStackTrace(ex, color)
}
assert(value: any, message?: string, ...optionalParams: any[]): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
clear(): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
count(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
countReset(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
dir(obj: any, options?: NodeJS.InspectOptions): void {
throw new Error("Method not implemented.");
dir(obj: any, options?: any): void {
throw new Error("Method not implemented.")
}
dirxml(...data: any[]): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
exception(message?: string, ...optionalParams: any[]): void {
throw new Error('Method not implemented.')
}
group(...label: any[]): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
groupCollapsed(...label: any[]): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
groupEnd(): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
table(tabularData: any, properties?: string[]): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
time(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
timeEnd(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
timeLog(label?: string, ...data: any[]): void {
throw new Error("Method not implemented.");
}
trace(message?: any, ...optionalParams: any[]): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
markTimeline(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
profile(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
profileEnd(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
timeStamp(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
timeline(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
timelineEnd(label?: string): void {
throw new Error("Method not implemented.");
throw new Error("Method not implemented.")
}
}

View File

@@ -0,0 +1,38 @@
export namespace constants {
export namespace ServiceIdentifier {
/**
* Runtime Server NettyPipeline
*/
export const NettyPipeline = Symbol("NettyPipeline")
/**
* Runtime Server RootLogger
*/
export const RootLogger = Symbol("RootLogger")
}
export namespace Reflect {
export const Method = {
getServerConnection: [
/*spigot 1.8.8*/'aq',
/*spigot 1.12.2*/ 'an',
/*spigot 1.14.4+*/'getServerConnection',
/*spigot 1.19+*/'ad',
/*catserver 1.12.2*/'func_147137_ag'
]
}
export const Field = {
listeningChannels: [
/*spigot 1.8.8-1.12.2*/'g',
/*spigot 1.14.4*/'f',
/*spigot 1.15.2+*/'listeningChannels',
/*catserver 1.12.2*/'field_151274_e'
]
}
}
export enum ServerType {
Bukkit = 'bukkit',
Sponge = 'sponge',
Nukkit = 'nukkit',
Bungee = 'bungee',
Spring = 'spring'
}
}

View File

@@ -0,0 +1,56 @@
import { injectable } from "@ccms/container"
export namespace database {
export const DataSource = Symbol("DataSource")
/**
* 数据库配置
*/
export interface DataBaseConfig {
/**
* 数据库类型
*/
type: 'h2' | 'mysql' | 'mongodb' | 'sqlite' | 'postgres' | 'redis'
/**
* 数据库连接串
*/
url: string | javax.sql.DataSource
/**
* 数据库驱动
*/
driverClassName?: string
/**
* 用户名
*/
username?: string
/**
* 密码
*/
password?: string
/**
* 链接属性
*/
properties?: { [key: string]: any }
/**
* 调试模式
*/
debug?: boolean
}
@injectable()
export abstract class DataBaseManager {
abstract setMainDatabase(mainDatabase: DataBase): void
abstract getMainDatabase(): DataBase
abstract createDatabase(name: string, config: DataBaseConfig): DataBase
abstract removeDatabase(name: string): boolean
abstract getDatabase(name: string): DataBase
abstract startWebManager(...args: string[])
abstract stopWebManager()
abstract shutdown()
}
@injectable()
export abstract class DataBase {
abstract query<T>(sql: string, ...args: any[]): Array<T>
abstract update(sql: string, ...args: any[]): number
abstract execute(sql: string): void
}
}

View File

@@ -1,150 +1,205 @@
'use strict';
/**
* MiaoScript Event处理类
*/
import '@ms/core'
import '@ms/nashorn'
import { injectable } from '@ms/container'
import i18n from '@ccms/i18n'
import { injectable, unmanaged } from '@ccms/container'
const Thread = Java.type("java.lang.Thread");
const Thread = Java.type('java.lang.Thread')
export namespace event {
/**
* 事件监听优先级
*/
export enum EventPriority {
LOWEST = "LOWEST",
LOW = "LOW",
NORMAL = "NORMAL",
HIGH = "HIGH",
HIGHEST = "HIGHEST",
MONITOR = "MONITOR",
}
@injectable()
export abstract class Event {
private mapEvent = [];
private listenerMap = [];
private baseEventDir = '';
// export EventPriority to blockly
public EventPriority = EventPriority;
constructor(baseEventDir: string) {
this.baseEventDir = baseEventDir;
private mapEvent = [];
private pluginEventMap = [];
private cacheSlowEventKey = {};
protected baseEventDir = '';
constructor(@unmanaged() baseEventDir: string) {
this.baseEventDir = baseEventDir
}
/**
* 扫描包 org.bukkit.event 下的所有事件
* 映射简写名称 org.bukkit.event.player.PlayerLoginEvent => playerloginevent
* abstract event map function
* ig: org.bukkit.event.player.PlayerLoginEvent => playerloginevent
* org.spongepowered.api.event.game.GameRegistryEvent.Register => gameregistryevent$register
*/
mapEventName() {
if (this.baseEventDir === "") {
throw new Error("事件基础包名为空 无法进行事件映射!");
}
var count = 0;
var dirs = Thread.currentThread().getContextClassLoader().getResources(this.baseEventDir);
while (dirs.hasMoreElements()) {
var url = dirs.nextElement();
var protocol = url.protocol;
if (protocol === "jar") {
// noinspection JSUnresolvedVariable
var jar = url.openConnection().jarFile;
var entries = jar.entries();
while (entries.hasMoreElements()) {
var entry = entries.nextElement();
var name = entry.name;
// 以 org/bukkit/event 开头 并且以 .class 结尾
if (name.startsWith(this.baseEventDir) && name.endsWith(".class")) {
var i = name.replaceAll('/', '.');
try {
var clz = base.getClass(i.substring(0, i.length - 6));
// 继承于 org.bukkit.event.Event 访问符为Public
if (this.isValidEvent(clz)) {
var simpleName = this.class2Name(clz).toLowerCase();
console.debug(`Mapping Event [${clz.canonicalName}] => ${simpleName}`);
this.mapEvent[simpleName] = clz;
count++;
}
} catch (ex) {
//ignore already loaded class
}
if (this.baseEventDir === "") { throw new Error(i18n.translate('ms.api.event.empty.event.dir')) }
let count = 0
let jar = this.getJarFile(this.baseEventDir)
let entries = jar.entries()
while (entries.hasMoreElements()) {
let entry = entries.nextElement()
let name = entry.name
if (name.startsWith(this.baseEventDir) && name.endsWith(".class")) {
// replace name to qualifiedName
let qualifiedName = name.replaceAll('/', '.')
try {
let clazz = base.getClass(qualifiedName.substring(0, qualifiedName.length - 6))
if (this.isValidEvent(clazz)) {
let simpleName = this.class2Name(clazz).toLowerCase()
console.trace(i18n.translate("ms.api.event.mapping", { canonicalName: clazz.canonicalName, simpleName }))
this.mapEvent[simpleName] = clazz
count++
}
} catch (ex: any) {
//ignore already loaded class
}
}
}
return count;
};
return count
}
class2Name(clazz) {
return clazz.simpleName;
};
getJarFile(resource: string, loader?: any) {
let dirs = (loader || Thread.currentThread().getContextClassLoader()).getResources(resource)
if (dirs.hasMoreElements()) {
let url = dirs.nextElement()
if (url.protocol === "jar") { return url.openConnection().jarFile }
}
throw new Error(i18n.translate("ms.api.event.resource.not.found", { resource }))
}
name2Class(name, event) {
var eventCls = this.mapEvent[event.toLowerCase()] || this.mapEvent[event.toLowerCase() + 'event'];
class2Name(clazz: any) {
return clazz.simpleName
}
name2Class(name: any, event: string) {
let eventCls = this.mapEvent[event.toLowerCase()] || this.mapEvent[event.toLowerCase() + 'event']
if (!eventCls) {
try {
eventCls = base.getClass(eventCls);
this.mapEvent[event] = eventCls;
} catch (ex) {
console.console(`§6插件 §b${name} §6注册事件 §c${event} §6失败 §4事件未找到!`);
console.ex(new Error(`插件 ${name} 注册事件 ${event} 失败 事件未找到!`));
return;
eventCls = base.getClass(event)
this.mapEvent[event] = eventCls
} catch (ex: any) {
console.i18n("ms.api.event.not.found", { name, event })
return
}
}
return eventCls;
};
return eventCls
}
execute(name, exec, eventCls) {
return (...args) => {
/**
* 创建命令执行器
* @param name 插件名称
* @param exec 执行方法
* @param eventCls 事件类
* @returns
*/
createExecute(name, exec, eventCls) {
return (...args: any[]) => {
let event = args[args.length - 1]
try {
var time = new Date().getTime()
exec(args[args.length - 1]);
var cost = new Date().getTime() - time;
if (cost > 20) {
console.console(`§c注意! §6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件 §c耗时 §4${cost}ms !`)
if (!eventCls.isAssignableFrom(event.getClass())) { return }
let time = Date.now(); exec(event); let cost = Date.now() - time
if (cost > global.ScriptSlowExecuteTime && !event.async) {
let eventKey = `${name}-${this.class2Name(eventCls)}`
if (!this.cacheSlowEventKey[eventKey]) { return this.cacheSlowEventKey[eventKey] = cost }
console.i18n("ms.api.event.execute.slow", { name, event: this.class2Name(eventCls), cost })
}
} catch (ex) {
console.console(`§6插件 §b${name} §6处理 §d${this.class2Name(eventCls)} §6事件时发生异常 §4${ex}`);
console.ex(ex);
} catch (ex: any) {
console.i18n("ms.api.event.execute.error", { name, event: this.class2Name(eventCls), ex })
console.ex(ex)
}
};
};
}
}
/**
* 添加事件监听
* @param plugin
* @param event
* @param exec {function}
* @param priority [LOWEST,LOW,NORMAL,HIGH,HIGHEST,MONITOR]
* @param ignoreCancel
* @param plugin {any} 插件
* @param event {string} 事件名称
* @param exec {function} 事件执行器
* @param priority {string} [LOWEST,LOW,NORMAL,HIGH,HIGHEST,MONITOR] 优先级
* @param ignoreCancel 是否忽略已取消事件
*/
listen(plugin, event, exec, priority = 'NORMAL', ignoreCancel = false) {
if (!plugin || !plugin.description || !plugin.description.name) throw new TypeError('插件名称为空 请检查传入参数!');
var name = plugin.description.name;
var eventCls = this.name2Class(name, event);
if (!eventCls) { return; }
listen(plugin: any, event: string, exec: (event: any) => void, priority: EventPriority = EventPriority.NORMAL, ignoreCancel = false) {
if (!plugin || !plugin.description || !plugin.description.name) throw new TypeError(i18n.translate("ms.api.event.listen.plugin.name.empty"))
var name = plugin.description.name
var eventCls = this.name2Class(name, event)
if (!eventCls) { return () => { console.warn('event ' + event + ' not found ignore off listener.') } }
if (typeof priority === 'boolean') {
ignoreCancel = priority;
priority = 'NORMAL';
ignoreCancel = priority
priority = EventPriority.NORMAL
}
priority = priority || 'NORMAL';
ignoreCancel = ignoreCancel || false;
priority = priority || EventPriority.NORMAL
ignoreCancel = ignoreCancel || false
// @ts-ignore
let executor = exec.name || exec.executor || '[anonymous]'
// noinspection JSUnusedGlobalSymbols
var listener = this.register(eventCls, this.execute(name, exec, eventCls), priority, ignoreCancel);
var listenerMap = this.listenerMap;
// 添加到缓存 用于关闭插件的时候关闭事件
if (!listenerMap[name]) listenerMap[name] = [];
var offExec = () => {
this.unregister(eventCls, listener);
console.debug(`插件 ${name} 注销事件 ${this.class2Name(eventCls)}`);
};
var off = {
event: eventCls,
listener: listener,
off: offExec
};
listenerMap[name].push(off);
let listener = this.register(
eventCls,
this.createExecute(name, exec, eventCls),
priority,
ignoreCancel
)
// add to cache Be used for close plugin to close event
if (!this.pluginEventMap[name]) this.pluginEventMap[name] = []
let off = () => {
if (off['offed']) return
off['offed'] = true
this.unregister(eventCls, listener)
console.debug(i18n.translate("ms.api.event.unregister", {
name,
event: this.class2Name(eventCls),
exec: executor
}))
}
this.pluginEventMap[name].push(off)
// noinspection JSUnresolvedVariable
console.debug(`插件 ${name} 注册事件 ${this.class2Name(eventCls)} => ${exec.name || '匿名方法'}`);
return off;
console.debug(i18n.translate("ms.api.event.register", {
name,
event: this.class2Name(eventCls),
exec: executor,
priority,
ignore: ignoreCancel
}))
return off
}
/**
* 关闭插件监听任务
* @param plugin 插件
*/
disable(plugin: any) {
var eventCache = this.listenerMap[plugin.description.name];
var eventCache = this.pluginEventMap[plugin.description.name]
if (eventCache) {
eventCache.forEach(t => t.off());
delete this.listenerMap[plugin.description.name];
eventCache.forEach((off: () => any) => off())
delete this.pluginEventMap[plugin.description.name]
}
}
abstract isValidEvent(clazz: any): boolean;
abstract register(eventCls: any, exec: Function, priority: any, ignoreCancel: boolean): any;
abstract unregister(event: any, listener: any): void;
/**
* 判断
* @param clazz 事件类
*/
abstract isValidEvent(clazz: any): boolean
/**
* 注册事件
* @param eventCls 事件类
* @param exec 执行器
* @param priority 优先级
* @param ignoreCancel 是否忽略已取消的事件
*/
abstract register(eventCls: any, exec: Function, priority: any, ignoreCancel: boolean): any
/**
* 取消监听事件
* @param event 事件
* @param listener 监听器
*/
abstract unregister(event: any, listener: any): void
}
}

View File

@@ -1,7 +1,16 @@
import './typings/global'
import "@ccms/nashorn"
export * from './chat'
export * from './task'
export * from './item'
export * from './event'
export * from './proxy'
export * from './plugin'
export * from './server'
export * from './console'
export { jsconsole as console } from './console'
export * from './channel'
export * from './command'
export * from './interfaces'
export * from './database'
export * from './particle'
export * from './constants'

View File

@@ -1,2 +0,0 @@
export * from './plugin'
export * from './server'

View File

@@ -1,28 +0,0 @@
import { Container } from "@ms/container";
export namespace plugin {
/**
* MiaoScript Plugin
*/
export const Plugin = Symbol("Plugin");
/**
* Runtime Plugin Instance
*/
export const PluginInstance = Symbol("PluginInstance");
/**
* MiaoScript Plugin Manager
*/
export const PluginManager = Symbol("PluginManager");
/**
* MiaoScript Plugin Manager
*/
export interface PluginManager {
scan(folder: string): void;
build(container: Container): void;
load(...args: any[]): void;
enable(...args: any[]): void;
disable(...args: any[]): void;
reload(...args: any[]): void;
getPlugins(): Map<string, any>;
}
}

View File

@@ -1,4 +0,0 @@
export namespace server {
export const ServerType = Symbol("ServerType");
export const Console = Symbol("Console");
}

20
packages/api/src/item.ts Normal file
View File

@@ -0,0 +1,20 @@
import { injectable } from '@ccms/container'
export namespace item {
@injectable()
export abstract class Item {
abstract builder(): ItemBuilder
abstract toJson(item: any): string
abstract fromJson(json: string): any
}
export interface ItemBuilder {
from(item: any): ItemBuilder
create(type: string | number): ItemBuilder
name(name: string): ItemBuilder
lore(...lores: string[]): ItemBuilder
amount(amount: number): ItemBuilder
durability(durability: number): ItemBuilder
clone(): any
build(): any
}
}

View File

@@ -0,0 +1,507 @@
import { Autowired, injectable } from '@ccms/container'
import { task, plugin } from './index'
const UUID = Java.type('java.util.UUID')
const Math = Java.type('java.lang.Math')
export namespace particle {
@injectable()
export abstract class ParticleSpawner {
abstract spawn(location: any, particle: Particle)
abstract spawnToPlayer(player: any, location: any, particle: Particle)
}
/**
* 表示一个特效对象
*
* @author Zoyn
*/
export abstract class Particle {
private spawner: ParticleSpawner
private readonly uuid: string
private particle: any /* Particle */
private count: number = 1;
private offsetX: number = 0;
private offsetY: number = 0;
private offsetZ: number = 0;
private extra: number = 0;
private data: Object = null;
/**
* Only Show To Player
*/
private player: any
constructor() {
this.uuid = UUID.randomUUID().toString()
}
abstract show(location: any)
getUUID() {
return this.uuid
}
getSpawner() {
return this.spawner
}
setSpawner(spawner: ParticleSpawner) {
this.spawner = spawner
return this
}
getParticle() {
return this.particle
}
setParticle(particle: any, data: any = null) {
this.particle = particle
this.data = data
return this
}
getCount() {
return this.count
}
setCount(count: number) {
this.count = count
return this
}
getOffsetX() {
return this.offsetX
}
setOffsetX(offsetX: number) {
this.offsetX = offsetX
return this
}
getOffsetY() {
return this.offsetY
}
setOffsetY(offsetY: number) {
this.offsetY = offsetY
return this
}
getOffsetZ() {
return this.offsetZ
}
setOffsetZ(offsetZ: number) {
this.offsetZ = offsetZ
return this
}
getExtra() {
return this.extra
}
setExtra(extra: number) {
this.extra = extra
return this
}
getData() {
return this.data
}
setData(data) {
this.data = data
return this
}
getPlayer() {
return this.player
}
setPlayer(player) {
this.player = player
return this
}
/**
* 通过给定一个坐标就可以使用已经指定的参数来播放粒子
*
* @param location 坐标
*/
spawn(location: any) {
if (!this.spawner) throw new Error(`particle ${this.uuid} not set spawner can't spawn!`)
if (this.player) {
this.spawner.spawnToPlayer(this.player, location, this)
} else {
this.spawner.spawn(location, this)
}
}
}
/**
* 表示一条线
*
* @author Zoyn
*/
export class Line extends Particle {
private vector: any
private start: any
private end: any
/**
* 步长
*/
private step: number
/**
* 向量长度
*/
private length: number
/**
* 构造一条线
*
* @param start 线的起点
* @param end 线的终点
*/
constructor(start: any, end: any)
/**
* 构造一条线
*
* @param start 线的起点
* @param end 线的终点
* @param step 每个粒子之间的间隔 (也即步长)
*/
constructor(start: any, end: any, step: number = 0.1) {
super()
this.start = start
this.end = end
this.step = step
// 对向量进行重置
this.resetVector()
}
show() {
for (let i = 0; i < this.length; i += this.step) {
this.spawn(this.start.clone().add(this.vector.clone().multiply(i)))
}
}
/**
* 获取线的起始坐标
*
* @return {@link Location}
*/
getStart() {
return this.start
}
/**
* 利用给定的坐标设置线的起始坐标
*
* @param start 起始坐标
* @return {@link Line}
*/
setStart(start) {
this.start = start
this.resetVector()
return this
}
/**
* 获取线的终点坐标
*
* @return {@link Location}
*/
getEnd() {
return this.end
}
/**
* 利用给定的坐标设置线的终点坐标
*
* @param end 终点
* @return {@link Line}
*/
setEnd(end) {
this.end = end
this.resetVector()
return this
}
/**
* 获取每个粒子之间的间隔
*
* @return 也就是循环的步长
*/
getStep() {
return this.step
}
/**
* 设置每个粒子之间的间隔
*
* @param step 间隔
* @return {@link Line}
*/
setStep(step) {
this.step = step
this.resetVector()
return this
}
/**
* 手动重设线的向量
*/
resetVector() {
this.vector = this.end.clone().subtract(this.start).toVector()
this.length = this.vector.length()
this.vector.normalize()
}
}
/**
* 表示一个弧
*
* @author Zoyn
*/
export class Arc extends Particle {
private angle: number
private radius: number
private step: number
/**
* 构造一个弧
*
* @param origin 弧所在的圆的圆点
* @param angle 弧所占的角度
* @param radius 弧所在的圆的半径
* @param step 每个粒子的间隔(也即步长)
*/
constructor(angle: number = 30, radius: number = 1, step: number = 1) {
super()
this.angle = angle
this.radius = radius
this.step = step
}
show(location: any) {
for (let i = 0; i < this.angle; i += this.step) {
let radians: number = Math.toRadians(i)
let x: number = this.radius * Math.cos(radians)
let z: number = this.radius * Math.sin(radians)
super.spawn(location.clone().add(x, 0, z))
}
}
getAngle(): number {
return this.angle
}
setAngle(angle: number): Arc {
this.angle = angle
return this
}
getRadius(): number {
return this.radius
}
setRadius(radius: number): Arc {
this.radius = radius
return this
}
getStep(): number {
return this.step
}
setStep(step: number): Arc {
this.step = step
return this
}
}
/**
* 表示一个圆
*
* @author Zoyn
*/
export class Circle extends Arc {
constructor(radius: number)
constructor(radius: number, step: number)
/**
* 构造一个圆
*
* @param origin 圆的圆点
* @param radius 圆的半径
* @param step 每个粒子的间隔(也即步长)
* @param period 特效周期(如果需要可以使用)
*/
constructor(radius: number = 1, step: number = 1) {
// Circle只需要控制这个fullArc就可以满足所有的要求
super(360, radius, step)
}
}
const AtomicInteger = Java.type("java.util.concurrent.atomic.AtomicInteger")
@injectable()
export abstract class ParticleManager {
@Autowired()
private taskManager: task.TaskManager
@Autowired()
private particleSpawner: particle.ParticleSpawner
protected taskId: java.util.concurrent.atomic.AtomicInteger
protected cacheTasks = new Map<string, ParticleTask>()
protected pluginCacheTasks = new Map<string, Map<number, ParticleTask>>()
constructor() {
this.taskId = new AtomicInteger(0)
}
/**
* 获得自增的任务ID
*/
public nextId() {
return this.taskId.incrementAndGet()
}
public getTaskManager() {
return this.taskManager
}
public getParticleSpawner() {
return this.particleSpawner
}
public create(particle: Particle, plugin?: plugin.Plugin) {
let uuid = particle.getUUID()
if (this.cacheTasks.has(uuid)) {
return this.cacheTasks.get(uuid)
}
let task = this.create0(plugin, particle)
this.cacheTasks.set(uuid, task)
if (plugin) {
if (!this.pluginCacheTasks.has(plugin.description.name)) {
this.pluginCacheTasks.set(plugin.description.name, new Map())
}
this.pluginCacheTasks.get(plugin.description.name).set(task.getTaskId(), task)
}
return task
}
public cancel(particle: Particle) {
let uuid = particle.getUUID()
if (this.cacheTasks.has(uuid)) {
this.cacheTasks.get(uuid).cancel()
this.cacheTasks.delete(uuid)
} else {
throw new Error(`particle ${uuid} not found!`)
}
}
disable(plugin: plugin.Plugin) {
if (this.pluginCacheTasks.has(plugin.description.name)) {
this.pluginCacheTasks
.get(plugin.description.name)
.forEach((task) => task.cancel())
this.pluginCacheTasks.delete(plugin.description.name)
}
}
protected create0(owner: plugin.Plugin, particle: Particle): ParticleTask {
particle.setSpawner(this.getParticleSpawner())
return new ParticleTask(owner, particle, this)
}
}
export class ParticleTask {
private particle: Particle
private isAsync: boolean = false
private interval: number = 0
private _location: any
private _follow: any
private owner: plugin.Plugin
private taskId: number
private task: task.Task
private taskManager: task.TaskManager
protected particleManager: ParticleManager
constructor(owner: plugin.Plugin, particle: Particle, particleManager: ParticleManager) {
this.owner = owner
this.taskId = particleManager.nextId()
this.particle = particle
this.taskManager = particleManager.getTaskManager()
this.particleManager = particleManager
}
getOwner() {
return this.task.getOwner()
}
getTaskId() {
return this.taskId
}
getParticle() {
return this.particle
}
async(isAsync: boolean = true) {
this.isAsync = isAsync
return this
}
timer(tick: number) {
this.interval = tick
return this
}
follow(entity: { getLocation: () => any }) {
this._follow = entity
this._location = undefined
return this
}
location(location: any) {
this._location = location
this._follow = undefined
return this
}
submit() {
this.cancel()
if (this._follow && !this.interval) throw new Error(`enable follow entity but interval is ${this.interval}!`)
this.taskManager.create(() => {
this.task = this.taskManager
.create(() => {
try {
if (this._follow) {
if (!this._follow.isOnline()) return this.cancel()
this.particle.show(this._follow.getLocation().clone().add(0, 1, 0))
} else if (this._location) {
this.particle.show(this._location)
} else {
console.warn(`ParticleTask ${this.taskId} particle ${this.particle.getUUID()} cancel because entity and location both undefined!`)
this.task.cancel()
}
} catch (error: any) {
console.error(`§6插件 §a${this.owner.description.name} §c播放粒子发送异常 §4粒子播放任务已终止!`)
console.ex(error)
this.cancel()
}
}, this.owner)
.async(this.isAsync)
.timer(this.interval)
.submit()
}, this.owner).later(2).submit()
return this
}
cancel() {
if (this.task != null) {
this.task.cancel()
}
}
}
}

202
packages/api/src/plugin.ts Normal file
View File

@@ -0,0 +1,202 @@
import { injectable } from '@ccms/container'
export namespace plugin {
/**
* MiaoScript Plugin
*/
export const Plugin = Symbol("Plugin")
/**
* MiaoScript Plugin Folder
*/
export const PluginFolder = Symbol("PluginFolder")
/**
* Runtime Plugin Instance
*/
export const PluginInstance = Symbol("PluginInstance")
/**
* MiaoScript Plugin Manager Interface
*/
@injectable()
export abstract class PluginManager {
abstract scan(folder: string): void
abstract build(): void
abstract loadFromFile(file: string, ext?: any): Plugin
abstract load(...args: any[]): void
abstract enable(...args: any[]): void
abstract disable(...args: any[]): void
abstract reload(...args: any[]): void
abstract getPlugin(name: string): plugin.Plugin
abstract getPlugins(): Map<string, plugin.Plugin>
}
export const PluginScanner = Symbol("PluginScanner")
/**
* 插件加载元信息
*/
export interface PluginLoadMetadata {
/**
* 插件加载类型
*/
type: string
/**
* 插件文件
*/
file?: string
/**
* 插件实例
*/
instance?: any
/**
* 插件元信息
*/
metadata?: PluginMetadata
/**
* 插件扫描器
*/
scanner: PluginScanner
/**
* 插件加载器
*/
loader?: PluginLoader
/**
* 是否已加载
*/
loaded?: boolean
[key: string]: any
}
/**
* 插件扫描器
*/
export interface PluginScanner {
/**
* 扫描器类型
*/
type: string
/**
* 扫描插件目录 返回插件加载元信息列表
* @param target 扫描目标
*/
scan(target: any): PluginLoadMetadata[]
/**
* 读取插件 返回插件加载元信息
* @param target
*/
read(target: any): PluginLoadMetadata
/**
* 加载扫描到的目标
* @param target 加载目标
*/
load(target: PluginLoadMetadata): PluginLoadMetadata
}
export const PluginLoader = Symbol("PluginLoader")
/**
* 插件加载器
*/
export interface PluginLoader {
/**
* 加载器类型
*/
type: string
/**
* 加载插件 获取元数据
* @param target 加载目标
* @param result 扫描器加载的结果
*/
require(loadMetadata: PluginLoadMetadata): PluginLoadMetadata
/**
* 构建插件
* @param metadata 插件元信息
*/
build(metadata: PluginMetadata): Plugin
/**
* Load 阶段
* @param plugin 插件
*/
load?(plugin: Plugin): void
/**
* Enable 阶段
* @param plugin 插件
*/
enable?(plugin: Plugin): void
/**
* Disable 阶段
* @param plugin 插件
*/
disable?(plugin: Plugin): void
/**
* Reload 阶段
* @param plugin 插件
*/
reload?(plugin: Plugin): void
}
export interface Plugin {
description: PluginMetadata
logger: Console
load(): void
enable(): void
disable(): void
}
export interface BaseMetadata {
/**
* 名称 为空则为对象名称
*/
name?: string
/**
* 支持的服务器列表 为空则代表所有
*/
servers?: string[]
}
export interface PluginMetadata extends BaseMetadata {
/**
* 插件名称 不填默认为类名
*/
name: string
/**
* 插件中文名称
*/
cname?: string
/**
* 付费插件ID
*/
pid?: number
/**
* 付费插件等级 付费插件自动注入
*/
level?: number
/**
* 前缀
*/
prefix?: string
/**
* 插件版本 不填默认为 1.0.0
*/
version?: string
/**
* 插件作者 不填默认为 Unknow
*/
author?: string | string[]
/**
* 脚本依赖
*/
depends?: string[]
/**
* 插件依赖
*/
nativeDepends?: string[]
/**
* 插件源文件 必须指定为 __filename
*/
source: string
/**
* 插件类型 默认为 ioc 执行 MiaoScript 加载逻辑
*/
type?: string
/**
* 插件加载信息
*/
loadMetadata?: PluginLoadMetadata
/**
* 插件本体
*/
target?: any
}
}

161
packages/api/src/proxy.ts Normal file
View File

@@ -0,0 +1,161 @@
import { provideSingleton, Autowired, optional } from '@ccms/container'
import { channel } from './channel'
export namespace proxy {
const ByteArrayOutputStream = Java.type('java.io.ByteArrayOutputStream')
const DataOutputStream = Java.type('java.io.DataOutputStream')
namespace bungeecord {
const CHANNEL_NAME = "BungeeCord"
export class SubChannelBuilder {
private channel: channel.Channel
private player: any
private params: string[]
constructor(channel: channel.Channel, player: any) {
this.channel = channel
this.player = player
this.params = []
}
connect(server: string) {
this.params.push("Connect")
this.params.push(server)
return this.finalSend()
}
connectOther(player: string, server: string) {
this.params.push("ConnectOther")
this.params.push(player)
this.params.push(server)
return this.finalSend()
}
ip() {
this.params.push("IP")
return this.finalSend()
}
ipOther(player: string) {
this.params.push("IPOther")
this.params.push(player)
return this.finalSend()
}
playerCount(server: string | "ALL") {
this.params.push("PlayerCount")
this.params.push(server)
return this.finalSend()
}
/**
* Get a list of players connected on a certain server, or on ALL the servers.
* @param server count server
* Response:
* String server = in.readUTF(); // The name of the server you got the player list of, as given in args.
* String[] playerList = in.readUTF().split(", ");
*/
playerList(server: string | "ALL") {
this.params.push("PlayerList")
this.params.push(server)
return this.finalSend()
}
/**
* Get a list of server name strings, as defined in BungeeCord's config.yml
* Response:
* String[] serverList = in.readUTF().split(", ");
*/
getServers() {
this.params.push("GetServers")
return this.finalSend()
}
/**
* Get this server's name, as defined in BungeeCord's config.yml
*/
getServer() {
this.params.push("GetServer")
return this.finalSend()
}
broadcast(message: string) {
this.message("ALL", message)
return this.finalSend()
}
/**
* Send a message (as in, a chat message) to the specified player.
* @param player who reciver message
* @param message message content
*/
message(player: string | "ALL", message: string) {
this.params.push("Message")
this.params.push(player)
this.params.push(message)
return this.finalSend()
}
/**
* Send a raw message (as in, a chat message) to the specified player. The advantage of this method over Message is that you can include click events and hover events.
* @param player who reciver message
* @param message message content
*/
messageRaw(player: string | "ALL", json: string) {
this.params.push("MessageRaw")
this.params.push(player)
this.params.push(json)
return this.finalSend()
}
forwardAll(channel: string, data: any) {
return this.forward("ALL", channel, data)
}
/**
* Send a custom plugin message to said server. This is one of the most useful channels ever.
* Remember, the sending and receiving server(s) need to have a player online.
* @param server reciver
* @param channel channelName
* @param data data
*/
forward(server: string | "ALL", channel: string, data: any) {
this.params.push("Forward")
this.params.push(server)
this.params.push(channel)
this.params.push(typeof data === "string" ? data : JSON.stringify(data))
return this.finalSend()
}
/**
* Send a custom plugin message to said server. This is one of the most useful channels ever.
* Remember, the sending and receiving server(s) need to have a player online.
* @param server reciver
* @param channel channelName
* @param data data
*/
forwardToPlayer(server: string | "ALL", channel: string, data: any) {
this.params.push("Forward")
this.params.push(server)
this.params.push(channel)
this.params.push(typeof data === "string" ? data : JSON.stringify(data))
return this.finalSend()
}
generic(...args: string[]) {
args && this.params.concat(...args)
return this.finalSend()
}
private send(...middlewares: ((out: java.io.DataOutputStream) => void)[]) {
let byteArray = new ByteArrayOutputStream()
let out = new DataOutputStream(byteArray)
this.params.forEach(utf => out.writeUTF(utf))
for (let middleware of middlewares) {
middleware(out)
}
return this.channel.send(this.player, CHANNEL_NAME, byteArray.toByteArray())
}
private finalSend() {
return {
send: this.send.bind(this)
}
}
}
}
@provideSingleton(BungeeCord)
export class BungeeCord {
@optional()
@Autowired()
private channel: channel.Channel
/**
* 获得代理
* @param player 玩家
*/
for(player: any): bungeecord.SubChannelBuilder {
return new bungeecord.SubChannelBuilder(this.channel, player)
}
}
}

229
packages/api/src/server.ts Normal file
View File

@@ -0,0 +1,229 @@
import * as reflect from '@ccms/common/dist/reflect'
import { injectable, Autowired, ContainerInstance, Container, postConstruct } from '@ccms/container'
import { constants } from './constants'
export namespace server {
/**
* Runtime ServerType
*/
export const ServerType = Symbol("ServerType")
/**
* Runtime Console
*/
export const Console = Symbol("Console")
/**
* Runtime Server Instance
*/
export const ServerInstance = Symbol("ServerInstance")
export interface NativePlugin {
name: string
version: string
authors?: string | string[]
enable: boolean
depends?: string[]
softDepends?: string[]
/**
* 插件本体
*/
origin: any
[key: string]: any
}
@injectable()
export abstract class NativePluginManager {
list(): NativePlugin[] {
throw new Error("Method not implemented.")
}
has(name: string): boolean {
return true
}
get(name: string): NativePlugin {
throw new Error("Method not implemented.")
}
enable(name: string): NativePlugin {
throw new Error("Method not implemented.")
}
disable(name: string): NativePlugin {
throw new Error("Method not implemented.")
}
reload(name: string): NativePlugin {
throw new Error("Method not implemented.")
}
delete(name: string): boolean {
throw new Error("Method not implemented.")
}
}
/**
* MiaoScript Server
*/
@injectable()
export abstract class Server {
getVersion(): string {
throw new Error("Method not implemented.")
}
getPlayer(name: string): any {
throw new Error("Method not implemented.")
}
getOnlinePlayers(): any[] {
throw new Error("Method not implemented.")
}
getConsoleSender(): any {
throw new Error("Method not implemented.")
}
getService(service: string): any {
throw new Error("Method not implemented.")
}
broadcast(message: string, permission: string) {
throw new Error("Method not implemented.")
}
broadcastMessage(message: string) {
throw new Error("Method not implemented.")
}
dispatchCommand(sender: string | any, command: string): boolean {
throw new Error("Method not implemented.")
}
dispatchConsoleCommand(command: string): boolean {
throw new Error("Method not implemented.")
}
getPluginsFolder(): string {
throw new Error("Method not implemented.")
}
getDedicatedServer?(): any {
throw new Error("Method not implemented.")
}
getNettyPipeline(): any {
throw new Error("Method not implemented.")
}
getRootLogger(): any {
throw new Error("Method not implemented.")
}
}
@injectable()
export class ServerChecker {
@Autowired(ServerType)
private serverType: string
check(servers: string[]) {
// Not set servers -> allow
if (!servers || !servers.length) return true
// include !type -> deny
let denyServers = servers.filter(svr => svr.startsWith("!"))
if (denyServers.length !== 0) {
return !denyServers.includes(`!${this.serverType}`)
} else {
// only include -> allow
return servers.includes(this.serverType)
}
}
}
@injectable()
export class NativePluginChecker {
@Autowired(NativePluginManager)
private nativePluginManager: NativePluginManager
check(plugins: string[]) {
// Not set plugins -> allow
if (!plugins || !plugins.length) return true
for (const plugin of plugins) {
if (!this.nativePluginManager.has(plugin)) { return false }
}
return true
}
}
@injectable()
export abstract class ReflectServer extends server.Server {
@Autowired(ContainerInstance)
private container: Container
protected pipeline: any
protected rootLogger: any
constructor() {
super()
}
@postConstruct()
protected reflect() {
try {
let consoleServer = this.getDedicatedServer()
this.reflectPipeline(consoleServer)
this.reflectRootLogger(consoleServer)
} catch (error: any) {
console.error('Error When Reflect MinecraftServer!', error)
console.ex(error)
}
}
protected reflectPipeline(consoleServer: any) {
let connection: any
let promise: any
for (const method of constants.Reflect.Method.getServerConnection) {
try {
connection = reflect.on(consoleServer).call(method).get()
if (connection.class.name.indexOf('ServerConnection') !== -1
|| connection.class.name.indexOf('NetworkSystem') !== -1) { break }
connection = undefined
} catch (error: any) {
if (global.debug) {
console.ex(error)
}
}
}
if (!connection) { console.error("Can't found ServerConnection!"); return }
for (const field of constants.Reflect.Field.listeningChannels) {
try {
promise = reflect.on(connection).get(field).get().get(0)
if (promise.class.name.indexOf('Promise') !== -1) { break }
promise = undefined
} catch (error: any) {
if (global.debug) {
console.ex(error)
}
}
}
if (!promise) { console.error("Can't found listeningChannels!"); return }
this.pipeline = reflect.on(promise).get('channel').get().pipeline()
this.container.bind(constants.ServiceIdentifier.NettyPipeline).toConstantValue(this.pipeline)
}
protected reflectRootLogger(consoleServer: any) {
try {
this.rootLogger = reflect.on(consoleServer).get('LOGGER').get()
} catch (error: any) {
if (global.debug) {
console.ex(error)
}
try {
this.rootLogger = reflect.on(consoleServer).get(0).get()
} catch (error: any) {
if (global.debug) {
console.ex(error)
}
}
}
if (this.rootLogger.class.name.indexOf('slf4j') !== -1) {
try {
let LogManager = Java.type('org.apache.logging.log4j.LogManager')
this.rootLogger = LogManager.getLogger('ROOT')
} catch (error: any) {
if (global.debug) {
console.ex(error)
}
}
}
if (this.rootLogger && this.rootLogger.class.name.indexOf('Logger') === -1) {
console.error('Error Logger Class: ' + this.rootLogger.class.name)
this.rootLogger = undefined
}
if (!this.rootLogger) { console.error("Can't found rootLogger!") }
// get root logger
for (let index = 0; index < 5 && this.rootLogger.parent; index++) {
this.rootLogger = this.rootLogger.parent
}
this.container.bind(constants.ServiceIdentifier.RootLogger).toConstantValue(this.rootLogger)
}
}
}

View File

@@ -1,55 +1,197 @@
import { injectable, DefaultContainer as container } from "@ms/container";
import { EventEmitter } from 'events'
import { injectable } from '@ccms/container'
import { plugin } from './index'
const AtomicInteger = Java.type("java.util.concurrent.atomic.AtomicInteger")
export namespace task {
export const TaskManager = Symbol('TaskManager')
export interface TaskManager {
create(func: Function): task.Task;
@injectable()
export abstract class TaskManager {
protected taskId: java.util.concurrent.atomic.AtomicInteger
protected cacheTasks = new Map<number, task.Task>()
protected pluginCacheTasks = new Map<string, Map<number, task.Task>>()
constructor() {
this.taskId = new AtomicInteger(0)
process.on('task.finish', (task: task.Task) => {
let taskId = task.getTaskId()
this.cacheTasks.delete(taskId)
let ownerName = task.getOwner()?.description.name
if (ownerName && this.pluginCacheTasks.has(ownerName)) {
this.pluginCacheTasks.get(ownerName)?.delete(taskId)
}
})
}
protected pluginCreate(plugin: plugin.Plugin, task: task.Task) {
if (!this.pluginCacheTasks.has(plugin.description.name)) {
this.pluginCacheTasks.set(plugin.description.name, new Map())
}
this.pluginCacheTasks.get(plugin.description.name).set(task.getTaskId(), task)
return task
}
protected pluginDisable(plugin: plugin.Plugin) {
if (this.pluginCacheTasks.has(plugin.description.name)) {
this.pluginCacheTasks.get(plugin.description.name).forEach((task) => task.cancel())
this.pluginCacheTasks.delete(plugin.description.name)
}
}
/**
* 获得自增的任务ID
*/
protected nextId() {
return this.taskId.incrementAndGet()
}
/**
* 创建任务
* @param func 任务内容
*/
create(func: Function, plugin?: plugin.Plugin): task.Task {
if (Object.prototype.toString.call(func) !== "[object Function]") { throw TypeError('第一个参数 Task 必须为 function !') };
let task = this.create0(plugin, func, this.nextId())
this.cacheTasks.set(task.getTaskId(), task)
if (plugin) { return this.pluginCreate(plugin, task) }
return task
}
cancel(taskId: number) {
if (!this.cacheTasks.has(taskId)) { throw new Error(`Task ${taskId} not found!`) }
this.cacheTasks.get(taskId).cancel()
}
/**
* 在主线程执行代码
* @param func 执行内容
*/
abstract callSyncMethod(func: Function): any
/**
* 关闭任务管理器
*/
disable(plugin?: plugin.Plugin) {
if (plugin) { return this.pluginDisable(plugin) }
this.disable0()
}
protected abstract create0(owner: plugin.Plugin, func: Function, id: number): task.Task
protected abstract disable0()
}
/**
* 任务抽象
*/
export abstract class Task {
protected plugin: any;
protected func: Function;
export abstract class Task extends EventEmitter implements Cancelable {
protected func: Function
protected isAsync: boolean = false;
protected laterTime: number = 0;
protected interval: number = 0;
protected owner: plugin.Plugin
protected taskId: number
protected innerTask: any
constructor(plugin: any, func: Function) {
this.plugin = plugin;
this.func = func;
private cancelled: boolean = false
constructor(owner: plugin.Plugin, func: Function, id: number) {
super()
this.owner = owner
this.func = func
this.taskId = id
}
getOwner() {
return this.owner
}
getTaskId() {
return this.taskId
}
/**
* 设置任务异步执行
* @param isAsync 是否异步
*/
async(isAsync: boolean = true): task.Task {
this.isAsync = isAsync;
return this;
this.isAsync = isAsync
return this
}
/**
* 设置任务延时执行
* @param tick 延时 Tick
*/
later(tick: number): task.Task {
this.laterTime = tick;
return this;
this.laterTime = tick
return this
}
/**
* 设置任务循环执行
* @param tick 循环时间 Tick
*/
timer(tick: number): task.Task {
this.interval = tick;
return this;
this.interval = tick
return this
}
protected run(): void {
/**
* 取消任务
*/
cancel(): boolean {
let result = this.cancel0()
this.finish()
this.cancelled = true
return result
}
protected run(...args: any[]): void {
try {
this.func();
} catch (ex) {
console.console('§4插件执行任务时发生错误', ex)
console.ex(ex);
this.emit('before', this)
if (this.cancelled) { return }
this.func(...args)
this.emit('after', this)
} catch (error: any) {
try {
this.emit('error', error)
} catch (ignore) {
console.console('§4插件执行任务时发生错误', error)
console.ex(error)
this.cancel()
}
} finally {
this.emit('finally', this)
if (!this.interval && !this.cancelled) { this.finish() }
}
}
abstract submit(): Cancelable;
protected finish() {
process.emit('task.finish', this)
this.emit('finish', this)
}
/**
* 提交任务
* @param args 任务参数
*/
submit(...args: any[]): task.Task {
this.innerTask = this.submit0(...args)
return this
}
/**
* 提交任务
* @param args 任务参数
*/
protected abstract submit0(...args: any[]): Cancelable
/**
* 取消任务
*/
protected cancel0(): boolean {
return this.innerTask?.cancel()
}
}
/**
* 返可取消的对象
*/
export interface Cancelable {
cancel(): boolean;
cancel(): boolean
}
}

View File

@@ -1,24 +0,0 @@
declare global {
namespace NodeJS {
interface Global {
logger: any;
debug: boolean;
noop: Function;
console: Console;
}
}
var root: string;
var base: Core;
var ScriptEngineContextHolder: any;
function engineLoad(str: string): any;
interface Core {
getClass(name: String);
}
interface Console {
ex(err: Error): void;
stack(err: Error): string[];
sender(...args: any): void;
console(...args: any): void;
}
}
export { }

View File

@@ -1,4 +0,0 @@
/node_modules
/dist
/package-lock.json
/yarn.lock

View File

@@ -1,22 +0,0 @@
src
test
typings
bundled
build
coverage
docs
wiki
gulpfile.js
bower.json
karma.conf.js
tsconfig.json
typings.json
CONTRIBUTING.md
ISSUE_TEMPLATE.md
PULL_REQUEST_TEMPLATE.md
tslint.json
wallaby.js
.travis.yml
.gitignore
.vscode
type_definitions

View File

@@ -1,7 +1,7 @@
{
"name": "@ms/bukkit",
"version": "0.1.0",
"description": "MiaoScript api package",
"name": "@ccms/bukkit",
"version": "0.28.0-beta.5",
"description": "MiaoScript bukkit package",
"keywords": [
"miaoscript",
"minecraft",
@@ -12,23 +12,23 @@
"homepage": "https://github.com/circlecloud/ms.git",
"license": "ISC",
"main": "dist/index.js",
"publishConfig": {
"registry": "https://repo.yumc.pw/repository/npm-hosted/"
},
"files": [
"dist/*.js",
"dist/*.ts",
"dist/*.map"
],
"scripts": {
"clean": "rimraf dist",
"watch": "npx tsc --watch",
"build": "yarn clean && npx tsc",
"watch": "tsc --watch",
"build": "pnpm clean && tsc",
"test": "echo \"Error: run tests from root\" && exit 1"
},
"devDependencies": {
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.0",
"typescript": "^3.6.2"
"@javatypes/spigot-api": "^0.0.3"
},
"dependencies": {
"@ms/api": "^0.1.0",
"@ms/common": "^0.1.0",
"@ms/container": "^0.1.0"
"@ccms/api": "^0.28.0-beta.5",
"@ccms/common": "^0.28.0-beta.5",
"@ccms/container": "^0.28.0-beta.5"
}
}

View File

@@ -0,0 +1,54 @@
import { channel, plugin } from '@ccms/api'
import { inject, provideSingleton } from '@ccms/container'
const Bukkit: typeof org.bukkit.Bukkit = Java.type('org.bukkit.Bukkit')
const PluginMessageListener = Java.type("org.bukkit.plugin.messaging.PluginMessageListener")
const Messenger = Bukkit.getMessenger()
@provideSingleton(channel.Channel)
export class BukkitChannel extends channel.Channel {
@inject(plugin.PluginInstance)
private pluginInstance: any
private cacheChannel = new Map<string, any[]>()
/**
* 给玩家发送通道消息
* @param player 接受消息的玩家
* @param channel 通道
* @param data 数据
*/
send(player: any, channel: string, data: number[]) {
player.sendPluginMessage(this.pluginInstance, channel, data)
}
/**
* 注册通道监听器
* @param channel 通道
* @param listener 监听器
*/
register(channel: string, listener: channel.ChannelListener) {
if (!this.cacheChannel.has(channel)) this.cacheChannel.set(channel, [])
this.cacheChannel.get(channel).push(listener)
let pluginMessageListener = new PluginMessageListener({
onPluginMessageReceived: (/**String */ channel, /**Player */ player, /**byte[] */data) => {
try {
listener(data, { channel, player, data })
} catch (error: any) {
console.ex(error)
}
}
})
Messenger.registerIncomingPluginChannel(this.pluginInstance, channel, pluginMessageListener)
Messenger.registerOutgoingPluginChannel(this.pluginInstance, channel)
return pluginMessageListener
}
unregister(channel: string, listener: any) {
if (!this.cacheChannel.has(channel)) return
let cacheListener = this.cacheChannel.get(channel)
cacheListener = cacheListener.filter(l => l != listener)
Messenger.unregisterIncomingPluginChannel(this.pluginInstance, channel, listener)
if (cacheListener.length == 0) {
this.cacheChannel.delete(channel)
Messenger.unregisterOutgoingPluginChannel(this.pluginInstance, channel)
}
}
}

View File

@@ -0,0 +1,26 @@
import { chat } from '@ccms/api'
import { provideSingleton } from '@ccms/container'
import bukkitChat from './internal/chat'
@provideSingleton(chat.Chat)
export class BukkitChat extends chat.Chat {
get handle(): any {
return bukkitChat
}
sendJson(sender: any, json: string | object, type = 0) {
bukkitChat.send(sender, typeof json === "string" ? json : JSON.stringify(json), type)
}
sendMessage(sender: any, message: string) {
this.sendJson(sender, { text: message }, 0)
}
sendActionBar(sender: any, message: string) {
this.sendJson(sender, { text: message }, 2)
}
sendTitle(sender: any, title: string, subtitle: string = '', fadeIn: number = 20, time: number = 100, fadeOut: number = 20) {
try {
sender.sendTitle(title, subtitle, fadeIn, time, fadeOut)
} catch (error: any) {
sender.sendTitle(title, subtitle)
}
}
}

View File

@@ -1,48 +1,53 @@
import '@ms/nashorn'
import '@ccms/nashorn'
import { command, plugin } from '@ms/api'
import * as reflect from '@ms/common/dist/reflect'
import { injectable, postConstruct, inject } from '@ms/container'
import { command, plugin } from '@ccms/api'
import { provideSingleton, postConstruct, inject } from '@ccms/container'
import * as reflect from '@ccms/common/dist/reflect'
let Bukkit = org.bukkit.Bukkit;
let TabCompleter = Java.type('org.bukkit.command.TabCompleter');
let PluginCommand = Java.type('org.bukkit.command.PluginCommand');
let CommandExecutor = Java.type('org.bukkit.command.CommandExecutor');
const Bukkit: typeof org.bukkit.Bukkit = Java.type('org.bukkit.Bukkit')
const TabCompleter = Java.type('org.bukkit.command.TabCompleter')
const PluginCommand = Java.type('org.bukkit.command.PluginCommand')
const CommandExecutor = Java.type('org.bukkit.command.CommandExecutor')
@injectable()
@provideSingleton(command.Command)
export class BukkitCommand extends command.Command {
@inject(plugin.PluginInstance)
private pluginInstance: any
private commandMap: any;
private commandMap: any
private knownCommands: any
@postConstruct()
init() {
this.commandMap = reflect.on(Bukkit.getPluginManager()).get('commandMap').get();
this.commandMap = reflect.on(Bukkit.getPluginManager()).get('commandMap').get()
this.knownCommands = reflect.on(this.commandMap).get('knownCommands').get()
}
create(plugin: any, command: string) {
var cmd = this.commandMap.getCommand(command)
if (cmd && cmd instanceof PluginCommand) { return cmd };
cmd = reflect.on(PluginCommand).create(command, this.pluginInstance).get();
this.commandMap.register(plugin.description.name, cmd);
return cmd;
if (cmd instanceof PluginCommand) { return cmd };
cmd = reflect.on(PluginCommand).create(command, this.pluginInstance).get()
this.commandMap.register(plugin.description.name, cmd)
return cmd
}
remove(plugin: any, command: string) {
var cmd = this.commandMap.getCommand(command)
if (cmd && cmd instanceof PluginCommand) {
cmd.unregister(this.commandMap);
if (cmd instanceof PluginCommand) {
cmd.unregister(this.commandMap)
this.knownCommands.remove(command)
}
}
tabComplete(sender: any, input: string, index?: number): string[] {
return Java.from(this.commandMap.tabComplete(sender, input))
}
onCommand(plugin: any, command: any, executor: Function) {
// 必须指定需要实现的接口类型 否则MOD服会报错
command.setExecutor(new CommandExecutor({
onCommand: super.setExecutor(plugin, command, executor)
}));
}))
}
onTabComplete(plugin: any, command: any, tabCompleter: Function) {
// 必须指定需要实现的接口类型 否则MOD服会报错
command.setTabCompleter(new TabCompleter({
onTabComplete: super.setTabCompleter(plugin, command, tabCompleter)
}));
}))
}
}

View File

@@ -1,20 +1,20 @@
import { MiaoScriptConsole } from '@ms/api'
import { MiaoScriptConsole } from '@ccms/api'
let Bukkit = org.bukkit.Bukkit;
const Bukkit: typeof org.bukkit.Bukkit = Java.type('org.bukkit.Bukkit')
export class BukkitConsole extends MiaoScriptConsole {
sender(sender, ...args) {
if (!(sender instanceof org.bukkit.command.CommandSender)) {
this.error("第一个参数未实现 org.bukkit.command.CommandSender 无法发送消息!")
return;
if (!(sender instanceof Java.type('org.bukkit.command.CommandSender'))) {
this.error(`First parameter ${sender} not instanceof org.bukkit.command.CommandSender can't send message!`)
return
}
if (Object.prototype.toString.call(args[0]) === "[object Array]") {
args[0].forEach(line => sender.sendMessage(this.prefix + line))
} else {
sender.sendMessage(this.prefix + args.join(' '));
sender.sendMessage(this.prefix + args.join(' '))
}
}
console(...args): void {
this.sender(Bukkit.getConsoleSender(), args.join(' '));
console(...args: string[]): void {
this.sender(Bukkit.getConsoleSender(), args.join(' '))
}
}

View File

@@ -1,33 +1,45 @@
import { event, server, plugin } from '@ms/api'
import { injectable, inject } from '@ms/container';
import * as reflect from '@ms/common/dist/reflect'
import { event, plugin } from '@ccms/api'
import { inject, provideSingleton } from '@ccms/container'
import * as reflect from '@ccms/common/dist/reflect'
let Bukkit = Java.type("org.bukkit.Bukkit");
let Event = Java.type("org.bukkit.event.Event");
let Modifier = Java.type("java.lang.reflect.Modifier");
let Listener = Java.type("org.bukkit.event.Listener");
let EventPriority = Java.type("org.bukkit.event.EventPriority");
let EventExecutor = Java.type("org.bukkit.plugin.EventExecutor");
const URL = Java.type('java.net.URL')
const Bukkit = Java.type("org.bukkit.Bukkit")
const Event = Java.type("org.bukkit.event.Event")
const Modifier = Java.type("java.lang.reflect.Modifier")
const Listener = Java.type("org.bukkit.event.Listener")
const EventPriority = Java.type("org.bukkit.event.EventPriority")
const EventExecutor = Java.type("org.bukkit.plugin.EventExecutor")
@injectable()
@provideSingleton(event.Event)
export class BukkitEvent extends event.Event {
@inject(plugin.PluginInstance)
private pluginInstance: any
constructor() {
super('org/bukkit/event');
super('org/bukkit/event')
}
getJarFile(resource: string) {
try {
return super.getJarFile('org/bukkit/Bukkit.class', Bukkit.class.classLoader)
} catch (error) {
// 兼容 LoliServer 的 Bukkit 包无法获取的问题
let ModList = Java.type('net.minecraftforge.fml.ModList').get()
let forgeFile = ModList.getModFileById("forge").getFile().getFilePath()
let jarPath = `jar:file:${forgeFile}!/org/bukkit/Bukkit.class`
return new URL(jarPath).openConnection().jarFile
}
}
isValidEvent(clazz: any): boolean {
// 继承于 org.bukkit.event.Event
return Event.class.isAssignableFrom(clazz) &&
// 访问符为Public
Modifier.isPublic(clazz.getModifiers()) &&
// 不是抽象类
!Modifier.isAbstract(clazz.getModifiers());
!Modifier.isAbstract(clazz.getModifiers())
}
register(eventCls: any, exec: Function, priority: any, ignoreCancel: boolean) {
var listener = new Listener({});
register(eventCls: any, exec: Function, priority: event.EventPriority, ignoreCancel: boolean) {
let listener = new Listener({})
Bukkit.pluginManager.registerEvent(
eventCls,
listener,
@@ -36,10 +48,10 @@ export class BukkitEvent extends event.Event {
execute: exec
}),
this.pluginInstance,
ignoreCancel);
return listener;
ignoreCancel)
return listener
}
unregister(event: any, listener: any): void {
reflect.on(event).call('getHandlerList').get().unregister(listener);
reflect.on(event).call('getHandlerList').get().unregister(listener)
}
}

View File

@@ -1,22 +1,20 @@
import './typings'
/// <reference types="@javatypes/spigot-api" />
import { server, plugin, command, event, task } from '@ms/api'
import { DefaultContainer as container } from '@ms/container'
import { server } from '@ccms/api'
import { Container } from '@ccms/container'
import { BukkitConsole } from './console';
import { BukkitEvent } from './event';
import { BukkitCommand } from './command';
import { BukkitTaskManager } from './task';
import { BukkitConsole } from './console'
import './item'
import './chat'
import './task'
import './event'
import './server'
import { BukkitNativePluginManager } from './plugin'
import './command'
import './channel'
import './particle'
let BukkitServerType = 'bukkit';
let Bukkit = Java.type("org.bukkit.Bukkit");
container.bind(server.Console).toConstantValue(BukkitConsole);
container.bind(server.ServerType).toConstantValue(BukkitServerType);
container.bind(plugin.PluginInstance).toConstantValue(Bukkit.pluginManager.getPlugin('MiaoScript'));
container.bind(event.Event).to(BukkitEvent).inSingletonScope();
container.bind(command.Command).to(BukkitCommand).inSingletonScope();
container.bind(task.TaskManager).to(BukkitTaskManager).inSingletonScope();
console.debug(`Detect Bukkit Compatible set ServerType to ${BukkitServerType} ...`)
export default function BukkitImpl(container: Container) {
container.bind(server.Console).toConstantValue(BukkitConsole)
container.rebind(server.NativePluginManager).toConstantValue(new BukkitNativePluginManager())
}

View File

@@ -0,0 +1,206 @@
/*global Java, base, module, exports, require*/
let bukkitChatInvoke: BukkitChatInvoke
/**
* 获取NMS类
*/
abstract class BukkitChatInvoke {
private downgrade: boolean = false
protected RemapUtils: any
protected ComponentSerializer: any
protected ChatSerializer: any
protected nmsChatSerializerMethodName: string
protected PacketPlayOutChat: any
protected chatMessageTypes: any
protected playerConnectionFieldName: string
protected playerFieldName: string
protected sendPacketMethodName: string
constructor(private nmsVersion) {
}
init() {
try {
try {
this.ComponentSerializer = Java.type('net.md_5.bungee.chat.ComponentSerializer')
this.RemapUtils = Java.type('catserver.server.remapper.RemapUtils')
} catch (ex: any) {
}
let nmsChatSerializerClass = this.getNmsChatSerializerClass()
this.nmsChatSerializerMethodName = this.getNmsChatSerializerMethodName(nmsChatSerializerClass)
this.ChatSerializer = Java.type(nmsChatSerializerClass.getName())
let packetTypeClass = this.getPacketPlayOutChatClass()
this.PacketPlayOutChat = Java.type(packetTypeClass.getName())
let constructors = packetTypeClass.constructors
for (const constructor of Java.from(constructors)) {
let parameterTypes = constructor.parameterTypes
if (parameterTypes.length === 2 || parameterTypes.length === 3) {
let nmsChatMessageTypeClass = parameterTypes[1]
if (nmsChatMessageTypeClass.isEnum()) {
this.chatMessageTypes = nmsChatMessageTypeClass.getEnumConstants()
break
} else if (nmsChatMessageTypeClass.getName() == 'int') {
break
}
}
}
let playerConnectionField = this.getPlayerConnectionField()
this.playerConnectionFieldName = playerConnectionField.getName()
this.sendPacketMethodName = this.getSendPacketMethodName(playerConnectionField.getType())
} catch (ex: any) {
org.bukkit.Bukkit.getConsoleSender().sendMessage(`§6[§cMS§6][§bbukkit§6][§achat§6] §cNMS Inject Error §4${ex} §cDowngrade to Command Mode...`)
this.downgrade = true
}
}
abstract getNmsChatSerializerClass()
abstract getNmsChatSerializerMethodName(nmsChatSerializerClass: any)
abstract getPacketPlayOutChatClass()
abstract getPacketPlayOutChat(sender: any, json: any, type: number)
abstract getPlayerConnectionField()
abstract getPacketClass()
abstract getSendPacketMethodName(playerConnectionClass: any)
nmsCls(name: string) {
return base.getClass(['net.minecraft.server', this.nmsVersion, name].join('.'))
}
remapMethod(clazz: any, origin: string, test: string, params: any) {
try {
return clazz.getMethod(origin, params)
} catch (ex: any) {
if (this.RemapUtils) {
return clazz.getMethod(this.RemapUtils.mapMethod(clazz, origin, params), params)
} else {
return clazz.getMethod(test, params)
}
}
}
remapFieldName(clazz: any, origin: string, test: string) {
try {
return clazz.getField(origin)
} catch (ex: any) {
if (this.RemapUtils) {
return clazz.getField(this.RemapUtils.mapFieldName(clazz, origin))
} else {
return clazz.getField(test)
}
}
}
json(sender: any, json: string) {
if (this.downgrade) {
return sender.spigot().sendMessage(this.ComponentSerializer.parse(json))
} else {
this.send(sender, json, 0)
return false
}
}
send(sender: any, json: any, type: number) {
this.sendPacket(sender, this.getPacketPlayOutChat(sender, json, type))
}
sendPacket(player: { handle: { [x: string]: { [x: string]: (arg0: any) => void } } }, p: any) {
player.handle[this.playerConnectionFieldName][this.sendPacketMethodName](p)
}
}
class BukkitChatInvokeBase extends BukkitChatInvoke {
getSendPacketMethodName(playerConnectionClass: any) {
return this.remapMethod(playerConnectionClass, 'sendPacket', 'func_179290_a', this.getPacketClass()).getName()
}
getNmsChatSerializerMethodName(nmsChatSerializerClass: any) {
let nmsChatSerializerMethod = this.remapMethod(nmsChatSerializerClass, 'a', 'func_150699_a', base.getClass('java.lang.String'))
return nmsChatSerializerMethod.getName()
}
getPacketPlayOutChat(sender: any, json: any, type: number) {
return new this.PacketPlayOutChat(this.ChatSerializer[this.nmsChatSerializerMethodName](json), type)
}
getNmsChatSerializerClass() {
return this.nmsCls("ChatSerializer")
}
getPacketPlayOutChatClass() {
return this.nmsCls("PacketPlayOutChat")
}
getPlayerConnectionField() {
return this.remapFieldName(this.nmsCls('EntityPlayer'), 'playerConnection', 'field_71135_a')
}
getPacketClass() {
return this.nmsCls('Packet')
}
}
class BukkitChatInvoke_1_7_10 extends BukkitChatInvokeBase {
}
class BukkitChatInvoke_1_8 extends BukkitChatInvoke_1_7_10 {
getPacketPlayOutChat(sender: any, json: any, type: number) {
return new this.PacketPlayOutChat(this.ChatSerializer[this.nmsChatSerializerMethodName](json), this.chatMessageTypes[type])
}
getNmsChatSerializerClass() {
return this.nmsCls("IChatBaseComponent$ChatSerializer")
}
}
class BukkitChatInvoke_1_16_5 extends BukkitChatInvoke_1_8 {
getPacketPlayOutChat(sender: any, json: any, type: number) {
return new this.PacketPlayOutChat(this.ChatSerializer[this.nmsChatSerializerMethodName](json), this.chatMessageTypes[type], sender.getUniqueId())
}
}
class BukkitChatInvoke_1_17_1 extends BukkitChatInvoke_1_16_5 {
getPacketPlayOutChatClass() {
return base.getClass('net.minecraft.network.protocol.game.PacketPlayOutChat')
}
getNmsChatSerializerClass() {
return base.getClass('net.minecraft.network.chat.IChatBaseComponent$ChatSerializer')
}
getPlayerConnectionField() {
return base.getClass('net.minecraft.server.level.EntityPlayer').getField('b')
}
getPacketClass() {
return base.getClass('net.minecraft.network.protocol.Packet')
}
}
class BukkitChatInvoke_1_18_2 extends BukkitChatInvoke_1_17_1 {
getSendPacketMethodName(playerConnectionClass: any) {
return playerConnectionClass.getMethod('a', this.getPacketClass()).getName()
}
}
class BukkitChatInvoke_1_19 extends BukkitChatInvoke_1_18_2 {
getPacketPlayOutChatClass() {
return base.getClass('net.minecraft.network.protocol.game.ClientboundSystemChatPacket')
}
getPacketPlayOutChat(sender: any, json: any, type: number) {
return new this.PacketPlayOutChat(this.ChatSerializer[this.nmsChatSerializerMethodName](json), type)
}
}
try {
let Bukkit: typeof org.bukkit.Bukkit = Java.type('org.bukkit.Bukkit')
// @ts-ignore
let nmsVersion = Bukkit.getServer().class.name.split('.')[3]
let nmsSubVersion = nmsVersion.split("_")[1]
if (nmsSubVersion >= 19) {
bukkitChatInvoke = new BukkitChatInvoke_1_19(nmsVersion)
} else if (nmsSubVersion >= 18) {
bukkitChatInvoke = new BukkitChatInvoke_1_18_2(nmsVersion)
} else if (nmsSubVersion >= 17) {
bukkitChatInvoke = new BukkitChatInvoke_1_17_1(nmsVersion)
} else if (nmsSubVersion >= 16) {
bukkitChatInvoke = new BukkitChatInvoke_1_16_5(nmsVersion)
} else if (nmsSubVersion >= 8) {
bukkitChatInvoke = new BukkitChatInvoke_1_8(nmsVersion)
} else {
bukkitChatInvoke = new BukkitChatInvoke_1_7_10(nmsVersion)
}
bukkitChatInvoke.init()
} catch (ex: any) {
}
let chat = {
invoke: bukkitChatInvoke,
json: bukkitChatInvoke.json.bind(bukkitChatInvoke),
send: bukkitChatInvoke.send.bind(bukkitChatInvoke)
}
export default chat

File diff suppressed because it is too large Load Diff

128
packages/bukkit/src/item.ts Normal file
View File

@@ -0,0 +1,128 @@
import { item } from "@ccms/api"
import { provideSingleton } from "@ccms/container"
import { itemIds } from './internal/item'
const Material: typeof org.bukkit.Material = Java.type('org.bukkit.Material')
const ItemStack: typeof org.bukkit.inventory.ItemStack = Java.type('org.bukkit.inventory.ItemStack')
@provideSingleton(item.Item)
export class BukkitItem extends item.Item {
private CraftItemStack: any
private NBTTagCompound: any
private nmsSaveNBTMethodName: any
private MojangsonParser: any
private nmsItemStack: any
private mpParseMethodName: any
private nmsVersion: any
constructor() {
super()
this.reflect()
}
builder(): item.ItemBuilder {
return new BukkitItemBuilder()
}
toJson(item: any): string {
let nbt = new this.NBTTagCompound()
return this.CraftItemStack.asNMSCopy(item)[this.nmsSaveNBTMethodName](nbt).toString()
}
fromJson(json: string) {
return this.CraftItemStack.asBukkitCopy(new this.nmsItemStack(this.MojangsonParser[this.mpParseMethodName](json)))
}
private obcCls(name: string) {
return base.getClass(['org.bukkit.craftbukkit', this.nmsVersion, name].join('.'))
}
private nmsCls(name: string) {
return base.getClass(['net.minecraft.server', this.nmsVersion, name].join('.'))
}
private reflect() {
try {
let Bukkit: typeof org.bukkit.Bukkit = Java.type('org.bukkit.Bukkit')
// @ts-ignore
this.nmsVersion = Bukkit.getServer().class.name.split('.')[3]
let CraftItemStackClass = this.obcCls('inventory.CraftItemStack')
this.CraftItemStack = Java.type(CraftItemStackClass.getName())
// @ts-ignore
let asNMSCopyMethod = CraftItemStackClass.getMethod('asNMSCopy', ItemStack.class)
let nmsItemStackClass = asNMSCopyMethod.getReturnType()
this.nmsItemStack = Java.type(nmsItemStackClass.getName())
let nmsNBTTagCompoundClass = undefined
for (let method of Java.from(nmsItemStackClass.getMethods())) {
let rt = method.getReturnType()
if (method.getParameterTypes().length == 0 && "NBTTagCompound" == rt.getSimpleName()) {
nmsNBTTagCompoundClass = rt
}
}
this.NBTTagCompound = Java.type(nmsNBTTagCompoundClass.getName())
for (let method of Java.from(nmsItemStackClass.getMethods())) {
let params = method.getParameterTypes()
let rt = method.getReturnType()
if (params.length == 1 && "NBTTagCompound" == params[0].getSimpleName() && "NBTTagCompound" == rt.getSimpleName()) {
this.nmsSaveNBTMethodName = method.getName()
break
}
}
try {
this.MojangsonParser = this.nmsCls('MojangsonParser').static
} catch (error) {
this.MojangsonParser = Java.type('net.minecraft.nbt.MojangsonParser')
}
for (let method of Java.from(this.MojangsonParser.class.getMethods())) {
let params = method.getParameterTypes()
let rt = method.getReturnType()
if (params.length == 1 && "String" == params[0].getSimpleName() && "NBTTagCompound" == rt.getSimpleName()) {
this.mpParseMethodName = method.getName()
}
}
} catch (error: any) {
console.log('Bukkit 物品管理器初始化失败:', error)
if (global.debug) {
console.ex(error)
}
}
}
}
export class BukkitItemBuilder implements item.ItemBuilder {
private itemStack: org.bukkit.inventory.ItemStack
private itemMeta: org.bukkit.inventory.meta.ItemMeta
from(itemStack: any): item.ItemBuilder {
this.itemStack = itemStack
this.itemMeta = this.itemStack.getItemMeta()
return this
}
create(type: string | number): item.ItemBuilder {
let material = undefined
if (typeof type == 'number') {
type = itemIds[type]
}
material = Material[type] || Material[Material['LEGACY_PREFIX'] + type]
this.itemStack = new ItemStack(material)
this.itemMeta = this.itemStack.getItemMeta()
return this
}
name(name: string): item.ItemBuilder {
this.itemMeta.setDisplayName(name)
return this
}
lore(...lores: string[]): item.ItemBuilder {
this.itemMeta.setLore(lores)
return this
}
amount(amount: number): item.ItemBuilder {
this.itemStack.setAmount(amount)
return this
}
durability(durability: number): item.ItemBuilder {
this.itemStack.setDurability(durability)
return this
}
clone() {
return this.build().clone()
}
build() {
this.itemStack.setItemMeta(this.itemMeta)
return this.itemStack
}
}

View File

@@ -0,0 +1,33 @@
import { provideSingleton } from '@ccms/container'
import { particle } from '@ccms/api'
@provideSingleton(particle.ParticleManager)
export class BukkitParticleManager extends particle.ParticleManager {
}
@provideSingleton(particle.ParticleSpawner)
export class BukkitParticleSpawner extends particle.ParticleSpawner {
spawn(location: org.bukkit.Location, particle: particle.Particle) {
location.getWorld().spawnParticle(
particle.getParticle(),
location,
particle.getCount(),
particle.getOffsetX(),
particle.getOffsetY(),
particle.getOffsetZ(),
particle.getExtra(),
particle.getData()
)
}
spawnToPlayer(player: org.bukkit.entity.Player, location: org.bukkit.Location, particle: particle.Particle) {
player.spawnParticle(
particle.getParticle(),
location,
particle.getCount(),
particle.getOffsetX(),
particle.getOffsetY(),
particle.getOffsetZ(),
particle.getExtra(),
particle.getData())
}
}

View File

@@ -0,0 +1,52 @@
import { server } from '@ccms/api'
const Bukkit: typeof org.bukkit.Bukkit = Java.type('org.bukkit.Bukkit')
export class BukkitNativePluginManager extends server.NativePluginManager {
private bukkitPluginManager: org.bukkit.plugin.PluginManager
constructor() {
super()
this.bukkitPluginManager = Bukkit.getPluginManager()
}
list(): server.NativePlugin[] {
return Java.from(this.bukkitPluginManager.getPlugins()).map(plugin => this.convert(plugin))
}
has(name: string): boolean {
return !!this.bukkitPluginManager.getPlugin(name)
}
get(name: string): server.NativePlugin {
return this.convert(this.bukkitPluginManager.getPlugin(name))
}
enable(name: string): server.NativePlugin {
let origin = this.bukkitPluginManager.getPlugin(name)
if (!origin) { throw new Error(`Native Plugin ${name} not found.`) }
if (!origin.isEnabled()) {
this.bukkitPluginManager.enablePlugin(origin)
}
return this.convert(origin)
}
disable(name: string): server.NativePlugin {
let origin = this.bukkitPluginManager.getPlugin(name)
if (!origin) { throw new Error(`Native Plugin ${name} not found.`) }
if (origin.isEnabled()) {
this.bukkitPluginManager.disablePlugin(origin)
}
return this.convert(origin)
}
private convert(plugin: org.bukkit.plugin.Plugin): server.NativePlugin {
if (!plugin) return plugin as any
let desc = plugin.getDescription()
return {
name: plugin.getName(),
version: desc.getVersion(),
authors: Java.from(desc.getAuthors()),
depends: Java.from(desc.getDepend()),
softDepends: Java.from(desc.getSoftDepend()),
enable: plugin.isEnabled(),
origin: plugin
}
}
}

View File

@@ -0,0 +1,62 @@
import { server } from '@ccms/api'
import { provideSingleton } from '@ccms/container'
import * as reflect from '@ccms/common/dist/reflect'
const Bukkit: typeof org.bukkit.Bukkit = Java.type('org.bukkit.Bukkit')
@provideSingleton(server.Server)
export class BukkitServer extends server.ReflectServer {
private pluginsFolder: string
constructor() {
super()
this.pluginsFolder = Bukkit.getUpdateFolderFile().getParentFile().getCanonicalPath()
}
getPlayer(name: string) {
return Bukkit.getPlayerExact(name)
}
getVersion(): string {
return Bukkit.getVersion()
}
getOnlinePlayers() {
return Bukkit.getOnlinePlayers()
}
getConsoleSender() {
return Bukkit.getConsoleSender()
}
getService(service: string) {
return Bukkit.getServicesManager().getRegistration(base.getClass(service))?.getProvider()
}
broadcast(message: string, permission: string) {
return Bukkit.broadcast(message, permission)
}
broadcastMessage(message: string) {
return Bukkit.broadcastMessage(message)
}
dispatchCommand(sender: string | any, command: string): boolean {
if (typeof sender === 'string') {
sender = this.getPlayer(sender)
}
return Bukkit.dispatchCommand(sender, command)
}
dispatchConsoleCommand(command: string): boolean {
return Bukkit.dispatchCommand(Bukkit.getConsoleSender(), command)
}
getPluginsFolder(): string {
return this.pluginsFolder
}
getNativePluginManager() {
return Bukkit.getPluginManager() as any
}
getDedicatedServer() {
return reflect.on(Bukkit.getServer()).get('console').get()
}
getNettyPipeline() {
return this.pipeline
}
getRootLogger() {
return this.rootLogger
}
}

View File

@@ -1,29 +1,31 @@
import { task, plugin } from '@ms/api'
import { injectable, inject } from '@ms/container';
import { task, plugin } from '@ccms/api'
import { provideSingleton } from '@ccms/container'
let BukkitRunnable = Java.type('org.bukkit.scheduler.BukkitRunnable');
const Bukkit = Java.type('org.bukkit.Bukkit')
const BukkitRunnable = Java.type('org.bukkit.scheduler.BukkitRunnable')
const Callable = Java.type('java.util.concurrent.Callable')
@injectable()
export class BukkitTaskManager implements task.TaskManager {
@inject(plugin.PluginInstance)
private pluginInstance: any;
create(func: Function): task.Task {
if (Object.prototype.toString.call(func) !== "[object Function]") { throw TypeError('第一个参数 Task 必须为 function !'); };
return new BukkitTask(this.pluginInstance, func);
@provideSingleton(task.TaskManager)
export class BukkitTaskManager extends task.TaskManager {
create0(owner: plugin.Plugin, func: Function, id: number): task.Task {
return new BukkitTask(owner, func, id)
}
callSyncMethod(func: Function): any {
return Bukkit.getScheduler().callSyncMethod(base.getInstance(), new Callable({ call: () => func() })).get()
}
disable0() {
Bukkit.getScheduler().cancelTasks(base.getInstance())
}
}
export class BukkitTask extends task.Task {
submit(): task.Cancelable {
let run = new BukkitRunnable({
run: () => this.run()
})
let funcName = `runTask${this.interval ? 'Timer' : 'Later'}${this.isAsync ? 'Asynchronously' : ''}`
submit0(...args: any[]): task.Cancelable {
let run = new BukkitRunnable({ run: () => this.run(...args) })
let suffix = this.isAsync ? 'Asynchronously' : ''
if (this.interval) {
return run[funcName](this.plugin, this.laterTime, this.interval)
return run[`runTaskTimer${suffix}`](base.getInstance(), this.laterTime, this.interval)
} else {
return run[funcName](this.plugin, this.laterTime)
return run[`runTaskLater${suffix}`](base.getInstance(), this.laterTime)
}
}
}

View File

@@ -1,958 +0,0 @@
/// <reference path="./org.bukkit.Achievement.ts" />
/// <reference path="./org.bukkit.Art.ts" />
/// <reference path="./org.bukkit.Axis.ts" />
/// <reference path="./org.bukkit.BanEntry.ts" />
/// <reference path="./org.bukkit.BanList.Type.ts" />
/// <reference path="./org.bukkit.BanList.ts" />
/// <reference path="./org.bukkit.BlockChangeDelegate.ts" />
/// <reference path="./org.bukkit.Bukkit.ts" />
/// <reference path="./org.bukkit.ChatColor.ts" />
/// <reference path="./org.bukkit.Chunk.ts" />
/// <reference path="./org.bukkit.ChunkSnapshot.ts" />
/// <reference path="./org.bukkit.CoalType.ts" />
/// <reference path="./org.bukkit.Color.ts" />
/// <reference path="./org.bukkit.CropState.ts" />
/// <reference path="./org.bukkit.Difficulty.ts" />
/// <reference path="./org.bukkit.DyeColor.ts" />
/// <reference path="./org.bukkit.Effect.Type.ts" />
/// <reference path="./org.bukkit.Effect.ts" />
/// <reference path="./org.bukkit.EntityEffect.ts" />
/// <reference path="./org.bukkit.FireworkEffect.Builder.ts" />
/// <reference path="./org.bukkit.FireworkEffect.Type.ts" />
/// <reference path="./org.bukkit.FireworkEffect.ts" />
/// <reference path="./org.bukkit.FluidCollisionMode.ts" />
/// <reference path="./org.bukkit.GameMode.ts" />
/// <reference path="./org.bukkit.GameRule.ts" />
/// <reference path="./org.bukkit.GrassSpecies.ts" />
/// <reference path="./org.bukkit.Instrument.ts" />
/// <reference path="./org.bukkit.Keyed.ts" />
/// <reference path="./org.bukkit.Location.ts" />
/// <reference path="./org.bukkit.Material.ts" />
/// <reference path="./org.bukkit.Nameable.ts" />
/// <reference path="./org.bukkit.NamespacedKey.ts" />
/// <reference path="./org.bukkit.NetherWartsState.ts" />
/// <reference path="./org.bukkit.Note.Tone.ts" />
/// <reference path="./org.bukkit.Note.ts" />
/// <reference path="./org.bukkit.OfflinePlayer.ts" />
/// <reference path="./org.bukkit.Particle.DustOptions.ts" />
/// <reference path="./org.bukkit.Particle.ts" />
/// <reference path="./org.bukkit.PortalType.ts" />
/// <reference path="./org.bukkit.Registry.SimpleRegistry.ts" />
/// <reference path="./org.bukkit.Registry.ts" />
/// <reference path="./org.bukkit.Rotation.ts" />
/// <reference path="./org.bukkit.SandstoneType.ts" />
/// <reference path="./org.bukkit.Server.ts" />
/// <reference path="./org.bukkit.SkullType.ts" />
/// <reference path="./org.bukkit.Sound.ts" />
/// <reference path="./org.bukkit.SoundCategory.ts" />
/// <reference path="./org.bukkit.Statistic.Type.ts" />
/// <reference path="./org.bukkit.Statistic.ts" />
/// <reference path="./org.bukkit.StructureType.ts" />
/// <reference path="./org.bukkit.Tag.ts" />
/// <reference path="./org.bukkit.TreeSpecies.ts" />
/// <reference path="./org.bukkit.TreeType.ts" />
/// <reference path="./org.bukkit.UndefinedNullability.ts" />
/// <reference path="./org.bukkit.UnsafeValues.ts" />
/// <reference path="./org.bukkit.Utility.ts" />
/// <reference path="./org.bukkit.Warning.WarningState.ts" />
/// <reference path="./org.bukkit.Warning.ts" />
/// <reference path="./org.bukkit.WeatherType.ts" />
/// <reference path="./org.bukkit.World.Environment.ts" />
/// <reference path="./org.bukkit.World.ts" />
/// <reference path="./org.bukkit.WorldBorder.ts" />
/// <reference path="./org.bukkit.WorldCreator.ts" />
/// <reference path="./org.bukkit.WorldType.ts" />
/// <reference path="./org.bukkit.advancement.Advancement.ts" />
/// <reference path="./org.bukkit.advancement.AdvancementProgress.ts" />
/// <reference path="./org.bukkit.attribute.Attributable.ts" />
/// <reference path="./org.bukkit.attribute.Attribute.ts" />
/// <reference path="./org.bukkit.attribute.AttributeInstance.ts" />
/// <reference path="./org.bukkit.attribute.AttributeModifier.Operation.ts" />
/// <reference path="./org.bukkit.attribute.AttributeModifier.ts" />
/// <reference path="./org.bukkit.block.Banner.ts" />
/// <reference path="./org.bukkit.block.Barrel.ts" />
/// <reference path="./org.bukkit.block.Beacon.ts" />
/// <reference path="./org.bukkit.block.Bed.ts" />
/// <reference path="./org.bukkit.block.Bell.ts" />
/// <reference path="./org.bukkit.block.Biome.ts" />
/// <reference path="./org.bukkit.block.BlastFurnace.ts" />
/// <reference path="./org.bukkit.block.Block.ts" />
/// <reference path="./org.bukkit.block.BlockFace.ts" />
/// <reference path="./org.bukkit.block.BlockState.ts" />
/// <reference path="./org.bukkit.block.BrewingStand.ts" />
/// <reference path="./org.bukkit.block.Campfire.ts" />
/// <reference path="./org.bukkit.block.Chest.ts" />
/// <reference path="./org.bukkit.block.CommandBlock.ts" />
/// <reference path="./org.bukkit.block.Comparator.ts" />
/// <reference path="./org.bukkit.block.Conduit.ts" />
/// <reference path="./org.bukkit.block.Container.ts" />
/// <reference path="./org.bukkit.block.CreatureSpawner.ts" />
/// <reference path="./org.bukkit.block.DaylightDetector.ts" />
/// <reference path="./org.bukkit.block.Dispenser.ts" />
/// <reference path="./org.bukkit.block.DoubleChest.ts" />
/// <reference path="./org.bukkit.block.Dropper.ts" />
/// <reference path="./org.bukkit.block.EnchantingTable.ts" />
/// <reference path="./org.bukkit.block.EndGateway.ts" />
/// <reference path="./org.bukkit.block.EnderChest.ts" />
/// <reference path="./org.bukkit.block.FlowerPot.ts" />
/// <reference path="./org.bukkit.block.Furnace.ts" />
/// <reference path="./org.bukkit.block.Hopper.ts" />
/// <reference path="./org.bukkit.block.Jigsaw.ts" />
/// <reference path="./org.bukkit.block.Jukebox.ts" />
/// <reference path="./org.bukkit.block.Lectern.ts" />
/// <reference path="./org.bukkit.block.Lockable.ts" />
/// <reference path="./org.bukkit.block.NoteBlock.ts" />
/// <reference path="./org.bukkit.block.PistonMoveReaction.ts" />
/// <reference path="./org.bukkit.block.ShulkerBox.ts" />
/// <reference path="./org.bukkit.block.Sign.ts" />
/// <reference path="./org.bukkit.block.Skull.ts" />
/// <reference path="./org.bukkit.block.Smoker.ts" />
/// <reference path="./org.bukkit.block.Structure.ts" />
/// <reference path="./org.bukkit.block.TileState.ts" />
/// <reference path="./org.bukkit.block.banner.Pattern.ts" />
/// <reference path="./org.bukkit.block.banner.PatternType.ts" />
/// <reference path="./org.bukkit.block.data.Ageable.ts" />
/// <reference path="./org.bukkit.block.data.AnaloguePowerable.ts" />
/// <reference path="./org.bukkit.block.data.Attachable.ts" />
/// <reference path="./org.bukkit.block.data.Bisected.Half.ts" />
/// <reference path="./org.bukkit.block.data.Bisected.ts" />
/// <reference path="./org.bukkit.block.data.BlockData.ts" />
/// <reference path="./org.bukkit.block.data.Directional.ts" />
/// <reference path="./org.bukkit.block.data.Levelled.ts" />
/// <reference path="./org.bukkit.block.data.Lightable.ts" />
/// <reference path="./org.bukkit.block.data.MultipleFacing.ts" />
/// <reference path="./org.bukkit.block.data.Openable.ts" />
/// <reference path="./org.bukkit.block.data.Orientable.ts" />
/// <reference path="./org.bukkit.block.data.Powerable.ts" />
/// <reference path="./org.bukkit.block.data.Rail.Shape.ts" />
/// <reference path="./org.bukkit.block.data.Rail.ts" />
/// <reference path="./org.bukkit.block.data.Rotatable.ts" />
/// <reference path="./org.bukkit.block.data.Snowable.ts" />
/// <reference path="./org.bukkit.block.data.Waterlogged.ts" />
/// <reference path="./org.bukkit.block.data.type.Bamboo.Leaves.ts" />
/// <reference path="./org.bukkit.block.data.type.Bamboo.ts" />
/// <reference path="./org.bukkit.block.data.type.Bed.Part.ts" />
/// <reference path="./org.bukkit.block.data.type.Bed.ts" />
/// <reference path="./org.bukkit.block.data.type.Bell.Attachment.ts" />
/// <reference path="./org.bukkit.block.data.type.Bell.ts" />
/// <reference path="./org.bukkit.block.data.type.BrewingStand.ts" />
/// <reference path="./org.bukkit.block.data.type.BubbleColumn.ts" />
/// <reference path="./org.bukkit.block.data.type.Cake.ts" />
/// <reference path="./org.bukkit.block.data.type.Campfire.ts" />
/// <reference path="./org.bukkit.block.data.type.Chest.Type.ts" />
/// <reference path="./org.bukkit.block.data.type.Chest.ts" />
/// <reference path="./org.bukkit.block.data.type.Cocoa.ts" />
/// <reference path="./org.bukkit.block.data.type.CommandBlock.ts" />
/// <reference path="./org.bukkit.block.data.type.Comparator.Mode.ts" />
/// <reference path="./org.bukkit.block.data.type.Comparator.ts" />
/// <reference path="./org.bukkit.block.data.type.CoralWallFan.ts" />
/// <reference path="./org.bukkit.block.data.type.DaylightDetector.ts" />
/// <reference path="./org.bukkit.block.data.type.Dispenser.ts" />
/// <reference path="./org.bukkit.block.data.type.Door.Hinge.ts" />
/// <reference path="./org.bukkit.block.data.type.Door.ts" />
/// <reference path="./org.bukkit.block.data.type.EndPortalFrame.ts" />
/// <reference path="./org.bukkit.block.data.type.EnderChest.ts" />
/// <reference path="./org.bukkit.block.data.type.Farmland.ts" />
/// <reference path="./org.bukkit.block.data.type.Fence.ts" />
/// <reference path="./org.bukkit.block.data.type.Fire.ts" />
/// <reference path="./org.bukkit.block.data.type.Furnace.ts" />
/// <reference path="./org.bukkit.block.data.type.Gate.ts" />
/// <reference path="./org.bukkit.block.data.type.GlassPane.ts" />
/// <reference path="./org.bukkit.block.data.type.Hopper.ts" />
/// <reference path="./org.bukkit.block.data.type.Jukebox.ts" />
/// <reference path="./org.bukkit.block.data.type.Ladder.ts" />
/// <reference path="./org.bukkit.block.data.type.Lantern.ts" />
/// <reference path="./org.bukkit.block.data.type.Leaves.ts" />
/// <reference path="./org.bukkit.block.data.type.Lectern.ts" />
/// <reference path="./org.bukkit.block.data.type.NoteBlock.ts" />
/// <reference path="./org.bukkit.block.data.type.Observer.ts" />
/// <reference path="./org.bukkit.block.data.type.Piston.ts" />
/// <reference path="./org.bukkit.block.data.type.PistonHead.ts" />
/// <reference path="./org.bukkit.block.data.type.RedstoneRail.ts" />
/// <reference path="./org.bukkit.block.data.type.RedstoneWallTorch.ts" />
/// <reference path="./org.bukkit.block.data.type.RedstoneWire.Connection.ts" />
/// <reference path="./org.bukkit.block.data.type.RedstoneWire.ts" />
/// <reference path="./org.bukkit.block.data.type.Repeater.ts" />
/// <reference path="./org.bukkit.block.data.type.Sapling.ts" />
/// <reference path="./org.bukkit.block.data.type.Scaffolding.ts" />
/// <reference path="./org.bukkit.block.data.type.SeaPickle.ts" />
/// <reference path="./org.bukkit.block.data.type.Sign.ts" />
/// <reference path="./org.bukkit.block.data.type.Slab.Type.ts" />
/// <reference path="./org.bukkit.block.data.type.Slab.ts" />
/// <reference path="./org.bukkit.block.data.type.Snow.ts" />
/// <reference path="./org.bukkit.block.data.type.Stairs.Shape.ts" />
/// <reference path="./org.bukkit.block.data.type.Stairs.ts" />
/// <reference path="./org.bukkit.block.data.type.StructureBlock.Mode.ts" />
/// <reference path="./org.bukkit.block.data.type.StructureBlock.ts" />
/// <reference path="./org.bukkit.block.data.type.Switch.Face.ts" />
/// <reference path="./org.bukkit.block.data.type.Switch.ts" />
/// <reference path="./org.bukkit.block.data.type.TNT.ts" />
/// <reference path="./org.bukkit.block.data.type.TechnicalPiston.Type.ts" />
/// <reference path="./org.bukkit.block.data.type.TechnicalPiston.ts" />
/// <reference path="./org.bukkit.block.data.type.TrapDoor.ts" />
/// <reference path="./org.bukkit.block.data.type.Tripwire.ts" />
/// <reference path="./org.bukkit.block.data.type.TripwireHook.ts" />
/// <reference path="./org.bukkit.block.data.type.TurtleEgg.ts" />
/// <reference path="./org.bukkit.block.data.type.WallSign.ts" />
/// <reference path="./org.bukkit.block.structure.Mirror.ts" />
/// <reference path="./org.bukkit.block.structure.StructureRotation.ts" />
/// <reference path="./org.bukkit.block.structure.UsageMode.ts" />
/// <reference path="./org.bukkit.boss.BarColor.ts" />
/// <reference path="./org.bukkit.boss.BarFlag.ts" />
/// <reference path="./org.bukkit.boss.BarStyle.ts" />
/// <reference path="./org.bukkit.boss.BossBar.ts" />
/// <reference path="./org.bukkit.boss.KeyedBossBar.ts" />
/// <reference path="./org.bukkit.command.BlockCommandSender.ts" />
/// <reference path="./org.bukkit.command.Command.ts" />
/// <reference path="./org.bukkit.command.CommandException.ts" />
/// <reference path="./org.bukkit.command.CommandExecutor.ts" />
/// <reference path="./org.bukkit.command.CommandMap.ts" />
/// <reference path="./org.bukkit.command.CommandSender.ts" />
/// <reference path="./org.bukkit.command.ConsoleCommandSender.ts" />
/// <reference path="./org.bukkit.command.FormattedCommandAlias.ts" />
/// <reference path="./org.bukkit.command.MultipleCommandAlias.ts" />
/// <reference path="./org.bukkit.command.PluginCommand.ts" />
/// <reference path="./org.bukkit.command.PluginCommandYamlParser.ts" />
/// <reference path="./org.bukkit.command.PluginIdentifiableCommand.ts" />
/// <reference path="./org.bukkit.command.ProxiedCommandSender.ts" />
/// <reference path="./org.bukkit.command.RemoteConsoleCommandSender.ts" />
/// <reference path="./org.bukkit.command.SimpleCommandMap.ts" />
/// <reference path="./org.bukkit.command.TabCompleter.ts" />
/// <reference path="./org.bukkit.command.TabExecutor.ts" />
/// <reference path="./org.bukkit.command.defaults.BukkitCommand.ts" />
/// <reference path="./org.bukkit.command.defaults.HelpCommand.ts" />
/// <reference path="./org.bukkit.command.defaults.PluginsCommand.ts" />
/// <reference path="./org.bukkit.command.defaults.ReloadCommand.ts" />
/// <reference path="./org.bukkit.command.defaults.TimingsCommand.ts" />
/// <reference path="./org.bukkit.command.defaults.VersionCommand.ts" />
/// <reference path="./org.bukkit.configuration.Configuration.ts" />
/// <reference path="./org.bukkit.configuration.ConfigurationOptions.ts" />
/// <reference path="./org.bukkit.configuration.ConfigurationSection.ts" />
/// <reference path="./org.bukkit.configuration.InvalidConfigurationException.ts" />
/// <reference path="./org.bukkit.configuration.MemoryConfiguration.ts" />
/// <reference path="./org.bukkit.configuration.MemoryConfigurationOptions.ts" />
/// <reference path="./org.bukkit.configuration.MemorySection.ts" />
/// <reference path="./org.bukkit.configuration.file.FileConfiguration.ts" />
/// <reference path="./org.bukkit.configuration.file.FileConfigurationOptions.ts" />
/// <reference path="./org.bukkit.configuration.file.YamlConfiguration.ts" />
/// <reference path="./org.bukkit.configuration.file.YamlConfigurationOptions.ts" />
/// <reference path="./org.bukkit.configuration.file.YamlConstructor.ts" />
/// <reference path="./org.bukkit.configuration.file.YamlRepresenter.ts" />
/// <reference path="./org.bukkit.configuration.serialization.ConfigurationSerializable.ts" />
/// <reference path="./org.bukkit.configuration.serialization.ConfigurationSerialization.ts" />
/// <reference path="./org.bukkit.configuration.serialization.DelegateDeserialization.ts" />
/// <reference path="./org.bukkit.configuration.serialization.SerializableAs.ts" />
/// <reference path="./org.bukkit.conversations.BooleanPrompt.ts" />
/// <reference path="./org.bukkit.conversations.Conversable.ts" />
/// <reference path="./org.bukkit.conversations.Conversation.ConversationState.ts" />
/// <reference path="./org.bukkit.conversations.Conversation.ts" />
/// <reference path="./org.bukkit.conversations.ConversationAbandonedEvent.ts" />
/// <reference path="./org.bukkit.conversations.ConversationAbandonedListener.ts" />
/// <reference path="./org.bukkit.conversations.ConversationCanceller.ts" />
/// <reference path="./org.bukkit.conversations.ConversationContext.ts" />
/// <reference path="./org.bukkit.conversations.ConversationFactory.ts" />
/// <reference path="./org.bukkit.conversations.ConversationPrefix.ts" />
/// <reference path="./org.bukkit.conversations.ExactMatchConversationCanceller.ts" />
/// <reference path="./org.bukkit.conversations.FixedSetPrompt.ts" />
/// <reference path="./org.bukkit.conversations.InactivityConversationCanceller.ts" />
/// <reference path="./org.bukkit.conversations.ManuallyAbandonedConversationCanceller.ts" />
/// <reference path="./org.bukkit.conversations.MessagePrompt.ts" />
/// <reference path="./org.bukkit.conversations.NullConversationPrefix.ts" />
/// <reference path="./org.bukkit.conversations.NumericPrompt.ts" />
/// <reference path="./org.bukkit.conversations.PlayerNamePrompt.ts" />
/// <reference path="./org.bukkit.conversations.PluginNameConversationPrefix.ts" />
/// <reference path="./org.bukkit.conversations.Prompt.ts" />
/// <reference path="./org.bukkit.conversations.RegexPrompt.ts" />
/// <reference path="./org.bukkit.conversations.StringPrompt.ts" />
/// <reference path="./org.bukkit.conversations.ValidatingPrompt.ts" />
/// <reference path="./org.bukkit.enchantments.Enchantment.ts" />
/// <reference path="./org.bukkit.enchantments.EnchantmentOffer.ts" />
/// <reference path="./org.bukkit.enchantments.EnchantmentTarget.ts" />
/// <reference path="./org.bukkit.enchantments.EnchantmentWrapper.ts" />
/// <reference path="./org.bukkit.entity.AbstractArrow.PickupStatus.ts" />
/// <reference path="./org.bukkit.entity.AbstractArrow.ts" />
/// <reference path="./org.bukkit.entity.AbstractHorse.ts" />
/// <reference path="./org.bukkit.entity.AbstractVillager.ts" />
/// <reference path="./org.bukkit.entity.Ageable.ts" />
/// <reference path="./org.bukkit.entity.Ambient.ts" />
/// <reference path="./org.bukkit.entity.AnimalTamer.ts" />
/// <reference path="./org.bukkit.entity.Animals.ts" />
/// <reference path="./org.bukkit.entity.AreaEffectCloud.ts" />
/// <reference path="./org.bukkit.entity.ArmorStand.ts" />
/// <reference path="./org.bukkit.entity.Arrow.ts" />
/// <reference path="./org.bukkit.entity.Bat.ts" />
/// <reference path="./org.bukkit.entity.Blaze.ts" />
/// <reference path="./org.bukkit.entity.Boat.ts" />
/// <reference path="./org.bukkit.entity.Boss.ts" />
/// <reference path="./org.bukkit.entity.Cat.Type.ts" />
/// <reference path="./org.bukkit.entity.Cat.ts" />
/// <reference path="./org.bukkit.entity.CaveSpider.ts" />
/// <reference path="./org.bukkit.entity.ChestedHorse.ts" />
/// <reference path="./org.bukkit.entity.Chicken.ts" />
/// <reference path="./org.bukkit.entity.Cod.ts" />
/// <reference path="./org.bukkit.entity.ComplexEntityPart.ts" />
/// <reference path="./org.bukkit.entity.ComplexLivingEntity.ts" />
/// <reference path="./org.bukkit.entity.Cow.ts" />
/// <reference path="./org.bukkit.entity.Creature.ts" />
/// <reference path="./org.bukkit.entity.Creeper.ts" />
/// <reference path="./org.bukkit.entity.Damageable.ts" />
/// <reference path="./org.bukkit.entity.Dolphin.ts" />
/// <reference path="./org.bukkit.entity.Donkey.ts" />
/// <reference path="./org.bukkit.entity.DragonFireball.ts" />
/// <reference path="./org.bukkit.entity.Drowned.ts" />
/// <reference path="./org.bukkit.entity.Egg.ts" />
/// <reference path="./org.bukkit.entity.ElderGuardian.ts" />
/// <reference path="./org.bukkit.entity.EnderCrystal.ts" />
/// <reference path="./org.bukkit.entity.EnderDragon.Phase.ts" />
/// <reference path="./org.bukkit.entity.EnderDragon.ts" />
/// <reference path="./org.bukkit.entity.EnderDragonPart.ts" />
/// <reference path="./org.bukkit.entity.EnderPearl.ts" />
/// <reference path="./org.bukkit.entity.EnderSignal.ts" />
/// <reference path="./org.bukkit.entity.Enderman.ts" />
/// <reference path="./org.bukkit.entity.Endermite.ts" />
/// <reference path="./org.bukkit.entity.Entity.ts" />
/// <reference path="./org.bukkit.entity.EntityType.ts" />
/// <reference path="./org.bukkit.entity.Evoker.Spell.ts" />
/// <reference path="./org.bukkit.entity.Evoker.ts" />
/// <reference path="./org.bukkit.entity.EvokerFangs.ts" />
/// <reference path="./org.bukkit.entity.ExperienceOrb.ts" />
/// <reference path="./org.bukkit.entity.Explosive.ts" />
/// <reference path="./org.bukkit.entity.FallingBlock.ts" />
/// <reference path="./org.bukkit.entity.Fireball.ts" />
/// <reference path="./org.bukkit.entity.Firework.ts" />
/// <reference path="./org.bukkit.entity.Fish.ts" />
/// <reference path="./org.bukkit.entity.FishHook.ts" />
/// <reference path="./org.bukkit.entity.Flying.ts" />
/// <reference path="./org.bukkit.entity.Fox.Type.ts" />
/// <reference path="./org.bukkit.entity.Fox.ts" />
/// <reference path="./org.bukkit.entity.Ghast.ts" />
/// <reference path="./org.bukkit.entity.Giant.ts" />
/// <reference path="./org.bukkit.entity.Golem.ts" />
/// <reference path="./org.bukkit.entity.Guardian.ts" />
/// <reference path="./org.bukkit.entity.Hanging.ts" />
/// <reference path="./org.bukkit.entity.Horse.Color.ts" />
/// <reference path="./org.bukkit.entity.Horse.Style.ts" />
/// <reference path="./org.bukkit.entity.Horse.Variant.ts" />
/// <reference path="./org.bukkit.entity.Horse.ts" />
/// <reference path="./org.bukkit.entity.HumanEntity.ts" />
/// <reference path="./org.bukkit.entity.Husk.ts" />
/// <reference path="./org.bukkit.entity.Illager.ts" />
/// <reference path="./org.bukkit.entity.Illusioner.ts" />
/// <reference path="./org.bukkit.entity.IronGolem.ts" />
/// <reference path="./org.bukkit.entity.Item.ts" />
/// <reference path="./org.bukkit.entity.ItemFrame.ts" />
/// <reference path="./org.bukkit.entity.LargeFireball.ts" />
/// <reference path="./org.bukkit.entity.LeashHitch.ts" />
/// <reference path="./org.bukkit.entity.LightningStrike.ts" />
/// <reference path="./org.bukkit.entity.LingeringPotion.ts" />
/// <reference path="./org.bukkit.entity.LivingEntity.ts" />
/// <reference path="./org.bukkit.entity.Llama.Color.ts" />
/// <reference path="./org.bukkit.entity.Llama.ts" />
/// <reference path="./org.bukkit.entity.LlamaSpit.ts" />
/// <reference path="./org.bukkit.entity.MagmaCube.ts" />
/// <reference path="./org.bukkit.entity.Minecart.ts" />
/// <reference path="./org.bukkit.entity.Mob.ts" />
/// <reference path="./org.bukkit.entity.Monster.ts" />
/// <reference path="./org.bukkit.entity.Mule.ts" />
/// <reference path="./org.bukkit.entity.MushroomCow.Variant.ts" />
/// <reference path="./org.bukkit.entity.MushroomCow.ts" />
/// <reference path="./org.bukkit.entity.NPC.ts" />
/// <reference path="./org.bukkit.entity.Ocelot.Type.ts" />
/// <reference path="./org.bukkit.entity.Ocelot.ts" />
/// <reference path="./org.bukkit.entity.Painting.ts" />
/// <reference path="./org.bukkit.entity.Panda.Gene.ts" />
/// <reference path="./org.bukkit.entity.Panda.ts" />
/// <reference path="./org.bukkit.entity.Parrot.Variant.ts" />
/// <reference path="./org.bukkit.entity.Parrot.ts" />
/// <reference path="./org.bukkit.entity.Phantom.ts" />
/// <reference path="./org.bukkit.entity.Pig.ts" />
/// <reference path="./org.bukkit.entity.PigZombie.ts" />
/// <reference path="./org.bukkit.entity.Pillager.ts" />
/// <reference path="./org.bukkit.entity.Player.ts" />
/// <reference path="./org.bukkit.entity.PolarBear.ts" />
/// <reference path="./org.bukkit.entity.Pose.ts" />
/// <reference path="./org.bukkit.entity.Projectile.ts" />
/// <reference path="./org.bukkit.entity.PufferFish.ts" />
/// <reference path="./org.bukkit.entity.Rabbit.Type.ts" />
/// <reference path="./org.bukkit.entity.Rabbit.ts" />
/// <reference path="./org.bukkit.entity.Raider.ts" />
/// <reference path="./org.bukkit.entity.Ravager.ts" />
/// <reference path="./org.bukkit.entity.Salmon.ts" />
/// <reference path="./org.bukkit.entity.Sheep.ts" />
/// <reference path="./org.bukkit.entity.Shulker.ts" />
/// <reference path="./org.bukkit.entity.ShulkerBullet.ts" />
/// <reference path="./org.bukkit.entity.Silverfish.ts" />
/// <reference path="./org.bukkit.entity.Sittable.ts" />
/// <reference path="./org.bukkit.entity.Skeleton.SkeletonType.ts" />
/// <reference path="./org.bukkit.entity.Skeleton.ts" />
/// <reference path="./org.bukkit.entity.SkeletonHorse.ts" />
/// <reference path="./org.bukkit.entity.Slime.ts" />
/// <reference path="./org.bukkit.entity.SmallFireball.ts" />
/// <reference path="./org.bukkit.entity.Snowball.ts" />
/// <reference path="./org.bukkit.entity.Snowman.ts" />
/// <reference path="./org.bukkit.entity.SpectralArrow.ts" />
/// <reference path="./org.bukkit.entity.Spellcaster.Spell.ts" />
/// <reference path="./org.bukkit.entity.Spellcaster.ts" />
/// <reference path="./org.bukkit.entity.Spider.ts" />
/// <reference path="./org.bukkit.entity.SplashPotion.ts" />
/// <reference path="./org.bukkit.entity.Squid.ts" />
/// <reference path="./org.bukkit.entity.Stray.ts" />
/// <reference path="./org.bukkit.entity.TNTPrimed.ts" />
/// <reference path="./org.bukkit.entity.Tameable.ts" />
/// <reference path="./org.bukkit.entity.ThrownExpBottle.ts" />
/// <reference path="./org.bukkit.entity.ThrownPotion.ts" />
/// <reference path="./org.bukkit.entity.TippedArrow.ts" />
/// <reference path="./org.bukkit.entity.TraderLlama.ts" />
/// <reference path="./org.bukkit.entity.Trident.ts" />
/// <reference path="./org.bukkit.entity.TropicalFish.Pattern.ts" />
/// <reference path="./org.bukkit.entity.TropicalFish.ts" />
/// <reference path="./org.bukkit.entity.Turtle.ts" />
/// <reference path="./org.bukkit.entity.Vehicle.ts" />
/// <reference path="./org.bukkit.entity.Vex.ts" />
/// <reference path="./org.bukkit.entity.Villager.Profession.ts" />
/// <reference path="./org.bukkit.entity.Villager.Type.ts" />
/// <reference path="./org.bukkit.entity.Villager.ts" />
/// <reference path="./org.bukkit.entity.Vindicator.ts" />
/// <reference path="./org.bukkit.entity.WanderingTrader.ts" />
/// <reference path="./org.bukkit.entity.WaterMob.ts" />
/// <reference path="./org.bukkit.entity.Witch.ts" />
/// <reference path="./org.bukkit.entity.Wither.ts" />
/// <reference path="./org.bukkit.entity.WitherSkeleton.ts" />
/// <reference path="./org.bukkit.entity.WitherSkull.ts" />
/// <reference path="./org.bukkit.entity.Wolf.ts" />
/// <reference path="./org.bukkit.entity.Zombie.ts" />
/// <reference path="./org.bukkit.entity.ZombieHorse.ts" />
/// <reference path="./org.bukkit.entity.ZombieVillager.ts" />
/// <reference path="./org.bukkit.entity.memory.MemoryKey.ts" />
/// <reference path="./org.bukkit.entity.minecart.CommandMinecart.ts" />
/// <reference path="./org.bukkit.entity.minecart.ExplosiveMinecart.ts" />
/// <reference path="./org.bukkit.entity.minecart.HopperMinecart.ts" />
/// <reference path="./org.bukkit.entity.minecart.PoweredMinecart.ts" />
/// <reference path="./org.bukkit.entity.minecart.RideableMinecart.ts" />
/// <reference path="./org.bukkit.entity.minecart.SpawnerMinecart.ts" />
/// <reference path="./org.bukkit.entity.minecart.StorageMinecart.ts" />
/// <reference path="./org.bukkit.event.Cancellable.ts" />
/// <reference path="./org.bukkit.event.Event.Result.ts" />
/// <reference path="./org.bukkit.event.Event.ts" />
/// <reference path="./org.bukkit.event.EventException.ts" />
/// <reference path="./org.bukkit.event.EventHandler.ts" />
/// <reference path="./org.bukkit.event.EventPriority.ts" />
/// <reference path="./org.bukkit.event.HandlerList.ts" />
/// <reference path="./org.bukkit.event.Listener.ts" />
/// <reference path="./org.bukkit.event.block.Action.ts" />
/// <reference path="./org.bukkit.event.block.BlockBreakEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockBurnEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockCanBuildEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockCookEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockDamageEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockDispenseArmorEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockDispenseEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockDropItemEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockExpEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockExplodeEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockFadeEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockFertilizeEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockFormEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockFromToEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockGrowEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockIgniteEvent.IgniteCause.ts" />
/// <reference path="./org.bukkit.event.block.BlockIgniteEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockMultiPlaceEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockPhysicsEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockPistonEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockPistonExtendEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockPistonRetractEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockPlaceEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockRedstoneEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockShearEntityEvent.ts" />
/// <reference path="./org.bukkit.event.block.BlockSpreadEvent.ts" />
/// <reference path="./org.bukkit.event.block.CauldronLevelChangeEvent.ChangeReason.ts" />
/// <reference path="./org.bukkit.event.block.CauldronLevelChangeEvent.ts" />
/// <reference path="./org.bukkit.event.block.EntityBlockFormEvent.ts" />
/// <reference path="./org.bukkit.event.block.FluidLevelChangeEvent.ts" />
/// <reference path="./org.bukkit.event.block.LeavesDecayEvent.ts" />
/// <reference path="./org.bukkit.event.block.MoistureChangeEvent.ts" />
/// <reference path="./org.bukkit.event.block.NotePlayEvent.ts" />
/// <reference path="./org.bukkit.event.block.SignChangeEvent.ts" />
/// <reference path="./org.bukkit.event.block.SpongeAbsorbEvent.ts" />
/// <reference path="./org.bukkit.event.enchantment.EnchantItemEvent.ts" />
/// <reference path="./org.bukkit.event.enchantment.PrepareItemEnchantEvent.ts" />
/// <reference path="./org.bukkit.event.entity.AreaEffectCloudApplyEvent.ts" />
/// <reference path="./org.bukkit.event.entity.BatToggleSleepEvent.ts" />
/// <reference path="./org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.ts" />
/// <reference path="./org.bukkit.event.entity.CreatureSpawnEvent.ts" />
/// <reference path="./org.bukkit.event.entity.CreeperPowerEvent.PowerCause.ts" />
/// <reference path="./org.bukkit.event.entity.CreeperPowerEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EnderDragonChangePhaseEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityAirChangeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityBreakDoorEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityBreedEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityChangeBlockEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityCombustByBlockEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityCombustByEntityEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityCombustEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityCreatePortalEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityDamageByBlockEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityDamageByEntityEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityDamageEvent.DamageCause.ts" />
/// <reference path="./org.bukkit.event.entity.EntityDamageEvent.DamageModifier.ts" />
/// <reference path="./org.bukkit.event.entity.EntityDamageEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityDeathEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityDropItemEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityExplodeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityInteractEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPickupItemEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPlaceEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPortalEnterEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPortalEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPortalExitEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPoseChangeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPotionEffectEvent.Action.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ts" />
/// <reference path="./org.bukkit.event.entity.EntityPotionEffectEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.ts" />
/// <reference path="./org.bukkit.event.entity.EntityRegainHealthEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityResurrectEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityShootBowEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntitySpawnEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityTameEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityTargetEvent.TargetReason.ts" />
/// <reference path="./org.bukkit.event.entity.EntityTargetEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityTargetLivingEntityEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityTeleportEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityToggleGlideEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityToggleSwimEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityTransformEvent.TransformReason.ts" />
/// <reference path="./org.bukkit.event.entity.EntityTransformEvent.ts" />
/// <reference path="./org.bukkit.event.entity.EntityUnleashEvent.UnleashReason.ts" />
/// <reference path="./org.bukkit.event.entity.EntityUnleashEvent.ts" />
/// <reference path="./org.bukkit.event.entity.ExpBottleEvent.ts" />
/// <reference path="./org.bukkit.event.entity.ExplosionPrimeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.FireworkExplodeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.FoodLevelChangeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.HorseJumpEvent.ts" />
/// <reference path="./org.bukkit.event.entity.ItemDespawnEvent.ts" />
/// <reference path="./org.bukkit.event.entity.ItemMergeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.ItemSpawnEvent.ts" />
/// <reference path="./org.bukkit.event.entity.LingeringPotionSplashEvent.ts" />
/// <reference path="./org.bukkit.event.entity.PigZapEvent.ts" />
/// <reference path="./org.bukkit.event.entity.PigZombieAngerEvent.ts" />
/// <reference path="./org.bukkit.event.entity.PlayerDeathEvent.ts" />
/// <reference path="./org.bukkit.event.entity.PlayerLeashEntityEvent.ts" />
/// <reference path="./org.bukkit.event.entity.PotionSplashEvent.ts" />
/// <reference path="./org.bukkit.event.entity.ProjectileHitEvent.ts" />
/// <reference path="./org.bukkit.event.entity.ProjectileLaunchEvent.ts" />
/// <reference path="./org.bukkit.event.entity.SheepDyeWoolEvent.ts" />
/// <reference path="./org.bukkit.event.entity.SheepRegrowWoolEvent.ts" />
/// <reference path="./org.bukkit.event.entity.SlimeSplitEvent.ts" />
/// <reference path="./org.bukkit.event.entity.VillagerAcquireTradeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.VillagerCareerChangeEvent.ChangeReason.ts" />
/// <reference path="./org.bukkit.event.entity.VillagerCareerChangeEvent.ts" />
/// <reference path="./org.bukkit.event.entity.VillagerReplenishTradeEvent.ts" />
/// <reference path="./org.bukkit.event.hanging.HangingBreakByEntityEvent.ts" />
/// <reference path="./org.bukkit.event.hanging.HangingBreakEvent.RemoveCause.ts" />
/// <reference path="./org.bukkit.event.hanging.HangingBreakEvent.ts" />
/// <reference path="./org.bukkit.event.hanging.HangingEvent.ts" />
/// <reference path="./org.bukkit.event.hanging.HangingPlaceEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.BrewEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.BrewingStandFuelEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.ClickType.ts" />
/// <reference path="./org.bukkit.event.inventory.CraftItemEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.DragType.ts" />
/// <reference path="./org.bukkit.event.inventory.FurnaceBurnEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.FurnaceExtractEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.FurnaceSmeltEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryAction.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryClickEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryCloseEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryCreativeEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryDragEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryInteractEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryMoveItemEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryOpenEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryPickupItemEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryType.SlotType.ts" />
/// <reference path="./org.bukkit.event.inventory.InventoryType.ts" />
/// <reference path="./org.bukkit.event.inventory.PrepareAnvilEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.PrepareItemCraftEvent.ts" />
/// <reference path="./org.bukkit.event.inventory.TradeSelectEvent.ts" />
/// <reference path="./org.bukkit.event.player.AsyncPlayerChatEvent.ts" />
/// <reference path="./org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result.ts" />
/// <reference path="./org.bukkit.event.player.AsyncPlayerPreLoginEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerAchievementAwardedEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerAdvancementDoneEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerAnimationEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerAnimationType.ts" />
/// <reference path="./org.bukkit.event.player.PlayerArmorStandManipulateEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerBedEnterEvent.BedEnterResult.ts" />
/// <reference path="./org.bukkit.event.player.PlayerBedEnterEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerBedLeaveEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerBucketEmptyEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerBucketEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerBucketFillEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerChangedMainHandEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerChangedWorldEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerChannelEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerChatEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerChatTabCompleteEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerCommandPreprocessEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerCommandSendEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerDropItemEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerEditBookEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerEggThrowEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerExpChangeEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerFishEvent.State.ts" />
/// <reference path="./org.bukkit.event.player.PlayerFishEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerGameModeChangeEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerInteractAtEntityEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerInteractEntityEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerInteractEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerItemBreakEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerItemConsumeEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerItemDamageEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerItemHeldEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerItemMendEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerJoinEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerKickEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerLevelChangeEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerLocaleChangeEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerLoginEvent.Result.ts" />
/// <reference path="./org.bukkit.event.player.PlayerLoginEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerMoveEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerPickupArrowEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerPickupItemEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerPortalEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerPreLoginEvent.Result.ts" />
/// <reference path="./org.bukkit.event.player.PlayerPreLoginEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerQuitEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerRecipeDiscoverEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerRegisterChannelEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerResourcePackStatusEvent.Status.ts" />
/// <reference path="./org.bukkit.event.player.PlayerResourcePackStatusEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerRespawnEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerRiptideEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerShearEntityEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerStatisticIncrementEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerSwapHandItemsEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerTakeLecternBookEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.ts" />
/// <reference path="./org.bukkit.event.player.PlayerTeleportEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerToggleFlightEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerToggleSneakEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerToggleSprintEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerUnleashEntityEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerUnregisterChannelEvent.ts" />
/// <reference path="./org.bukkit.event.player.PlayerVelocityEvent.ts" />
/// <reference path="./org.bukkit.event.server.BroadcastMessageEvent.ts" />
/// <reference path="./org.bukkit.event.server.MapInitializeEvent.ts" />
/// <reference path="./org.bukkit.event.server.PluginDisableEvent.ts" />
/// <reference path="./org.bukkit.event.server.PluginEnableEvent.ts" />
/// <reference path="./org.bukkit.event.server.PluginEvent.ts" />
/// <reference path="./org.bukkit.event.server.RemoteServerCommandEvent.ts" />
/// <reference path="./org.bukkit.event.server.ServerCommandEvent.ts" />
/// <reference path="./org.bukkit.event.server.ServerEvent.ts" />
/// <reference path="./org.bukkit.event.server.ServerListPingEvent.ts" />
/// <reference path="./org.bukkit.event.server.ServerLoadEvent.LoadType.ts" />
/// <reference path="./org.bukkit.event.server.ServerLoadEvent.ts" />
/// <reference path="./org.bukkit.event.server.ServiceEvent.ts" />
/// <reference path="./org.bukkit.event.server.ServiceRegisterEvent.ts" />
/// <reference path="./org.bukkit.event.server.ServiceUnregisterEvent.ts" />
/// <reference path="./org.bukkit.event.server.TabCompleteEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleBlockCollisionEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleCollisionEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleCreateEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleDamageEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleDestroyEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleEnterEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleEntityCollisionEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleExitEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleMoveEvent.ts" />
/// <reference path="./org.bukkit.event.vehicle.VehicleUpdateEvent.ts" />
/// <reference path="./org.bukkit.event.weather.LightningStrikeEvent.Cause.ts" />
/// <reference path="./org.bukkit.event.weather.LightningStrikeEvent.ts" />
/// <reference path="./org.bukkit.event.weather.ThunderChangeEvent.ts" />
/// <reference path="./org.bukkit.event.weather.WeatherChangeEvent.ts" />
/// <reference path="./org.bukkit.event.weather.WeatherEvent.ts" />
/// <reference path="./org.bukkit.event.world.ChunkEvent.ts" />
/// <reference path="./org.bukkit.event.world.ChunkLoadEvent.ts" />
/// <reference path="./org.bukkit.event.world.ChunkPopulateEvent.ts" />
/// <reference path="./org.bukkit.event.world.ChunkUnloadEvent.ts" />
/// <reference path="./org.bukkit.event.world.PortalCreateEvent.CreateReason.ts" />
/// <reference path="./org.bukkit.event.world.PortalCreateEvent.ts" />
/// <reference path="./org.bukkit.event.world.SpawnChangeEvent.ts" />
/// <reference path="./org.bukkit.event.world.StructureGrowEvent.ts" />
/// <reference path="./org.bukkit.event.world.WorldEvent.ts" />
/// <reference path="./org.bukkit.event.world.WorldInitEvent.ts" />
/// <reference path="./org.bukkit.event.world.WorldLoadEvent.ts" />
/// <reference path="./org.bukkit.event.world.WorldSaveEvent.ts" />
/// <reference path="./org.bukkit.event.world.WorldUnloadEvent.ts" />
/// <reference path="./org.bukkit.generator.BlockPopulator.ts" />
/// <reference path="./org.bukkit.generator.ChunkGenerator.BiomeGrid.ts" />
/// <reference path="./org.bukkit.generator.ChunkGenerator.ChunkData.ts" />
/// <reference path="./org.bukkit.generator.ChunkGenerator.ts" />
/// <reference path="./org.bukkit.help.GenericCommandHelpTopic.ts" />
/// <reference path="./org.bukkit.help.HelpMap.ts" />
/// <reference path="./org.bukkit.help.HelpTopic.ts" />
/// <reference path="./org.bukkit.help.HelpTopicComparator.TopicNameComparator.ts" />
/// <reference path="./org.bukkit.help.HelpTopicComparator.ts" />
/// <reference path="./org.bukkit.help.HelpTopicFactory.ts" />
/// <reference path="./org.bukkit.help.IndexHelpTopic.ts" />
/// <reference path="./org.bukkit.inventory.AbstractHorseInventory.ts" />
/// <reference path="./org.bukkit.inventory.AnvilInventory.ts" />
/// <reference path="./org.bukkit.inventory.BeaconInventory.ts" />
/// <reference path="./org.bukkit.inventory.BlastingRecipe.ts" />
/// <reference path="./org.bukkit.inventory.BlockInventoryHolder.ts" />
/// <reference path="./org.bukkit.inventory.BrewerInventory.ts" />
/// <reference path="./org.bukkit.inventory.CampfireRecipe.ts" />
/// <reference path="./org.bukkit.inventory.CartographyInventory.ts" />
/// <reference path="./org.bukkit.inventory.CookingRecipe.ts" />
/// <reference path="./org.bukkit.inventory.CraftingInventory.ts" />
/// <reference path="./org.bukkit.inventory.DoubleChestInventory.ts" />
/// <reference path="./org.bukkit.inventory.EnchantingInventory.ts" />
/// <reference path="./org.bukkit.inventory.EntityEquipment.ts" />
/// <reference path="./org.bukkit.inventory.EquipmentSlot.ts" />
/// <reference path="./org.bukkit.inventory.FurnaceInventory.ts" />
/// <reference path="./org.bukkit.inventory.FurnaceRecipe.ts" />
/// <reference path="./org.bukkit.inventory.GrindstoneInventory.ts" />
/// <reference path="./org.bukkit.inventory.HorseInventory.ts" />
/// <reference path="./org.bukkit.inventory.Inventory.ts" />
/// <reference path="./org.bukkit.inventory.InventoryHolder.ts" />
/// <reference path="./org.bukkit.inventory.InventoryView.Property.ts" />
/// <reference path="./org.bukkit.inventory.InventoryView.ts" />
/// <reference path="./org.bukkit.inventory.ItemFactory.ts" />
/// <reference path="./org.bukkit.inventory.ItemFlag.ts" />
/// <reference path="./org.bukkit.inventory.ItemStack.ts" />
/// <reference path="./org.bukkit.inventory.LecternInventory.ts" />
/// <reference path="./org.bukkit.inventory.LlamaInventory.ts" />
/// <reference path="./org.bukkit.inventory.LoomInventory.ts" />
/// <reference path="./org.bukkit.inventory.MainHand.ts" />
/// <reference path="./org.bukkit.inventory.Merchant.ts" />
/// <reference path="./org.bukkit.inventory.MerchantInventory.ts" />
/// <reference path="./org.bukkit.inventory.MerchantRecipe.ts" />
/// <reference path="./org.bukkit.inventory.PlayerInventory.ts" />
/// <reference path="./org.bukkit.inventory.Recipe.ts" />
/// <reference path="./org.bukkit.inventory.RecipeChoice.ExactChoice.ts" />
/// <reference path="./org.bukkit.inventory.RecipeChoice.MaterialChoice.ts" />
/// <reference path="./org.bukkit.inventory.RecipeChoice.ts" />
/// <reference path="./org.bukkit.inventory.ShapedRecipe.ts" />
/// <reference path="./org.bukkit.inventory.ShapelessRecipe.ts" />
/// <reference path="./org.bukkit.inventory.SmokingRecipe.ts" />
/// <reference path="./org.bukkit.inventory.StonecutterInventory.ts" />
/// <reference path="./org.bukkit.inventory.StonecuttingRecipe.ts" />
/// <reference path="./org.bukkit.inventory.meta.BannerMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.BlockDataMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.BlockStateMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.BookMeta.Generation.ts" />
/// <reference path="./org.bukkit.inventory.meta.BookMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.CrossbowMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.Damageable.ts" />
/// <reference path="./org.bukkit.inventory.meta.EnchantmentStorageMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.FireworkEffectMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.FireworkMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.ItemMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.KnowledgeBookMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.LeatherArmorMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.MapMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.PotionMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.Repairable.ts" />
/// <reference path="./org.bukkit.inventory.meta.SkullMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.SpawnEggMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.TropicalFishBucketMeta.ts" />
/// <reference path="./org.bukkit.inventory.meta.tags.CustomItemTagContainer.ts" />
/// <reference path="./org.bukkit.inventory.meta.tags.ItemTagAdapterContext.ts" />
/// <reference path="./org.bukkit.inventory.meta.tags.ItemTagType.PrimitiveTagType.ts" />
/// <reference path="./org.bukkit.inventory.meta.tags.ItemTagType.ts" />
/// <reference path="./org.bukkit.loot.LootContext.Builder.ts" />
/// <reference path="./org.bukkit.loot.LootContext.ts" />
/// <reference path="./org.bukkit.loot.LootTable.ts" />
/// <reference path="./org.bukkit.loot.LootTables.ts" />
/// <reference path="./org.bukkit.loot.Lootable.ts" />
/// <reference path="./org.bukkit.map.MapCanvas.ts" />
/// <reference path="./org.bukkit.map.MapCursor.Type.ts" />
/// <reference path="./org.bukkit.map.MapCursor.ts" />
/// <reference path="./org.bukkit.map.MapCursorCollection.ts" />
/// <reference path="./org.bukkit.map.MapFont.CharacterSprite.ts" />
/// <reference path="./org.bukkit.map.MapFont.ts" />
/// <reference path="./org.bukkit.map.MapPalette.ts" />
/// <reference path="./org.bukkit.map.MapRenderer.ts" />
/// <reference path="./org.bukkit.map.MapView.Scale.ts" />
/// <reference path="./org.bukkit.map.MapView.ts" />
/// <reference path="./org.bukkit.map.MinecraftFont.ts" />
/// <reference path="./org.bukkit.material.Attachable.ts" />
/// <reference path="./org.bukkit.material.Banner.ts" />
/// <reference path="./org.bukkit.material.Bed.ts" />
/// <reference path="./org.bukkit.material.Button.ts" />
/// <reference path="./org.bukkit.material.Cake.ts" />
/// <reference path="./org.bukkit.material.Cauldron.ts" />
/// <reference path="./org.bukkit.material.Chest.ts" />
/// <reference path="./org.bukkit.material.Coal.ts" />
/// <reference path="./org.bukkit.material.CocoaPlant.CocoaPlantSize.ts" />
/// <reference path="./org.bukkit.material.CocoaPlant.ts" />
/// <reference path="./org.bukkit.material.Colorable.ts" />
/// <reference path="./org.bukkit.material.Command.ts" />
/// <reference path="./org.bukkit.material.Comparator.ts" />
/// <reference path="./org.bukkit.material.Crops.ts" />
/// <reference path="./org.bukkit.material.DetectorRail.ts" />
/// <reference path="./org.bukkit.material.Diode.ts" />
/// <reference path="./org.bukkit.material.Directional.ts" />
/// <reference path="./org.bukkit.material.DirectionalContainer.ts" />
/// <reference path="./org.bukkit.material.Dispenser.ts" />
/// <reference path="./org.bukkit.material.Door.ts" />
/// <reference path="./org.bukkit.material.Dye.ts" />
/// <reference path="./org.bukkit.material.EnderChest.ts" />
/// <reference path="./org.bukkit.material.ExtendedRails.ts" />
/// <reference path="./org.bukkit.material.FlowerPot.ts" />
/// <reference path="./org.bukkit.material.Furnace.ts" />
/// <reference path="./org.bukkit.material.FurnaceAndDispenser.ts" />
/// <reference path="./org.bukkit.material.Gate.ts" />
/// <reference path="./org.bukkit.material.Hopper.ts" />
/// <reference path="./org.bukkit.material.Ladder.ts" />
/// <reference path="./org.bukkit.material.Leaves.ts" />
/// <reference path="./org.bukkit.material.Lever.ts" />
/// <reference path="./org.bukkit.material.LongGrass.ts" />
/// <reference path="./org.bukkit.material.MaterialData.ts" />
/// <reference path="./org.bukkit.material.MonsterEggs.ts" />
/// <reference path="./org.bukkit.material.Mushroom.ts" />
/// <reference path="./org.bukkit.material.NetherWarts.ts" />
/// <reference path="./org.bukkit.material.Observer.ts" />
/// <reference path="./org.bukkit.material.Openable.ts" />
/// <reference path="./org.bukkit.material.PistonBaseMaterial.ts" />
/// <reference path="./org.bukkit.material.PistonExtensionMaterial.ts" />
/// <reference path="./org.bukkit.material.PoweredRail.ts" />
/// <reference path="./org.bukkit.material.PressurePlate.ts" />
/// <reference path="./org.bukkit.material.PressureSensor.ts" />
/// <reference path="./org.bukkit.material.Pumpkin.ts" />
/// <reference path="./org.bukkit.material.Rails.ts" />
/// <reference path="./org.bukkit.material.Redstone.ts" />
/// <reference path="./org.bukkit.material.RedstoneTorch.ts" />
/// <reference path="./org.bukkit.material.RedstoneWire.ts" />
/// <reference path="./org.bukkit.material.Sandstone.ts" />
/// <reference path="./org.bukkit.material.Sapling.ts" />
/// <reference path="./org.bukkit.material.Sign.ts" />
/// <reference path="./org.bukkit.material.SimpleAttachableMaterialData.ts" />
/// <reference path="./org.bukkit.material.Skull.ts" />
/// <reference path="./org.bukkit.material.SmoothBrick.ts" />
/// <reference path="./org.bukkit.material.SpawnEgg.ts" />
/// <reference path="./org.bukkit.material.Stairs.ts" />
/// <reference path="./org.bukkit.material.Step.ts" />
/// <reference path="./org.bukkit.material.TexturedMaterial.ts" />
/// <reference path="./org.bukkit.material.Torch.ts" />
/// <reference path="./org.bukkit.material.TrapDoor.ts" />
/// <reference path="./org.bukkit.material.Tree.ts" />
/// <reference path="./org.bukkit.material.Tripwire.ts" />
/// <reference path="./org.bukkit.material.TripwireHook.ts" />
/// <reference path="./org.bukkit.material.Vine.ts" />
/// <reference path="./org.bukkit.material.Wood.ts" />
/// <reference path="./org.bukkit.material.WoodenStep.ts" />
/// <reference path="./org.bukkit.material.Wool.ts" />
/// <reference path="./org.bukkit.material.types.MushroomBlockTexture.ts" />
/// <reference path="./org.bukkit.metadata.FixedMetadataValue.ts" />
/// <reference path="./org.bukkit.metadata.LazyMetadataValue.CacheStrategy.ts" />
/// <reference path="./org.bukkit.metadata.LazyMetadataValue.ts" />
/// <reference path="./org.bukkit.metadata.MetadataConversionException.ts" />
/// <reference path="./org.bukkit.metadata.MetadataEvaluationException.ts" />
/// <reference path="./org.bukkit.metadata.MetadataStore.ts" />
/// <reference path="./org.bukkit.metadata.MetadataStoreBase.ts" />
/// <reference path="./org.bukkit.metadata.MetadataValue.ts" />
/// <reference path="./org.bukkit.metadata.MetadataValueAdapter.ts" />
/// <reference path="./org.bukkit.metadata.Metadatable.ts" />
/// <reference path="./org.bukkit.permissions.Permissible.ts" />
/// <reference path="./org.bukkit.permissions.PermissibleBase.ts" />
/// <reference path="./org.bukkit.permissions.Permission.ts" />
/// <reference path="./org.bukkit.permissions.PermissionAttachment.ts" />
/// <reference path="./org.bukkit.permissions.PermissionAttachmentInfo.ts" />
/// <reference path="./org.bukkit.permissions.PermissionDefault.ts" />
/// <reference path="./org.bukkit.permissions.PermissionRemovedExecutor.ts" />
/// <reference path="./org.bukkit.permissions.ServerOperator.ts" />
/// <reference path="./org.bukkit.persistence.PersistentDataAdapterContext.ts" />
/// <reference path="./org.bukkit.persistence.PersistentDataContainer.ts" />
/// <reference path="./org.bukkit.persistence.PersistentDataHolder.ts" />
/// <reference path="./org.bukkit.persistence.PersistentDataType.PrimitivePersistentDataType.ts" />
/// <reference path="./org.bukkit.persistence.PersistentDataType.ts" />
/// <reference path="./org.bukkit.plugin.AuthorNagException.ts" />
/// <reference path="./org.bukkit.plugin.EventExecutor.ts" />
/// <reference path="./org.bukkit.plugin.IllegalPluginAccessException.ts" />
/// <reference path="./org.bukkit.plugin.InvalidDescriptionException.ts" />
/// <reference path="./org.bukkit.plugin.InvalidPluginException.ts" />
/// <reference path="./org.bukkit.plugin.Plugin.ts" />
/// <reference path="./org.bukkit.plugin.PluginAwareness.Flags.ts" />
/// <reference path="./org.bukkit.plugin.PluginAwareness.ts" />
/// <reference path="./org.bukkit.plugin.PluginBase.ts" />
/// <reference path="./org.bukkit.plugin.PluginDescriptionFile.ts" />
/// <reference path="./org.bukkit.plugin.PluginLoadOrder.ts" />
/// <reference path="./org.bukkit.plugin.PluginLoader.ts" />
/// <reference path="./org.bukkit.plugin.PluginLogger.ts" />
/// <reference path="./org.bukkit.plugin.PluginManager.ts" />
/// <reference path="./org.bukkit.plugin.RegisteredListener.ts" />
/// <reference path="./org.bukkit.plugin.RegisteredServiceProvider.ts" />
/// <reference path="./org.bukkit.plugin.ServicePriority.ts" />
/// <reference path="./org.bukkit.plugin.ServicesManager.ts" />
/// <reference path="./org.bukkit.plugin.SimplePluginManager.ts" />
/// <reference path="./org.bukkit.plugin.SimpleServicesManager.ts" />
/// <reference path="./org.bukkit.plugin.TimedRegisteredListener.ts" />
/// <reference path="./org.bukkit.plugin.UnknownDependencyException.ts" />
/// <reference path="./org.bukkit.plugin.java.JavaPlugin.ts" />
/// <reference path="./org.bukkit.plugin.java.JavaPluginLoader.ts" />
/// <reference path="./org.bukkit.plugin.messaging.ChannelNameTooLongException.ts" />
/// <reference path="./org.bukkit.plugin.messaging.ChannelNotRegisteredException.ts" />
/// <reference path="./org.bukkit.plugin.messaging.MessageTooLargeException.ts" />
/// <reference path="./org.bukkit.plugin.messaging.Messenger.ts" />
/// <reference path="./org.bukkit.plugin.messaging.PluginChannelDirection.ts" />
/// <reference path="./org.bukkit.plugin.messaging.PluginMessageListener.ts" />
/// <reference path="./org.bukkit.plugin.messaging.PluginMessageListenerRegistration.ts" />
/// <reference path="./org.bukkit.plugin.messaging.PluginMessageRecipient.ts" />
/// <reference path="./org.bukkit.plugin.messaging.ReservedChannelException.ts" />
/// <reference path="./org.bukkit.plugin.messaging.StandardMessenger.ts" />
/// <reference path="./org.bukkit.potion.Potion.ts" />
/// <reference path="./org.bukkit.potion.PotionBrewer.ts" />
/// <reference path="./org.bukkit.potion.PotionData.ts" />
/// <reference path="./org.bukkit.potion.PotionEffect.ts" />
/// <reference path="./org.bukkit.potion.PotionEffectType.ts" />
/// <reference path="./org.bukkit.potion.PotionEffectTypeWrapper.ts" />
/// <reference path="./org.bukkit.potion.PotionType.ts" />
/// <reference path="./org.bukkit.projectiles.BlockProjectileSource.ts" />
/// <reference path="./org.bukkit.projectiles.ProjectileSource.ts" />
/// <reference path="./org.bukkit.scheduler.BukkitRunnable.ts" />
/// <reference path="./org.bukkit.scheduler.BukkitScheduler.ts" />
/// <reference path="./org.bukkit.scheduler.BukkitTask.ts" />
/// <reference path="./org.bukkit.scheduler.BukkitWorker.ts" />
/// <reference path="./org.bukkit.scoreboard.Criterias.ts" />
/// <reference path="./org.bukkit.scoreboard.DisplaySlot.ts" />
/// <reference path="./org.bukkit.scoreboard.NameTagVisibility.ts" />
/// <reference path="./org.bukkit.scoreboard.Objective.ts" />
/// <reference path="./org.bukkit.scoreboard.RenderType.ts" />
/// <reference path="./org.bukkit.scoreboard.Score.ts" />
/// <reference path="./org.bukkit.scoreboard.Scoreboard.ts" />
/// <reference path="./org.bukkit.scoreboard.ScoreboardManager.ts" />
/// <reference path="./org.bukkit.scoreboard.Team.Option.ts" />
/// <reference path="./org.bukkit.scoreboard.Team.OptionStatus.ts" />
/// <reference path="./org.bukkit.scoreboard.Team.ts" />
/// <reference path="./org.bukkit.util.BlockIterator.ts" />
/// <reference path="./org.bukkit.util.BlockVector.ts" />
/// <reference path="./org.bukkit.util.BoundingBox.ts" />
/// <reference path="./org.bukkit.util.CachedServerIcon.ts" />
/// <reference path="./org.bukkit.util.ChatPaginator.ChatPage.ts" />
/// <reference path="./org.bukkit.util.ChatPaginator.ts" />
/// <reference path="./org.bukkit.util.Consumer.ts" />
/// <reference path="./org.bukkit.util.EulerAngle.ts" />
/// <reference path="./org.bukkit.util.FileUtil.ts" />
/// <reference path="./org.bukkit.util.NumberConversions.ts" />
/// <reference path="./org.bukkit.util.RayTraceResult.ts" />
/// <reference path="./org.bukkit.util.StringUtil.ts" />
/// <reference path="./org.bukkit.util.Vector.ts" />
/// <reference path="./org.bukkit.util.io.BukkitObjectInputStream.ts" />
/// <reference path="./org.bukkit.util.io.BukkitObjectOutputStream.ts" />
/// <reference path="./org.bukkit.util.noise.NoiseGenerator.ts" />
/// <reference path="./org.bukkit.util.noise.OctaveGenerator.ts" />
/// <reference path="./org.bukkit.util.noise.PerlinNoiseGenerator.ts" />
/// <reference path="./org.bukkit.util.noise.PerlinOctaveGenerator.ts" />
/// <reference path="./org.bukkit.util.noise.SimplexNoiseGenerator.ts" />
/// <reference path="./org.bukkit.util.noise.SimplexOctaveGenerator.ts" />
/// <reference path="./org.bukkit.util.permissions.BroadcastPermissions.ts" />
/// <reference path="./org.bukkit.util.permissions.CommandPermissions.ts" />
/// <reference path="./org.bukkit.util.permissions.DefaultPermissions.ts" />

View File

@@ -1,50 +0,0 @@
declare namespace org {
namespace bukkit {
class Achievement {
public static OPEN_INVENTORY: org.bukkit.Achievement;
public static MINE_WOOD: org.bukkit.Achievement;
public static BUILD_WORKBENCH: org.bukkit.Achievement;
public static BUILD_PICKAXE: org.bukkit.Achievement;
public static BUILD_FURNACE: org.bukkit.Achievement;
public static ACQUIRE_IRON: org.bukkit.Achievement;
public static BUILD_HOE: org.bukkit.Achievement;
public static MAKE_BREAD: org.bukkit.Achievement;
public static BAKE_CAKE: org.bukkit.Achievement;
public static BUILD_BETTER_PICKAXE: org.bukkit.Achievement;
public static COOK_FISH: org.bukkit.Achievement;
public static ON_A_RAIL: org.bukkit.Achievement;
public static BUILD_SWORD: org.bukkit.Achievement;
public static KILL_ENEMY: org.bukkit.Achievement;
public static KILL_COW: org.bukkit.Achievement;
public static FLY_PIG: org.bukkit.Achievement;
public static SNIPE_SKELETON: org.bukkit.Achievement;
public static GET_DIAMONDS: org.bukkit.Achievement;
public static NETHER_PORTAL: org.bukkit.Achievement;
public static GHAST_RETURN: org.bukkit.Achievement;
public static GET_BLAZE_ROD: org.bukkit.Achievement;
public static BREW_POTION: org.bukkit.Achievement;
public static END_PORTAL: org.bukkit.Achievement;
public static THE_END: org.bukkit.Achievement;
public static ENCHANTMENTS: org.bukkit.Achievement;
public static OVERKILL: org.bukkit.Achievement;
public static BOOKCASE: org.bukkit.Achievement;
public static EXPLORE_ALL_BIOMES: org.bukkit.Achievement;
public static SPAWN_WITHER: org.bukkit.Achievement;
public static KILL_WITHER: org.bukkit.Achievement;
public static FULL_BEACON: org.bukkit.Achievement;
public static BREED_COW: org.bukkit.Achievement;
public static DIAMONDS_TO_YOU: org.bukkit.Achievement;
public static OVERPOWERED: org.bukkit.Achievement;
public static values(): org.bukkit.Achievement[];
public static valueOf(name: string): org.bukkit.Achievement;
/**
* Returns whether or not this achievement has a parent achievement.
*/
public hasParent(): boolean;
/**
* Returns the parent achievement of this achievement, or null if none.
*/
public getParent(): org.bukkit.Achievement;
}
}
}

View File

@@ -1,57 +0,0 @@
declare namespace org {
namespace bukkit {
class Art {
public static KEBAB: org.bukkit.Art;
public static AZTEC: org.bukkit.Art;
public static ALBAN: org.bukkit.Art;
public static AZTEC2: org.bukkit.Art;
public static BOMB: org.bukkit.Art;
public static PLANT: org.bukkit.Art;
public static WASTELAND: org.bukkit.Art;
public static POOL: org.bukkit.Art;
public static COURBET: org.bukkit.Art;
public static SEA: org.bukkit.Art;
public static SUNSET: org.bukkit.Art;
public static CREEBET: org.bukkit.Art;
public static WANDERER: org.bukkit.Art;
public static GRAHAM: org.bukkit.Art;
public static MATCH: org.bukkit.Art;
public static BUST: org.bukkit.Art;
public static STAGE: org.bukkit.Art;
public static VOID: org.bukkit.Art;
public static SKULL_AND_ROSES: org.bukkit.Art;
public static WITHER: org.bukkit.Art;
public static FIGHTERS: org.bukkit.Art;
public static POINTER: org.bukkit.Art;
public static PIGSCENE: org.bukkit.Art;
public static BURNING_SKULL: org.bukkit.Art;
public static SKELETON: org.bukkit.Art;
public static DONKEY_KONG: org.bukkit.Art;
public static values(): org.bukkit.Art[];
public static valueOf(name: string): org.bukkit.Art;
/**
* Gets the width of the painting, in blocks
*/
public getBlockWidth(): number;
/**
* Gets the height of the painting, in blocks
*/
public getBlockHeight(): number;
/**
* Get the ID of this painting.
*/
public getId(): number;
public getKey(): org.bukkit.NamespacedKey;
/**
* Get a painting by its numeric ID
*/
public static getById(id: number): org.bukkit.Art;
/**
* Get a painting by its unique name
* <p>
* This ignores underscores and capitalization
*/
public static getByName(name: string): org.bukkit.Art;
}
}
}

View File

@@ -1,11 +0,0 @@
declare namespace org {
namespace bukkit {
class Axis {
public static X: org.bukkit.Axis;
public static Y: org.bukkit.Axis;
public static Z: org.bukkit.Axis;
public static values(): org.bukkit.Axis[];
public static valueOf(name: string): org.bukkit.Axis;
}
}
}

View File

@@ -1,57 +0,0 @@
declare namespace org {
namespace bukkit {
class BanEntry {
/**
* Gets the target involved. This may be in the form of an IP or a player
* name.
*/
public getTarget(): string;
/**
* Gets the date this ban entry was created.
*/
public getCreated(): any /*java.util.Date*/;
/**
* Sets the date this ban entry was created.
*/
public setCreated(created: any /*java.util.Date*/): void;
/**
* Gets the source of this ban.
* <p>
* Note: A source is considered any String, although this is generally a
* player name.
*/
public getSource(): string;
/**
* Sets the source of this ban.
* <p>
* Note: A source is considered any String, although this is generally a
* player name.
*/
public setSource(source: string): void;
/**
* Gets the date this ban expires on, or null for no defined end date.
*/
public getExpiration(): any /*java.util.Date*/;
/**
* Sets the date this ban expires on. Null values are considered
* "infinite" bans.
*/
public setExpiration(expiration: any /*java.util.Date*/): void;
/**
* Gets the reason for this ban.
*/
public getReason(): string;
/**
* Sets the reason for this ban. Reasons must not be null.
*/
public setReason(reason: string): void;
/**
* Saves the ban entry, overwriting any previous data in the ban list.
* <p>
* Saving the ban entry of an unbanned player will cause the player to be
* banned once again.
*/
public save(): void;
}
}
}

View File

@@ -1,12 +0,0 @@
declare namespace org {
namespace bukkit {
namespace BanList {
class Type {
public static NAME: org.bukkit.BanList.Type;
public static IP: org.bukkit.BanList.Type;
public static values(): org.bukkit.BanList.Type[];
public static valueOf(name: string): org.bukkit.BanList.Type;
}
}
}
}

View File

@@ -1,29 +0,0 @@
declare namespace org {
namespace bukkit {
class BanList {
/**
* Gets a {@link BanEntry} by target.
*/
public getBanEntry(target: string): org.bukkit.BanEntry;
/**
* Adds a ban to the this list. If a previous ban exists, this will
* update the previous entry.
*/
public addBan(target: string, reason: string, expires: any /*java.util.Date*/, source: string): org.bukkit.BanEntry;
/**
* Gets a set containing every {@link BanEntry} in this list.
*/
public getBanEntries(): any[] /*java.util.Set*/;
/**
* Gets if a {@link BanEntry} exists for the target, indicating an active
* ban status.
*/
public isBanned(target: string): boolean;
/**
* Removes the specified target from this list, therefore indicating a
* "not banned" status.
*/
public pardon(target: string): void;
}
}
}

View File

@@ -1,22 +0,0 @@
declare namespace org {
namespace bukkit {
class BlockChangeDelegate {
/**
* Set a block data at the specified coordinates.
*/
public setBlockData(x: number, y: number, z: number, blockData: org.bukkit.block.data.BlockData): boolean;
/**
* Get the block data at the location.
*/
public getBlockData(x: number, y: number, z: number): org.bukkit.block.data.BlockData;
/**
* Gets the height of the world.
*/
public getHeight(): number;
/**
* Checks if the specified block is empty (air) or not.
*/
public isEmpty(x: number, y: number, z: number): boolean;
}
}
}

View File

@@ -1,657 +0,0 @@
declare namespace org {
namespace bukkit {
class Bukkit {
/**
* Gets the current {@link Server} singleton
*/
public static getServer(): org.bukkit.Server;
/**
* Attempts to set the {@link Server} singleton.
* <p>
* This cannot be done if the Server is already set.
*/
public static setServer(server: org.bukkit.Server): void;
/**
* Gets the name of this server implementation.
*/
public static getName(): string;
/**
* Gets the version string of this server implementation.
*/
public static getVersion(): string;
/**
* Gets the Bukkit version that this server is running.
*/
public static getBukkitVersion(): string;
/**
* Gets a view of all currently logged in players. This {@linkplain
* Collections#unmodifiableCollection(Collection) view} is a reused
* object, making some operations like {@link Collection#size()}
* zero-allocation.
* <p>
* The collection is a view backed by the internal representation, such
* that, changes to the internal state of the server will be reflected
* immediately. However, the reuse of the returned collection (identity)
* is not strictly guaranteed for future or all implementations. Casting
* the collection, or relying on interface implementations (like {@link
* Serializable} or {@link List}), is deprecated.
* <p>
* Iteration behavior is undefined outside of self-contained main-thread
* uses. Normal and immediate iterator use without consequences that
* affect the collection are fully supported. The effects following
* (non-exhaustive) {@link Entity#teleport(Location) teleportation},
* {@link Player#setHealth(double) death}, and {@link Player#kickPlayer(
* String) kicking} are undefined. Any use of this collection from
* asynchronous threads is unsafe.
* <p>
* For safe consequential iteration or mimicking the old array behavior,
* using {@link Collection#toArray(Object[])} is recommended. For making
* snapshots, {@link ImmutableList#copyOf(Collection)} is recommended.
*/
public static getOnlinePlayers(): any[] /*java.util.Collection*/;
/**
* Get the maximum amount of players which can login to this server.
*/
public static getMaxPlayers(): number;
/**
* Get the game port that the server runs on.
*/
public static getPort(): number;
/**
* Get the view distance from this server.
*/
public static getViewDistance(): number;
/**
* Get the IP that this server is bound to, or empty string if not
* specified.
*/
public static getIp(): string;
/**
* Get world type (level-type setting) for default world.
*/
public static getWorldType(): string;
/**
* Get generate-structures setting.
*/
public static getGenerateStructures(): boolean;
/**
* Gets whether this server allows the End or not.
*/
public static getAllowEnd(): boolean;
/**
* Gets whether this server allows the Nether or not.
*/
public static getAllowNether(): boolean;
/**
* Gets whether this server has a whitelist or not.
*/
public static hasWhitelist(): boolean;
/**
* Sets if the server is whitelisted.
*/
public static setWhitelist(value: boolean): void;
/**
* Gets a list of whitelisted players.
*/
public static getWhitelistedPlayers(): any[] /*java.util.Set*/;
/**
* Reloads the whitelist from disk.
*/
public static reloadWhitelist(): void;
/**
* Broadcast a message to all players.
* <p>
* This is the same as calling {@link #broadcast(java.lang.String,
* java.lang.String)} to {@link Server#BROADCAST_CHANNEL_USERS}
*/
public static broadcastMessage(message: string): number;
/**
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
* <p>
* The update folder name is relative to the plugins folder.
*/
public static getUpdateFolder(): string;
/**
* Gets the update folder. The update folder is used to safely update
* plugins at the right moment on a plugin load.
*/
public static getUpdateFolderFile(): any;
/**
* Gets the value of the connection throttle setting.
*/
public static getConnectionThrottle(): number;
/**
* Gets default ticks per animal spawns value.
* <p>
* <b>Example Usage:</b>
* <ul>
* <li>A value of 1 will mean the server will attempt to spawn monsters
* every tick.
* <li>A value of 400 will mean the server will attempt to spawn monsters
* every 400th tick.
* <li>A value below 0 will be reset back to Minecraft's default.
* </ul>
* <p>
* <b>Note:</b> If set to 0, animal spawning will be disabled. We
* recommend using spawn-animals to control this instead.
* <p>
* Minecraft default: 400.
*/
public static getTicksPerAnimalSpawns(): number;
/**
* Gets the default ticks per monster spawns value.
* <p>
* <b>Example Usage:</b>
* <ul>
* <li>A value of 1 will mean the server will attempt to spawn monsters
* every tick.
* <li>A value of 400 will mean the server will attempt to spawn monsters
* every 400th tick.
* <li>A value below 0 will be reset back to Minecraft's default.
* </ul>
* <p>
* <b>Note:</b> If set to 0, monsters spawning will be disabled. We
* recommend using spawn-monsters to control this instead.
* <p>
* Minecraft default: 1.
*/
public static getTicksPerMonsterSpawns(): number;
/**
* Gets a player object by the given username.
* <p>
* This method may not return objects for offline players.
*/
public static getPlayer(name: string): org.bukkit.entity.Player;
/**
* Gets the player with the exact given name, case insensitive.
*/
public static getPlayerExact(name: string): org.bukkit.entity.Player;
/**
* Attempts to match any players with the given name, and returns a list
* of all possibly matches.
* <p>
* This list is not sorted in any particular order. If an exact match is
* found, the returned list will only contain a single result.
*/
public static matchPlayer(name: string): any[] /*java.util.List*/;
/**
* Gets the player with the given UUID.
*/
public static getPlayer(id: any): org.bukkit.entity.Player;
/**
* Gets the plugin manager for interfacing with plugins.
*/
public static getPluginManager(): org.bukkit.plugin.PluginManager;
/**
* Gets the scheduler for managing scheduled events.
*/
public static getScheduler(): org.bukkit.scheduler.BukkitScheduler;
/**
* Gets a services manager.
*/
public static getServicesManager(): org.bukkit.plugin.ServicesManager;
/**
* Gets a list of all worlds on this server.
*/
public static getWorlds(): any[] /*java.util.List*/;
/**
* Creates or loads a world with the given name using the specified
* options.
* <p>
* If the world is already loaded, it will just return the equivalent of
* getWorld(creator.name()).
*/
public static createWorld(creator: org.bukkit.WorldCreator): org.bukkit.World;
/**
* Unloads a world with the given name.
*/
public static unloadWorld(name: string, save: boolean): boolean;
/**
* Unloads the given world.
*/
public static unloadWorld(world: org.bukkit.World, save: boolean): boolean;
/**
* Gets the world with the given name.
*/
public static getWorld(name: string): org.bukkit.World;
/**
* Gets the world from the given Unique ID.
*/
public static getWorld(uid: any): org.bukkit.World;
/**
* Gets the map from the given item ID.
*/
public static getMap(id: number): org.bukkit.map.MapView;
/**
* Create a new map with an automatically assigned ID.
*/
public static createMap(world: org.bukkit.World): org.bukkit.map.MapView;
/**
* Create a new explorer map targeting the closest nearby structure of a
* given {@link StructureType}.
* <br>
* This method uses implementation default values for radius and
* findUnexplored (usually 100, true).
*/
public static createExplorerMap(world: org.bukkit.World, location: org.bukkit.Location, structureType: org.bukkit.StructureType): org.bukkit.inventory.ItemStack;
/**
* Create a new explorer map targeting the closest nearby structure of a
* given {@link StructureType}.
* <br>
* This method uses implementation default values for radius and
* findUnexplored (usually 100, true).
*/
public static createExplorerMap(world: org.bukkit.World, location: org.bukkit.Location, structureType: org.bukkit.StructureType, radius: number, findUnexplored: boolean): org.bukkit.inventory.ItemStack;
/**
* Reloads the server, refreshing settings and plugin information.
*/
public static reload(): void;
/**
* Reload only the Minecraft data for the server. This includes custom
* advancements and loot tables.
*/
public static reloadData(): void;
/**
* Returns the primary logger associated with this server instance.
*/
public static getLogger(): any;
/**
* Gets a {@link PluginCommand} with the given name or alias.
*/
public static getPluginCommand(name: string): org.bukkit.command.PluginCommand;
/**
* Writes loaded players to disk.
*/
public static savePlayers(): void;
/**
* Dispatches a command on this server, and executes it if found.
*/
public static dispatchCommand(sender: org.bukkit.command.CommandSender, commandLine: string): boolean;
/**
* Adds a recipe to the crafting manager.
*/
public static addRecipe(recipe: org.bukkit.inventory.Recipe): boolean;
/**
* Get a list of all recipes for a given item. The stack size is ignored
* in comparisons. If the durability is -1, it will match any data value.
*/
public static getRecipesFor(result: org.bukkit.inventory.ItemStack): any[] /*java.util.List*/;
/**
* Get an iterator through the list of crafting recipes.
*/
public static recipeIterator(): any;
/**
* Clears the list of crafting recipes.
*/
public static clearRecipes(): void;
/**
* Resets the list of crafting recipes to the default.
*/
public static resetRecipes(): void;
/**
* Gets a list of command aliases defined in the server properties.
*/
public static getCommandAliases(): Map<any, any> /*java.util.Map*/;
/**
* Gets the radius, in blocks, around each worlds spawn point to protect.
*/
public static getSpawnRadius(): number;
/**
* Sets the radius, in blocks, around each worlds spawn point to protect.
*/
public static setSpawnRadius(value: number): void;
/**
* Gets whether the Server is in online mode or not.
*/
public static getOnlineMode(): boolean;
/**
* Gets whether this server allows flying or not.
*/
public static getAllowFlight(): boolean;
/**
* Gets whether the server is in hardcore mode or not.
*/
public static isHardcore(): boolean;
/**
* Shutdowns the server, stopping everything.
*/
public static shutdown(): void;
/**
* Broadcasts the specified message to every user with the given
* permission name.
*/
public static broadcast(message: string, permission: string): number;
/**
* Gets the player by the given name, regardless if they are offline or
* online.
* <p>
* This method may involve a blocking web request to get the UUID for the
* given name.
* <p>
* This will return an object even if the player does not exist. To this
* method, all players will exist.
*/
public static getOfflinePlayer(name: string): org.bukkit.OfflinePlayer;
/**
* Gets the player by the given UUID, regardless if they are offline or
* online.
* <p>
* This will return an object even if the player does not exist. To this
* method, all players will exist.
*/
public static getOfflinePlayer(id: any): org.bukkit.OfflinePlayer;
/**
* Gets a set containing all current IPs that are banned.
*/
public static getIPBans(): any[] /*java.util.Set*/;
/**
* Bans the specified address from the server.
*/
public static banIP(address: string): void;
/**
* Unbans the specified address from the server.
*/
public static unbanIP(address: string): void;
/**
* Gets a set containing all banned players.
*/
public static getBannedPlayers(): any[] /*java.util.Set*/;
/**
* Gets a ban list for the supplied type.
* <p>
* Bans by name are no longer supported and this method will return
* null when trying to request them. The replacement is bans by UUID.
*/
public static getBanList(type: org.bukkit.BanList.Type): org.bukkit.BanList;
/**
* Gets a set containing all player operators.
*/
public static getOperators(): any[] /*java.util.Set*/;
/**
* Gets the default {@link GameMode} for new players.
*/
public static getDefaultGameMode(): org.bukkit.GameMode;
/**
* Sets the default {@link GameMode} for new players.
*/
public static setDefaultGameMode(mode: org.bukkit.GameMode): void;
/**
* Gets a {@link ConsoleCommandSender} that may be used as an input source
* for this server.
*/
public static getConsoleSender(): org.bukkit.command.ConsoleCommandSender;
/**
* Gets the folder that contains all of the various {@link World}s.
*/
public static getWorldContainer(): any;
/**
* Gets every player that has ever played on this server.
*/
public static getOfflinePlayers(): org.bukkit.OfflinePlayer[];
/**
* Gets the {@link Messenger} responsible for this server.
*/
public static getMessenger(): org.bukkit.plugin.messaging.Messenger;
/**
* Gets the {@link HelpMap} providing help topics for this server.
*/
public static getHelpMap(): org.bukkit.help.HelpMap;
/**
* Creates an empty inventory with the specified type. If the type
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
* otherwise the new inventory has the normal size for its type.
* <br>
* {@link InventoryType#WORKBENCH} will not process crafting recipes if
* created with this method. Use
* {@link Player#openWorkbench(Location, boolean)} instead.
* <br>
* {@link InventoryType#ENCHANTING} will not process {@link ItemStack}s
* for possible enchanting results. Use
* {@link Player#openEnchanting(Location, boolean)} instead.
*/
public static createInventory(owner: org.bukkit.inventory.InventoryHolder, type: org.bukkit.event.inventory.InventoryType): org.bukkit.inventory.Inventory;
/**
* Creates an empty inventory with the specified type and title. If the type
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
* otherwise the new inventory has the normal size for its type.<br>
* It should be noted that some inventory types do not support titles and
* may not render with said titles on the Minecraft client.
* <br>
* {@link InventoryType#WORKBENCH} will not process crafting recipes if
* created with this method. Use
* {@link Player#openWorkbench(Location, boolean)} instead.
* <br>
* {@link InventoryType#ENCHANTING} will not process {@link ItemStack}s
* for possible enchanting results. Use
* {@link Player#openEnchanting(Location, boolean)} instead.
*/
public static createInventory(owner: org.bukkit.inventory.InventoryHolder, type: org.bukkit.event.inventory.InventoryType, title: string): org.bukkit.inventory.Inventory;
/**
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
* specified size.
*/
public static createInventory(owner: org.bukkit.inventory.InventoryHolder, size: number): org.bukkit.inventory.Inventory;
/**
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
* specified size and title.
*/
public static createInventory(owner: org.bukkit.inventory.InventoryHolder, size: number, title: string): org.bukkit.inventory.Inventory;
/**
* Creates an empty merchant.
*/
public static createMerchant(title: string): org.bukkit.inventory.Merchant;
/**
* Gets user-specified limit for number of monsters that can spawn in a
* chunk.
*/
public static getMonsterSpawnLimit(): number;
/**
* Gets user-specified limit for number of animals that can spawn in a
* chunk.
*/
public static getAnimalSpawnLimit(): number;
/**
* Gets user-specified limit for number of water animals that can spawn in
* a chunk.
*/
public static getWaterAnimalSpawnLimit(): number;
/**
* Gets user-specified limit for number of ambient mobs that can spawn in
* a chunk.
*/
public static getAmbientSpawnLimit(): number;
/**
* Checks the current thread against the expected primary thread for the
* server.
* <p>
* <b>Note:</b> this method should not be used to indicate the current
* synchronized state of the runtime. A current thread matching the main
* thread indicates that it is synchronized, but a mismatch <b>does not
* preclude</b> the same assumption.
*/
public static isPrimaryThread(): boolean;
/**
* Gets the message that is displayed on the server list.
*/
public static getMotd(): string;
/**
* Gets the default message that is displayed when the server is stopped.
*/
public static getShutdownMessage(): string;
/**
* Gets the current warning state for the server.
*/
public static getWarningState(): org.bukkit.Warning.WarningState;
/**
* Gets the instance of the item factory (for {@link ItemMeta}).
*/
public static getItemFactory(): org.bukkit.inventory.ItemFactory;
/**
* Gets the instance of the scoreboard manager.
* <p>
* This will only exist after the first world has loaded.
*/
public static getScoreboardManager(): org.bukkit.scoreboard.ScoreboardManager;
/**
* Gets an instance of the server's default server-icon.
*/
public static getServerIcon(): org.bukkit.util.CachedServerIcon;
/**
* Loads an image from a file, and returns a cached image for the specific
* server-icon.
* <p>
* Size and type are implementation defined. An incompatible file is
* guaranteed to throw an implementation-defined {@link Exception}.
*/
public static loadServerIcon(file: any): org.bukkit.util.CachedServerIcon;
/**
* Creates a cached server-icon for the specific image.
* <p>
* Size and type are implementation defined. An incompatible file is
* guaranteed to throw an implementation-defined {@link Exception}.
*/
public static loadServerIcon(image: any): org.bukkit.util.CachedServerIcon;
/**
* Set the idle kick timeout. Any players idle for the specified amount of
* time will be automatically kicked.
* <p>
* A value of 0 will disable the idle kick timeout.
*/
public static setIdleTimeout(threshold: number): void;
/**
* Gets the idle kick timeout.
*/
public static getIdleTimeout(): number;
/**
* Create a ChunkData for use in a generator.
* See {@link ChunkGenerator#generateChunkData(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)}
*/
public static createChunkData(world: org.bukkit.World): org.bukkit.generator.ChunkGenerator.ChunkData;
/**
* Creates a boss bar instance to display to players. The progress
* defaults to 1.0
*/
public static createBossBar(title: string, color: org.bukkit.boss.BarColor, style: org.bukkit.boss.BarStyle, flags: org.bukkit.boss.BarFlag): org.bukkit.boss.BossBar;
/**
* Creates a boss bar instance to display to players. The progress defaults
* to 1.0.
* <br>
* This instance is added to the persistent storage of the server and will
* be editable by commands and restored after restart.
*/
public static createBossBar(key: org.bukkit.NamespacedKey, title: string, color: org.bukkit.boss.BarColor, style: org.bukkit.boss.BarStyle, flags: org.bukkit.boss.BarFlag): org.bukkit.boss.KeyedBossBar;
/**
* Gets an unmodifiable iterator through all persistent bossbars.
* <ul>
* <li><b>not</b> bound to a {@link org.bukkit.entity.Boss}</li>
* <li>
* <b>not</b> created using
* {@link #createBossBar(String, BarColor, BarStyle, BarFlag...)}
* </li>
* </ul>
* e.g. bossbars created using the bossbar command
*/
public static getBossBars(): any;
/**
* Gets the {@link KeyedBossBar} specified by this key.
* <ul>
* <li><b>not</b> bound to a {@link org.bukkit.entity.Boss}</li>
* <li>
* <b>not</b> created using
* {@link #createBossBar(String, BarColor, BarStyle, BarFlag...)}
* </li>
* </ul>
* e.g. bossbars created using the bossbar command
*/
public static getBossBar(key: org.bukkit.NamespacedKey): org.bukkit.boss.KeyedBossBar;
/**
* Removes a {@link KeyedBossBar} specified by this key.
* <ul>
* <li><b>not</b> bound to a {@link org.bukkit.entity.Boss}</li>
* <li>
* <b>not</b> created using
* {@link #createBossBar(String, BarColor, BarStyle, BarFlag...)}
* </li>
* </ul>
* e.g. bossbars created using the bossbar command
*/
public static removeBossBar(key: org.bukkit.NamespacedKey): boolean;
/**
* Gets an entity on the server by its UUID
*/
public static getEntity(uuid: any): org.bukkit.entity.Entity;
/**
* Get the advancement specified by this key.
*/
public static getAdvancement(key: org.bukkit.NamespacedKey): org.bukkit.advancement.Advancement;
/**
* Get an iterator through all advancements. Advancements cannot be removed
* from this iterator,
*/
public static advancementIterator(): any;
/**
* Creates a new {@link BlockData} instance for the specified Material, with
* all properties initialized to unspecified defaults.
*/
public static createBlockData(material: org.bukkit.Material): org.bukkit.block.data.BlockData;
/**
* Creates a new {@link BlockData} instance for the specified Material, with
* all properties initialized to unspecified defaults.
*/
public static createBlockData(material: org.bukkit.Material, consumer: any): org.bukkit.block.data.BlockData;
/**
* Creates a new {@link BlockData} instance with material and properties
* parsed from provided data.
*/
public static createBlockData(data: string): org.bukkit.block.data.BlockData;
/**
* Creates a new {@link BlockData} instance for the specified Material, with
* all properties initialized to unspecified defaults, except for those
* provided in data.
*/
public static createBlockData(material: org.bukkit.Material, data: string): org.bukkit.block.data.BlockData;
/**
* Gets a tag which has already been defined within the server. Plugins are
* suggested to use the concrete tags in {@link Tag} rather than this method
* which makes no guarantees about which tags are available, and may also be
* less performant due to lack of caching.
* <br>
* Tags will be searched for in an implementation specific manner, but a
* path consisting of namespace/tags/registry/key is expected.
* <br>
* Server implementations are allowed to handle only the registries
* indicated in {@link Tag}.
*/
public static getTag(registry: string, tag: org.bukkit.NamespacedKey, clazz: any): org.bukkit.Tag;
/**
* Gets a all tags which have been defined within the server.
* <br>
* Server implementations are allowed to handle only the registries
* indicated in {@link Tag}.
* <br>
* No guarantees are made about the mutability of the returned iterator.
*/
public static getTags(registry: string, clazz: any): any;
/**
* Gets the specified {@link LootTable}.
*/
public static getLootTable(key: org.bukkit.NamespacedKey): org.bukkit.loot.LootTable;
/**
* Selects entities using the given Vanilla selector.
* <br>
* No guarantees are made about the selector format, other than they match
* the Vanilla format for the active Minecraft version.
* <br>
* Usually a selector will start with '@', unless selecting a Player in
* which case it may simply be the Player's name or UUID.
* <br>
* Note that in Vanilla, elevated permissions are usually required to use
* '@' selectors, but this method should not check such permissions from the
* sender.
*/
public static selectEntities(sender: org.bukkit.command.CommandSender, selector: string): any[] /*java.util.List*/;
public static getUnsafe(): org.bukkit.UnsafeValues;
}
}
}

View File

@@ -1,67 +0,0 @@
declare namespace org {
namespace bukkit {
class ChatColor {
public static BLACK: org.bukkit.ChatColor;
public static DARK_BLUE: org.bukkit.ChatColor;
public static DARK_GREEN: org.bukkit.ChatColor;
public static DARK_AQUA: org.bukkit.ChatColor;
public static DARK_RED: org.bukkit.ChatColor;
public static DARK_PURPLE: org.bukkit.ChatColor;
public static GOLD: org.bukkit.ChatColor;
public static GRAY: org.bukkit.ChatColor;
public static DARK_GRAY: org.bukkit.ChatColor;
public static BLUE: org.bukkit.ChatColor;
public static GREEN: org.bukkit.ChatColor;
public static AQUA: org.bukkit.ChatColor;
public static RED: org.bukkit.ChatColor;
public static LIGHT_PURPLE: org.bukkit.ChatColor;
public static YELLOW: org.bukkit.ChatColor;
public static WHITE: org.bukkit.ChatColor;
public static MAGIC: org.bukkit.ChatColor;
public static BOLD: org.bukkit.ChatColor;
public static STRIKETHROUGH: org.bukkit.ChatColor;
public static UNDERLINE: org.bukkit.ChatColor;
public static ITALIC: org.bukkit.ChatColor;
public static RESET: org.bukkit.ChatColor;
public static COLOR_CHAR: string;
public static values(): org.bukkit.ChatColor[];
public static valueOf(name: string): org.bukkit.ChatColor;
/**
* Gets the char value associated with this color
*/
public getChar(): string;
public toString(): string;
/**
* Checks if this code is a format code as opposed to a color code.
*/
public isFormat(): boolean;
/**
* Checks if this code is a color code as opposed to a format code.
*/
public isColor(): boolean;
/**
* Gets the color represented by the specified color code
*/
public static getByChar(code: string): org.bukkit.ChatColor;
/**
* Gets the color represented by the specified color code
*/
public static getByChar(code: string): org.bukkit.ChatColor;
/**
* Strips the given message of all color codes
*/
public static stripColor(input: string): string;
/**
* Translates a string using an alternate color code character into a
* string that uses the internal ChatColor.COLOR_CODE color code
* character. The alternate color code character will only be replaced if
* it is immediately followed by 0-9, A-F, a-f, K-O, k-o, R or r.
*/
public static translateAlternateColorCodes(altColorChar: string, textToTranslate: string): string;
/**
* Gets the ChatColors used at the end of the given input string.
*/
public static getLastColors(input: string): string;
}
}
}

View File

@@ -1,106 +0,0 @@
declare namespace org {
namespace bukkit {
class Chunk {
/**
* Gets the X-coordinate of this chunk
*/
public getX(): number;
/**
* Gets the Z-coordinate of this chunk
*/
public getZ(): number;
/**
* Gets the world containing this chunk
*/
public getWorld(): org.bukkit.World;
/**
* Gets a block from this chunk
*/
public getBlock(x: number, y: number, z: number): org.bukkit.block.Block;
/**
* Capture thread-safe read-only snapshot of chunk data
*/
public getChunkSnapshot(): org.bukkit.ChunkSnapshot;
/**
* Capture thread-safe read-only snapshot of chunk data
*/
public getChunkSnapshot(includeMaxblocky: boolean, includeBiome: boolean, includeBiomeTempRain: boolean): org.bukkit.ChunkSnapshot;
/**
* Get a list of all entities in the chunk.
*/
public getEntities(): org.bukkit.entity.Entity[];
/**
* Get a list of all tile entities in the chunk.
*/
public getTileEntities(): org.bukkit.block.BlockState[];
/**
* Checks if the chunk is loaded.
*/
public isLoaded(): boolean;
/**
* Loads the chunk.
*/
public load(generate: boolean): boolean;
/**
* Loads the chunk.
*/
public load(): boolean;
/**
* Unloads and optionally saves the Chunk
*/
public unload(save: boolean): boolean;
/**
* Unloads and optionally saves the Chunk
*/
public unload(): boolean;
/**
* Checks if this chunk can spawn slimes without being a swamp biome.
*/
public isSlimeChunk(): boolean;
/**
* Gets whether the chunk at the specified chunk coordinates is force
* loaded.
* <p>
* A force loaded chunk will not be unloaded due to lack of player activity.
*/
public isForceLoaded(): boolean;
/**
* Sets whether the chunk at the specified chunk coordinates is force
* loaded.
* <p>
* A force loaded chunk will not be unloaded due to lack of player activity.
*/
public setForceLoaded(forced: boolean): void;
/**
* Adds a plugin ticket for this chunk, loading this chunk if it is not
* already loaded.
* <p>
* A plugin ticket will prevent a chunk from unloading until it is
* explicitly removed. A plugin instance may only have one ticket per chunk,
* but each chunk can have multiple plugin tickets.
* </p>
*/
public addPluginChunkTicket(plugin: org.bukkit.plugin.Plugin): boolean;
/**
* Removes the specified plugin's ticket for this chunk
* <p>
* A plugin ticket will prevent a chunk from unloading until it is
* explicitly removed. A plugin instance may only have one ticket per chunk,
* but each chunk can have multiple plugin tickets.
* </p>
*/
public removePluginChunkTicket(plugin: org.bukkit.plugin.Plugin): boolean;
/**
* Retrieves a collection specifying which plugins have tickets for this
* chunk. This collection is not updated when plugin tickets are added or
* removed to this chunk.
* <p>
* A plugin ticket will prevent a chunk from unloading until it is
* explicitly removed. A plugin instance may only have one ticket per chunk,
* but each chunk can have multiple plugin tickets.
* </p>
*/
public getPluginChunkTickets(): any[] /*java.util.Collection*/;
}
}
}

View File

@@ -1,59 +0,0 @@
declare namespace org {
namespace bukkit {
class ChunkSnapshot {
/**
* Gets the X-coordinate of this chunk
*/
public getX(): number;
/**
* Gets the Z-coordinate of this chunk
*/
public getZ(): number;
/**
* Gets name of the world containing this chunk
*/
public getWorldName(): string;
/**
* Get block type for block at corresponding coordinate in the chunk
*/
public getBlockType(x: number, y: number, z: number): org.bukkit.Material;
/**
* Get block data for block at corresponding coordinate in the chunk
*/
public getBlockData(x: number, y: number, z: number): org.bukkit.block.data.BlockData;
/**
* Get block data for block at corresponding coordinate in the chunk
*/
public getData(x: number, y: number, z: number): number;
/**
* Get sky light level for block at corresponding coordinate in the chunk
*/
public getBlockSkyLight(x: number, y: number, z: number): number;
/**
* Get light level emitted by block at corresponding coordinate in the
* chunk
*/
public getBlockEmittedLight(x: number, y: number, z: number): number;
/**
* Gets the highest non-air coordinate at the given coordinates
*/
public getHighestBlockYAt(x: number, z: number): number;
/**
* Get biome at given coordinates
*/
public getBiome(x: number, z: number): org.bukkit.block.Biome;
/**
* Get raw biome temperature (0.0-1.0) at given coordinate
*/
public getRawBiomeTemperature(x: number, z: number): number;
/**
* Get world full time when chunk snapshot was captured
*/
public getCaptureFullTime(): number;
/**
* Test if section is empty
*/
public isSectionEmpty(sy: number): boolean;
}
}
}

View File

@@ -1,18 +0,0 @@
declare namespace org {
namespace bukkit {
class CoalType {
public static COAL: org.bukkit.CoalType;
public static CHARCOAL: org.bukkit.CoalType;
public static values(): org.bukkit.CoalType[];
public static valueOf(name: string): org.bukkit.CoalType;
/**
* Gets the associated data value representing this type of coal
*/
public getData(): number;
/**
* Gets the type of coal with the given data value
*/
public static getByData(data: number): org.bukkit.CoalType;
}
}
}

View File

@@ -1,82 +0,0 @@
declare namespace org {
namespace bukkit {
class Color {
public static WHITE: org.bukkit.Color;
public static SILVER: org.bukkit.Color;
public static GRAY: org.bukkit.Color;
public static BLACK: org.bukkit.Color;
public static RED: org.bukkit.Color;
public static MAROON: org.bukkit.Color;
public static YELLOW: org.bukkit.Color;
public static OLIVE: org.bukkit.Color;
public static LIME: org.bukkit.Color;
public static GREEN: org.bukkit.Color;
public static AQUA: org.bukkit.Color;
public static TEAL: org.bukkit.Color;
public static BLUE: org.bukkit.Color;
public static NAVY: org.bukkit.Color;
public static FUCHSIA: org.bukkit.Color;
public static PURPLE: org.bukkit.Color;
public static ORANGE: org.bukkit.Color;
/**
* Creates a new Color object from a red, green, and blue
*/
public static fromRGB(red: number, green: number, blue: number): org.bukkit.Color;
/**
* Creates a new Color object from a blue, green, and red
*/
public static fromBGR(blue: number, green: number, red: number): org.bukkit.Color;
/**
* Creates a new color object from an integer that contains the red,
* green, and blue bytes in the lowest order 24 bits.
*/
public static fromRGB(rgb: number): org.bukkit.Color;
/**
* Creates a new color object from an integer that contains the blue,
* green, and red bytes in the lowest order 24 bits.
*/
public static fromBGR(bgr: number): org.bukkit.Color;
/**
* Gets the red component
*/
public getRed(): number;
/**
* Creates a new Color object with specified component
*/
public setRed(red: number): org.bukkit.Color;
/**
* Gets the green component
*/
public getGreen(): number;
/**
* Creates a new Color object with specified component
*/
public setGreen(green: number): org.bukkit.Color;
/**
* Gets the blue component
*/
public getBlue(): number;
/**
* Creates a new Color object with specified component
*/
public setBlue(blue: number): org.bukkit.Color;
public asRGB(): number;
public asBGR(): number;
/**
* Creates a new color with its RGB components changed as if it was dyed
* with the colors passed in, replicating vanilla workbench dyeing
*/
public mixDyes(colors: org.bukkit.DyeColor): org.bukkit.Color;
/**
* Creates a new color with its RGB components changed as if it was dyed
* with the colors passed in, replicating vanilla workbench dyeing
*/
public mixColors(colors: org.bukkit.Color): org.bukkit.Color;
public equals(o: any): boolean;
public hashCode(): number;
public serialize(): Map<any, any> /*java.util.Map*/;
public static deserialize(map: Map<any, any> /*java.util.Map*/): org.bukkit.Color;
public toString(): string;
}
}
}

View File

@@ -1,24 +0,0 @@
declare namespace org {
namespace bukkit {
class CropState {
public static SEEDED: org.bukkit.CropState;
public static GERMINATED: org.bukkit.CropState;
public static VERY_SMALL: org.bukkit.CropState;
public static SMALL: org.bukkit.CropState;
public static MEDIUM: org.bukkit.CropState;
public static TALL: org.bukkit.CropState;
public static VERY_TALL: org.bukkit.CropState;
public static RIPE: org.bukkit.CropState;
public static values(): org.bukkit.CropState[];
public static valueOf(name: string): org.bukkit.CropState;
/**
* Gets the associated data value representing this growth state
*/
public getData(): number;
/**
* Gets the CropState with the given data value
*/
public static getByData(data: number): org.bukkit.CropState;
}
}
}

View File

@@ -1,20 +0,0 @@
declare namespace org {
namespace bukkit {
class Difficulty {
public static PEACEFUL: org.bukkit.Difficulty;
public static EASY: org.bukkit.Difficulty;
public static NORMAL: org.bukkit.Difficulty;
public static HARD: org.bukkit.Difficulty;
public static values(): org.bukkit.Difficulty[];
public static valueOf(name: string): org.bukkit.Difficulty;
/**
* Gets the difficulty value associated with this Difficulty.
*/
public getValue(): number;
/**
* Gets the Difficulty represented by the specified value
*/
public static getByValue(value: number): org.bukkit.Difficulty;
}
}
}

View File

@@ -1,60 +0,0 @@
declare namespace org {
namespace bukkit {
class DyeColor {
public static WHITE: org.bukkit.DyeColor;
public static ORANGE: org.bukkit.DyeColor;
public static MAGENTA: org.bukkit.DyeColor;
public static LIGHT_BLUE: org.bukkit.DyeColor;
public static YELLOW: org.bukkit.DyeColor;
public static LIME: org.bukkit.DyeColor;
public static PINK: org.bukkit.DyeColor;
public static GRAY: org.bukkit.DyeColor;
public static LIGHT_GRAY: org.bukkit.DyeColor;
public static CYAN: org.bukkit.DyeColor;
public static PURPLE: org.bukkit.DyeColor;
public static BLUE: org.bukkit.DyeColor;
public static BROWN: org.bukkit.DyeColor;
public static GREEN: org.bukkit.DyeColor;
public static RED: org.bukkit.DyeColor;
public static BLACK: org.bukkit.DyeColor;
public static values(): org.bukkit.DyeColor[];
public static valueOf(name: string): org.bukkit.DyeColor;
/**
* Gets the associated wool data value representing this color.
*/
public getWoolData(): number;
/**
* Gets the associated dye data value representing this color.
*/
public getDyeData(): number;
/**
* Gets the color that this dye represents.
*/
public getColor(): org.bukkit.Color;
/**
* Gets the firework color that this dye represents.
*/
public getFireworkColor(): org.bukkit.Color;
/**
* Gets the DyeColor with the given wool data value.
*/
public static getByWoolData(data: number): org.bukkit.DyeColor;
/**
* Gets the DyeColor with the given dye data value.
*/
public static getByDyeData(data: number): org.bukkit.DyeColor;
/**
* Gets the DyeColor with the given color value.
*/
public static getByColor(color: org.bukkit.Color): org.bukkit.DyeColor;
/**
* Gets the DyeColor with the given firework color value.
*/
public static getByFireworkColor(color: org.bukkit.Color): org.bukkit.DyeColor;
/**
* Gets the DyeColor for the given name, possibly doing legacy transformations.
*/
public static legacyValueOf(name: string): org.bukkit.DyeColor;
}
}
}

View File

@@ -1,12 +0,0 @@
declare namespace org {
namespace bukkit {
namespace Effect {
class Type {
public static SOUND: org.bukkit.Effect.Type;
public static VISUAL: org.bukkit.Effect.Type;
public static values(): org.bukkit.Effect.Type[];
public static valueOf(name: string): org.bukkit.Effect.Type;
}
}
}
}

View File

@@ -1,63 +0,0 @@
declare namespace org {
namespace bukkit {
class Effect {
public static CLICK2: org.bukkit.Effect;
public static CLICK1: org.bukkit.Effect;
public static BOW_FIRE: org.bukkit.Effect;
public static DOOR_TOGGLE: org.bukkit.Effect;
public static IRON_DOOR_TOGGLE: org.bukkit.Effect;
public static TRAPDOOR_TOGGLE: org.bukkit.Effect;
public static IRON_TRAPDOOR_TOGGLE: org.bukkit.Effect;
public static FENCE_GATE_TOGGLE: org.bukkit.Effect;
public static DOOR_CLOSE: org.bukkit.Effect;
public static IRON_DOOR_CLOSE: org.bukkit.Effect;
public static TRAPDOOR_CLOSE: org.bukkit.Effect;
public static IRON_TRAPDOOR_CLOSE: org.bukkit.Effect;
public static FENCE_GATE_CLOSE: org.bukkit.Effect;
public static EXTINGUISH: org.bukkit.Effect;
public static RECORD_PLAY: org.bukkit.Effect;
public static GHAST_SHRIEK: org.bukkit.Effect;
public static GHAST_SHOOT: org.bukkit.Effect;
public static BLAZE_SHOOT: org.bukkit.Effect;
public static ZOMBIE_CHEW_WOODEN_DOOR: org.bukkit.Effect;
public static ZOMBIE_CHEW_IRON_DOOR: org.bukkit.Effect;
public static ZOMBIE_DESTROY_DOOR: org.bukkit.Effect;
public static SMOKE: org.bukkit.Effect;
public static STEP_SOUND: org.bukkit.Effect;
public static POTION_BREAK: org.bukkit.Effect;
public static ENDER_SIGNAL: org.bukkit.Effect;
public static MOBSPAWNER_FLAMES: org.bukkit.Effect;
public static BREWING_STAND_BREW: org.bukkit.Effect;
public static CHORUS_FLOWER_GROW: org.bukkit.Effect;
public static CHORUS_FLOWER_DEATH: org.bukkit.Effect;
public static PORTAL_TRAVEL: org.bukkit.Effect;
public static ENDEREYE_LAUNCH: org.bukkit.Effect;
public static FIREWORK_SHOOT: org.bukkit.Effect;
public static VILLAGER_PLANT_GROW: org.bukkit.Effect;
public static DRAGON_BREATH: org.bukkit.Effect;
public static ANVIL_BREAK: org.bukkit.Effect;
public static ANVIL_USE: org.bukkit.Effect;
public static ANVIL_LAND: org.bukkit.Effect;
public static ENDERDRAGON_SHOOT: org.bukkit.Effect;
public static WITHER_BREAK_BLOCK: org.bukkit.Effect;
public static WITHER_SHOOT: org.bukkit.Effect;
public static ZOMBIE_INFECT: org.bukkit.Effect;
public static ZOMBIE_CONVERTED_VILLAGER: org.bukkit.Effect;
public static BAT_TAKEOFF: org.bukkit.Effect;
public static END_GATEWAY_SPAWN: org.bukkit.Effect;
public static ENDERDRAGON_GROWL: org.bukkit.Effect;
public static values(): org.bukkit.Effect[];
public static valueOf(name: string): org.bukkit.Effect;
/**
* Gets the ID for this effect.
*/
public getId(): number;
public getType(): org.bukkit.Effect.Type;
public getData(): any;
/**
* Gets the Effect associated with the given ID.
*/
public static getById(id: number): org.bukkit.Effect;
}
}
}

View File

@@ -1,47 +0,0 @@
declare namespace org {
namespace bukkit {
class EntityEffect {
public static ARROW_PARTICLES: org.bukkit.EntityEffect;
public static RABBIT_JUMP: org.bukkit.EntityEffect;
public static HURT: org.bukkit.EntityEffect;
public static DEATH: org.bukkit.EntityEffect;
public static WOLF_SMOKE: org.bukkit.EntityEffect;
public static WOLF_HEARTS: org.bukkit.EntityEffect;
public static WOLF_SHAKE: org.bukkit.EntityEffect;
public static SHEEP_EAT: org.bukkit.EntityEffect;
public static IRON_GOLEM_ROSE: org.bukkit.EntityEffect;
public static VILLAGER_HEART: org.bukkit.EntityEffect;
public static VILLAGER_ANGRY: org.bukkit.EntityEffect;
public static VILLAGER_HAPPY: org.bukkit.EntityEffect;
public static WITCH_MAGIC: org.bukkit.EntityEffect;
public static ZOMBIE_TRANSFORM: org.bukkit.EntityEffect;
public static FIREWORK_EXPLODE: org.bukkit.EntityEffect;
public static LOVE_HEARTS: org.bukkit.EntityEffect;
public static SQUID_ROTATE: org.bukkit.EntityEffect;
public static ENTITY_POOF: org.bukkit.EntityEffect;
public static GUARDIAN_TARGET: org.bukkit.EntityEffect;
public static SHIELD_BLOCK: org.bukkit.EntityEffect;
public static SHIELD_BREAK: org.bukkit.EntityEffect;
public static ARMOR_STAND_HIT: org.bukkit.EntityEffect;
public static THORNS_HURT: org.bukkit.EntityEffect;
public static IRON_GOLEM_SHEATH: org.bukkit.EntityEffect;
public static TOTEM_RESURRECT: org.bukkit.EntityEffect;
public static HURT_DROWN: org.bukkit.EntityEffect;
public static HURT_EXPLOSION: org.bukkit.EntityEffect;
public static values(): org.bukkit.EntityEffect[];
public static valueOf(name: string): org.bukkit.EntityEffect;
/**
* Gets the data value of this EntityEffect
*/
public getData(): number;
/**
* Gets entity superclass which this affect is applicable to.
*/
public getApplicable(): any;
/**
* Gets the EntityEffect with the given data value
*/
public static getByData(data: number): org.bukkit.EntityEffect;
}
}
}

View File

@@ -1,59 +0,0 @@
declare namespace org {
namespace bukkit {
namespace FireworkEffect {
class Builder {
/**
* Specify the type of the firework effect.
*/
public with(type: org.bukkit.FireworkEffect.Type): org.bukkit.FireworkEffect.Builder;
/**
* Add a flicker to the firework effect.
*/
public withFlicker(): org.bukkit.FireworkEffect.Builder;
/**
* Set whether the firework effect should flicker.
*/
public flicker(flicker: boolean): org.bukkit.FireworkEffect.Builder;
/**
* Add a trail to the firework effect.
*/
public withTrail(): org.bukkit.FireworkEffect.Builder;
/**
* Set whether the firework effect should have a trail.
*/
public trail(trail: boolean): org.bukkit.FireworkEffect.Builder;
/**
* Add a primary color to the firework effect.
*/
public withColor(color: org.bukkit.Color): org.bukkit.FireworkEffect.Builder;
/**
* Add several primary colors to the firework effect.
*/
public withColor(colors: org.bukkit.Color): org.bukkit.FireworkEffect.Builder;
/**
* Add several primary colors to the firework effect.
*/
public withColor(colors: any): org.bukkit.FireworkEffect.Builder;
/**
* Add a fade color to the firework effect.
*/
public withFade(color: org.bukkit.Color): org.bukkit.FireworkEffect.Builder;
/**
* Add several fade colors to the firework effect.
*/
public withFade(colors: org.bukkit.Color): org.bukkit.FireworkEffect.Builder;
/**
* Add several fade colors to the firework effect.
*/
public withFade(colors: any): org.bukkit.FireworkEffect.Builder;
/**
* Create a {@link FireworkEffect} from the current contents of this
* builder.
* <p>
* To successfully build, you must have specified at least one color.
*/
public build(): org.bukkit.FireworkEffect;
}
}
}
}

View File

@@ -1,15 +0,0 @@
declare namespace org {
namespace bukkit {
namespace FireworkEffect {
class Type {
public static BALL: org.bukkit.FireworkEffect.Type;
public static BALL_LARGE: org.bukkit.FireworkEffect.Type;
public static STAR: org.bukkit.FireworkEffect.Type;
public static BURST: org.bukkit.FireworkEffect.Type;
public static CREEPER: org.bukkit.FireworkEffect.Type;
public static values(): org.bukkit.FireworkEffect.Type[];
public static valueOf(name: string): org.bukkit.FireworkEffect.Type;
}
}
}
}

View File

@@ -1,35 +0,0 @@
declare namespace org {
namespace bukkit {
class FireworkEffect {
/**
* Construct a firework effect.
*/
public static builder(): org.bukkit.FireworkEffect.Builder;
/**
* Get whether the firework effect flickers.
*/
public hasFlicker(): boolean;
/**
* Get whether the firework effect has a trail.
*/
public hasTrail(): boolean;
/**
* Get the primary colors of the firework effect.
*/
public getColors(): any[] /*java.util.List*/;
/**
* Get the fade colors of the firework effect.
*/
public getFadeColors(): any[] /*java.util.List*/;
/**
* Get the type of the firework effect.
*/
public getType(): org.bukkit.FireworkEffect.Type;
public static deserialize(map: Map<any, any> /*java.util.Map*/): org.bukkit.configuration.serialization.ConfigurationSerializable;
public serialize(): Map<any, any> /*java.util.Map*/;
public toString(): string;
public hashCode(): number;
public equals(obj: any): boolean;
}
}
}

View File

@@ -1,11 +0,0 @@
declare namespace org {
namespace bukkit {
class FluidCollisionMode {
public static NEVER: org.bukkit.FluidCollisionMode;
public static SOURCE_ONLY: org.bukkit.FluidCollisionMode;
public static ALWAYS: org.bukkit.FluidCollisionMode;
public static values(): org.bukkit.FluidCollisionMode[];
public static valueOf(name: string): org.bukkit.FluidCollisionMode;
}
}
}

View File

@@ -1,20 +0,0 @@
declare namespace org {
namespace bukkit {
class GameMode {
public static CREATIVE: org.bukkit.GameMode;
public static SURVIVAL: org.bukkit.GameMode;
public static ADVENTURE: org.bukkit.GameMode;
public static SPECTATOR: org.bukkit.GameMode;
public static values(): org.bukkit.GameMode[];
public static valueOf(name: string): org.bukkit.GameMode;
/**
* Gets the mode value associated with this GameMode
*/
public getValue(): number;
/**
* Gets the GameMode represented by the specified value
*/
public static getByValue(value: number): org.bukkit.GameMode;
}
}
}

View File

@@ -1,48 +0,0 @@
declare namespace org {
namespace bukkit {
class GameRule {
public static ANNOUNCE_ADVANCEMENTS: org.bukkit.GameRule;
public static COMMAND_BLOCK_OUTPUT: org.bukkit.GameRule;
public static DISABLE_ELYTRA_MOVEMENT_CHECK: org.bukkit.GameRule;
public static DO_DAYLIGHT_CYCLE: org.bukkit.GameRule;
public static DO_ENTITY_DROPS: org.bukkit.GameRule;
public static DO_FIRE_TICK: org.bukkit.GameRule;
public static DO_LIMITED_CRAFTING: org.bukkit.GameRule;
public static DO_MOB_LOOT: org.bukkit.GameRule;
public static DO_MOB_SPAWNING: org.bukkit.GameRule;
public static DO_TILE_DROPS: org.bukkit.GameRule;
public static DO_WEATHER_CYCLE: org.bukkit.GameRule;
public static KEEP_INVENTORY: org.bukkit.GameRule;
public static LOG_ADMIN_COMMANDS: org.bukkit.GameRule;
public static MOB_GRIEFING: org.bukkit.GameRule;
public static NATURAL_REGENERATION: org.bukkit.GameRule;
public static REDUCED_DEBUG_INFO: org.bukkit.GameRule;
public static SEND_COMMAND_FEEDBACK: org.bukkit.GameRule;
public static SHOW_DEATH_MESSAGES: org.bukkit.GameRule;
public static SPECTATORS_GENERATE_CHUNKS: org.bukkit.GameRule;
public static DISABLE_RAIDS: org.bukkit.GameRule;
public static RANDOM_TICK_SPEED: org.bukkit.GameRule;
public static SPAWN_RADIUS: org.bukkit.GameRule;
public static MAX_ENTITY_CRAMMING: org.bukkit.GameRule;
public static MAX_COMMAND_CHAIN_LENGTH: org.bukkit.GameRule;
/**
* Get the name of this GameRule.
*/
public getName(): string;
/**
* Get the type of this rule.
*/
public getType(): any;
public equals(obj: any): boolean;
public toString(): string;
/**
* Get a {@link GameRule} by its name.
*/
public static getByName(rule: string): org.bukkit.GameRule;
/**
* Get an immutable collection of {@link GameRule}s.
*/
public static values(): org.bukkit.GameRule[];
}
}
}

View File

@@ -1,19 +0,0 @@
declare namespace org {
namespace bukkit {
class GrassSpecies {
public static DEAD: org.bukkit.GrassSpecies;
public static NORMAL: org.bukkit.GrassSpecies;
public static FERN_LIKE: org.bukkit.GrassSpecies;
public static values(): org.bukkit.GrassSpecies[];
public static valueOf(name: string): org.bukkit.GrassSpecies;
/**
* Gets the associated data value representing this species
*/
public getData(): number;
/**
* Gets the GrassSpecies with the given data value
*/
public static getByData(data: number): org.bukkit.GrassSpecies;
}
}
}

View File

@@ -1,29 +0,0 @@
declare namespace org {
namespace bukkit {
class Instrument {
public static PIANO: org.bukkit.Instrument;
public static BASS_DRUM: org.bukkit.Instrument;
public static SNARE_DRUM: org.bukkit.Instrument;
public static STICKS: org.bukkit.Instrument;
public static BASS_GUITAR: org.bukkit.Instrument;
public static FLUTE: org.bukkit.Instrument;
public static BELL: org.bukkit.Instrument;
public static GUITAR: org.bukkit.Instrument;
public static CHIME: org.bukkit.Instrument;
public static XYLOPHONE: org.bukkit.Instrument;
public static IRON_XYLOPHONE: org.bukkit.Instrument;
public static COW_BELL: org.bukkit.Instrument;
public static DIDGERIDOO: org.bukkit.Instrument;
public static BIT: org.bukkit.Instrument;
public static BANJO: org.bukkit.Instrument;
public static PLING: org.bukkit.Instrument;
public static values(): org.bukkit.Instrument[];
public static valueOf(name: string): org.bukkit.Instrument;
public getType(): number;
/**
* Get an instrument by its type ID.
*/
public static getByType(type: number): org.bukkit.Instrument;
}
}
}

View File

@@ -1,10 +0,0 @@
declare namespace org {
namespace bukkit {
class Keyed {
/**
* Return the namespaced identifier for this object.
*/
public getKey(): org.bukkit.NamespacedKey;
}
}
}

View File

@@ -1,223 +0,0 @@
declare namespace org {
namespace bukkit {
class Location {
/**
* Constructs a new Location with the given coordinates
*/
constructor(world: org.bukkit.World, x: number, y: number, z: number)
/**
* Constructs a new Location with the given coordinates and direction
*/
constructor(world: org.bukkit.World, x: number, y: number, z: number, yaw: number, pitch: number)
/**
* Sets the world that this location resides in
*/
public setWorld(world: org.bukkit.World): void;
/**
* Checks if world in this location is present and loaded.
*/
public isWorldLoaded(): boolean;
/**
* Gets the world that this location resides in
*/
public getWorld(): org.bukkit.World;
/**
* Gets the chunk at the represented location
*/
public getChunk(): org.bukkit.Chunk;
/**
* Gets the block at the represented location
*/
public getBlock(): org.bukkit.block.Block;
/**
* Sets the x-coordinate of this location
*/
public setX(x: number): void;
/**
* Gets the x-coordinate of this location
*/
public getX(): number;
/**
* Gets the floored value of the X component, indicating the block that
* this location is contained with.
*/
public getBlockX(): number;
/**
* Sets the y-coordinate of this location
*/
public setY(y: number): void;
/**
* Gets the y-coordinate of this location
*/
public getY(): number;
/**
* Gets the floored value of the Y component, indicating the block that
* this location is contained with.
*/
public getBlockY(): number;
/**
* Sets the z-coordinate of this location
*/
public setZ(z: number): void;
/**
* Gets the z-coordinate of this location
*/
public getZ(): number;
/**
* Gets the floored value of the Z component, indicating the block that
* this location is contained with.
*/
public getBlockZ(): number;
/**
* Sets the yaw of this location, measured in degrees.
* <ul>
* <li>A yaw of 0 or 360 represents the positive z direction.
* <li>A yaw of 180 represents the negative z direction.
* <li>A yaw of 90 represents the negative x direction.
* <li>A yaw of 270 represents the positive x direction.
* </ul>
* Increasing yaw values are the equivalent of turning to your
* right-facing, increasing the scale of the next respective axis, and
* decreasing the scale of the previous axis.
*/
public setYaw(yaw: number): void;
/**
* Gets the yaw of this location, measured in degrees.
* <ul>
* <li>A yaw of 0 or 360 represents the positive z direction.
* <li>A yaw of 180 represents the negative z direction.
* <li>A yaw of 90 represents the negative x direction.
* <li>A yaw of 270 represents the positive x direction.
* </ul>
* Increasing yaw values are the equivalent of turning to your
* right-facing, increasing the scale of the next respective axis, and
* decreasing the scale of the previous axis.
*/
public getYaw(): number;
/**
* Sets the pitch of this location, measured in degrees.
* <ul>
* <li>A pitch of 0 represents level forward facing.
* <li>A pitch of 90 represents downward facing, or negative y
* direction.
* <li>A pitch of -90 represents upward facing, or positive y direction.
* </ul>
* Increasing pitch values the equivalent of looking down.
*/
public setPitch(pitch: number): void;
/**
* Gets the pitch of this location, measured in degrees.
* <ul>
* <li>A pitch of 0 represents level forward facing.
* <li>A pitch of 90 represents downward facing, or negative y
* direction.
* <li>A pitch of -90 represents upward facing, or positive y direction.
* </ul>
* Increasing pitch values the equivalent of looking down.
*/
public getPitch(): number;
/**
* Gets a unit-vector pointing in the direction that this Location is
* facing.
*/
public getDirection(): org.bukkit.util.Vector;
/**
* Sets the {@link #getYaw() yaw} and {@link #getPitch() pitch} to point
* in the direction of the vector.
*/
public setDirection(vector: org.bukkit.util.Vector): org.bukkit.Location;
/**
* Adds the location by another.
*/
public add(vec: org.bukkit.Location): org.bukkit.Location;
/**
* Adds the location by a vector.
*/
public add(vec: org.bukkit.util.Vector): org.bukkit.Location;
/**
* Adds the location by another. Not world-aware.
*/
public add(x: number, y: number, z: number): org.bukkit.Location;
/**
* Subtracts the location by another.
*/
public subtract(vec: org.bukkit.Location): org.bukkit.Location;
/**
* Subtracts the location by a vector.
*/
public subtract(vec: org.bukkit.util.Vector): org.bukkit.Location;
/**
* Subtracts the location by another. Not world-aware and
* orientation independent.
*/
public subtract(x: number, y: number, z: number): org.bukkit.Location;
/**
* Gets the magnitude of the location, defined as sqrt(x^2+y^2+z^2). The
* value of this method is not cached and uses a costly square-root
* function, so do not repeatedly call this method to get the location's
* magnitude. NaN will be returned if the inner result of the sqrt()
* function overflows, which will be caused if the length is too long. Not
* world-aware and orientation independent.
*/
public length(): number;
/**
* Gets the magnitude of the location squared. Not world-aware and
* orientation independent.
*/
public lengthSquared(): number;
/**
* Get the distance between this location and another. The value of this
* method is not cached and uses a costly square-root function, so do not
* repeatedly call this method to get the location's magnitude. NaN will
* be returned if the inner result of the sqrt() function overflows, which
* will be caused if the distance is too long.
*/
public distance(o: org.bukkit.Location): number;
/**
* Get the squared distance between this location and another.
*/
public distanceSquared(o: org.bukkit.Location): number;
/**
* Performs scalar multiplication, multiplying all components with a
* scalar. Not world-aware.
*/
public multiply(m: number): org.bukkit.Location;
/**
* Zero this location's components. Not world-aware.
*/
public zero(): org.bukkit.Location;
public equals(obj: any): boolean;
public hashCode(): number;
public toString(): string;
/**
* Constructs a new {@link Vector} based on this Location
*/
public toVector(): org.bukkit.util.Vector;
public clone(): org.bukkit.Location;
/**
* Check if each component of this Location is finite.
*/
public checkFinite(): void;
/**
* Safely converts a double (location coordinate) to an int (block
* coordinate)
*/
public static locToBlock(loc: number): number;
public serialize(): Map<any, any> /*java.util.Map*/;
/**
* Required method for deserialization
*/
public static deserialize(args: Map<any, any> /*java.util.Map*/): org.bukkit.Location;
/**
* Normalizes the given yaw angle to a value between <code>+/-180</code>
* degrees.
*/
public static normalizeYaw(yaw: number): number;
/**
* Normalizes the given pitch angle to a value between <code>+/-90</code>
* degrees.
*/
public static normalizePitch(pitch: number): number;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,24 +0,0 @@
declare namespace org {
namespace bukkit {
class Nameable {
/**
* Gets the custom name on a mob or block. If there is no name this method
* will return null.
* <p>
* This value has no effect on players, they will always use their real
* name.
*/
public getCustomName(): string;
/**
* Sets a custom name on a mob or block. This name will be used in death
* messages and can be sent to the client as a nameplate over the mob.
* <p>
* Setting the name to null or an empty string will clear it.
* <p>
* This value has no effect on players, they will always use their real
* name.
*/
public setCustomName(name: string): void;
}
}
}

View File

@@ -1,35 +0,0 @@
declare namespace org {
namespace bukkit {
class NamespacedKey {
/**
* Create a key in a specific namespace.
*/
constructor(namespace: string, key: string)
/**
* Create a key in the plugin's namespace.
* <p>
* Namespaces may only contain lowercase alphanumeric characters, periods,
* underscores, and hyphens.
* <p>
* Keys may only contain lowercase alphanumeric characters, periods,
* underscores, hyphens, and forward slashes.
*/
constructor(plugin: org.bukkit.plugin.Plugin, key: string)
public static MINECRAFT: string;
public static BUKKIT: string;
public getNamespace(): string;
public getKey(): string;
public hashCode(): number;
public equals(obj: any): boolean;
public toString(): string;
/**
* Return a new random key in the {@link #BUKKIT} namespace.
*/
public static randomKey(): org.bukkit.NamespacedKey;
/**
* Get a key in the Minecraft namespace.
*/
public static minecraft(key: string): org.bukkit.NamespacedKey;
}
}
}

View File

@@ -1,12 +0,0 @@
declare namespace org {
namespace bukkit {
class NetherWartsState {
public static SEEDED: org.bukkit.NetherWartsState;
public static STAGE_ONE: org.bukkit.NetherWartsState;
public static STAGE_TWO: org.bukkit.NetherWartsState;
public static RIPE: org.bukkit.NetherWartsState;
public static values(): org.bukkit.NetherWartsState[];
public static valueOf(name: string): org.bukkit.NetherWartsState;
}
}
}

View File

@@ -1,40 +0,0 @@
declare namespace org {
namespace bukkit {
namespace Note {
class Tone {
public static G: org.bukkit.Note.Tone;
public static A: org.bukkit.Note.Tone;
public static B: org.bukkit.Note.Tone;
public static C: org.bukkit.Note.Tone;
public static D: org.bukkit.Note.Tone;
public static E: org.bukkit.Note.Tone;
public static F: org.bukkit.Note.Tone;
public static TONES_COUNT: number;
public static values(): org.bukkit.Note.Tone[];
public static valueOf(name: string): org.bukkit.Note.Tone;
/**
* Returns the not sharped id of this tone.
*/
public getId(): number;
/**
* Returns the id of this tone. These method allows to return the
* sharped id of the tone. If the tone couldn't be sharped it always
* return the not sharped id of this tone.
*/
public getId(sharped: boolean): number;
/**
* Returns if this tone could be sharped.
*/
public isSharpable(): boolean;
/**
* Returns if this tone id is the sharped id of the tone.
*/
public isSharped(id: number): boolean;
/**
* Returns the tone to id. Also returning the semitones.
*/
public static getById(id: number): org.bukkit.Note.Tone;
}
}
}
}

View File

@@ -1,47 +0,0 @@
declare namespace org {
namespace bukkit {
class Note {
/**
* Creates a new note.
*/
constructor(note: number)
/**
* Creates a new note.
*/
constructor(octave: number, tone: org.bukkit.Note.Tone, sharped: boolean)
/**
* Creates a new note for a flat tone, such as A-flat.
*/
public static flat(octave: number, tone: org.bukkit.Note.Tone): org.bukkit.Note;
/**
* Creates a new note for a sharp tone, such as A-sharp.
*/
public static sharp(octave: number, tone: org.bukkit.Note.Tone): org.bukkit.Note;
/**
* Creates a new note for a natural tone, such as A-natural.
*/
public static natural(octave: number, tone: org.bukkit.Note.Tone): org.bukkit.Note;
public sharped(): org.bukkit.Note;
public flattened(): org.bukkit.Note;
/**
* Returns the internal id of this note.
*/
public getId(): number;
/**
* Returns the octave of this note.
*/
public getOctave(): number;
/**
* Returns the tone of this note.
*/
public getTone(): org.bukkit.Note.Tone;
/**
* Returns if this note is sharped.
*/
public isSharped(): boolean;
public hashCode(): number;
public equals(obj: any): boolean;
public toString(): string;
}
}
}

View File

@@ -1,67 +0,0 @@
declare namespace org {
namespace bukkit {
class OfflinePlayer {
/**
* Checks if this player is currently online
*/
public isOnline(): boolean;
/**
* Returns the name of this player
* <p>
* Names are no longer unique past a single game session. For persistent storage
* it is recommended that you use {@link #getUniqueId()} instead.
*/
public getName(): string;
/**
* Returns the UUID of this player
*/
public getUniqueId(): any;
/**
* Checks if this player is banned or not
*/
public isBanned(): boolean;
/**
* Checks if this player is whitelisted or not
*/
public isWhitelisted(): boolean;
/**
* Sets if this player is whitelisted or not
*/
public setWhitelisted(value: boolean): void;
/**
* Gets a {@link Player} object that this represents, if there is one
* <p>
* If the player is online, this will return that player. Otherwise,
* it will return null.
*/
public getPlayer(): org.bukkit.entity.Player;
/**
* Gets the first date and time that this player was witnessed on this
* server.
* <p>
* If the player has never played before, this will return 0. Otherwise,
* it will be the amount of milliseconds since midnight, January 1, 1970
* UTC.
*/
public getFirstPlayed(): number;
/**
* Gets the last date and time that this player was witnessed on this
* server.
* <p>
* If the player has never played before, this will return 0. Otherwise,
* it will be the amount of milliseconds since midnight, January 1, 1970
* UTC.
*/
public getLastPlayed(): number;
/**
* Checks if this player has played on this server before.
*/
public hasPlayedBefore(): boolean;
/**
* Gets the Location where the player will spawn at their bed, null if
* they have not slept in one or their current bed spawn is invalid.
*/
public getBedSpawnLocation(): org.bukkit.Location;
}
}
}

View File

@@ -1,17 +0,0 @@
declare namespace org {
namespace bukkit {
namespace Particle {
class DustOptions {
constructor(color: org.bukkit.Color, size: number)
/**
* The color of the particles to be displayed.
*/
public getColor(): org.bukkit.Color;
/**
* Relative size of the particle.
*/
public getSize(): number;
}
}
}
}

View File

@@ -1,76 +0,0 @@
declare namespace org {
namespace bukkit {
class Particle {
public static EXPLOSION_NORMAL: org.bukkit.Particle;
public static EXPLOSION_LARGE: org.bukkit.Particle;
public static EXPLOSION_HUGE: org.bukkit.Particle;
public static FIREWORKS_SPARK: org.bukkit.Particle;
public static WATER_BUBBLE: org.bukkit.Particle;
public static WATER_SPLASH: org.bukkit.Particle;
public static WATER_WAKE: org.bukkit.Particle;
public static SUSPENDED: org.bukkit.Particle;
public static SUSPENDED_DEPTH: org.bukkit.Particle;
public static CRIT: org.bukkit.Particle;
public static CRIT_MAGIC: org.bukkit.Particle;
public static SMOKE_NORMAL: org.bukkit.Particle;
public static SMOKE_LARGE: org.bukkit.Particle;
public static SPELL: org.bukkit.Particle;
public static SPELL_INSTANT: org.bukkit.Particle;
public static SPELL_MOB: org.bukkit.Particle;
public static SPELL_MOB_AMBIENT: org.bukkit.Particle;
public static SPELL_WITCH: org.bukkit.Particle;
public static DRIP_WATER: org.bukkit.Particle;
public static DRIP_LAVA: org.bukkit.Particle;
public static VILLAGER_ANGRY: org.bukkit.Particle;
public static VILLAGER_HAPPY: org.bukkit.Particle;
public static TOWN_AURA: org.bukkit.Particle;
public static NOTE: org.bukkit.Particle;
public static PORTAL: org.bukkit.Particle;
public static ENCHANTMENT_TABLE: org.bukkit.Particle;
public static FLAME: org.bukkit.Particle;
public static LAVA: org.bukkit.Particle;
public static CLOUD: org.bukkit.Particle;
public static REDSTONE: org.bukkit.Particle;
public static SNOWBALL: org.bukkit.Particle;
public static SNOW_SHOVEL: org.bukkit.Particle;
public static SLIME: org.bukkit.Particle;
public static HEART: org.bukkit.Particle;
public static BARRIER: org.bukkit.Particle;
public static ITEM_CRACK: org.bukkit.Particle;
public static BLOCK_CRACK: org.bukkit.Particle;
public static BLOCK_DUST: org.bukkit.Particle;
public static WATER_DROP: org.bukkit.Particle;
public static MOB_APPEARANCE: org.bukkit.Particle;
public static DRAGON_BREATH: org.bukkit.Particle;
public static END_ROD: org.bukkit.Particle;
public static DAMAGE_INDICATOR: org.bukkit.Particle;
public static SWEEP_ATTACK: org.bukkit.Particle;
public static FALLING_DUST: org.bukkit.Particle;
public static TOTEM: org.bukkit.Particle;
public static SPIT: org.bukkit.Particle;
public static SQUID_INK: org.bukkit.Particle;
public static BUBBLE_POP: org.bukkit.Particle;
public static CURRENT_DOWN: org.bukkit.Particle;
public static BUBBLE_COLUMN_UP: org.bukkit.Particle;
public static NAUTILUS: org.bukkit.Particle;
public static DOLPHIN: org.bukkit.Particle;
public static SNEEZE: org.bukkit.Particle;
public static CAMPFIRE_COSY_SMOKE: org.bukkit.Particle;
public static CAMPFIRE_SIGNAL_SMOKE: org.bukkit.Particle;
public static COMPOSTER: org.bukkit.Particle;
public static FLASH: org.bukkit.Particle;
public static FALLING_LAVA: org.bukkit.Particle;
public static LANDING_LAVA: org.bukkit.Particle;
public static FALLING_WATER: org.bukkit.Particle;
public static LEGACY_BLOCK_CRACK: org.bukkit.Particle;
public static LEGACY_BLOCK_DUST: org.bukkit.Particle;
public static LEGACY_FALLING_DUST: org.bukkit.Particle;
public static values(): org.bukkit.Particle[];
public static valueOf(name: string): org.bukkit.Particle;
/**
* Returns the required data type for the particle
*/
public getDataType(): any;
}
}
}

View File

@@ -1,11 +0,0 @@
declare namespace org {
namespace bukkit {
class PortalType {
public static NETHER: org.bukkit.PortalType;
public static ENDER: org.bukkit.PortalType;
public static CUSTOM: org.bukkit.PortalType;
public static values(): org.bukkit.PortalType[];
public static valueOf(name: string): org.bukkit.PortalType;
}
}
}

View File

@@ -1,12 +0,0 @@
declare namespace org {
namespace bukkit {
namespace Registry {
class SimpleRegistry {
constructor(type: any)
constructor(type: any, predicate: any)
public get(key: org.bukkit.NamespacedKey): any;
public iterator(): any;
}
}
}
}

View File

@@ -1,22 +0,0 @@
declare namespace org {
namespace bukkit {
class Registry {
public static ADVANCEMENT: org.bukkit.Registry;
public static ART: org.bukkit.Registry;
public static BIOME: org.bukkit.Registry;
public static BOSS_BARS: org.bukkit.Registry;
public static ENCHANTMENT: org.bukkit.Registry;
public static ENTITY_TYPE: org.bukkit.Registry;
public static LOOT_TABLES: org.bukkit.Registry;
public static MATERIAL: org.bukkit.Registry;
public static STATISTIC: org.bukkit.Registry;
public static VILLAGER_PROFESSION: org.bukkit.Registry;
public static VILLAGER_TYPE: org.bukkit.Registry;
public static MEMORY_MODULE_TYPE: org.bukkit.Registry;
/**
* Get the object by its key.
*/
public get(key: org.bukkit.NamespacedKey): org.bukkit.Keyed;
}
}
}

View File

@@ -1,24 +0,0 @@
declare namespace org {
namespace bukkit {
class Rotation {
public static NONE: org.bukkit.Rotation;
public static CLOCKWISE_45: org.bukkit.Rotation;
public static CLOCKWISE: org.bukkit.Rotation;
public static CLOCKWISE_135: org.bukkit.Rotation;
public static FLIPPED: org.bukkit.Rotation;
public static FLIPPED_45: org.bukkit.Rotation;
public static COUNTER_CLOCKWISE: org.bukkit.Rotation;
public static COUNTER_CLOCKWISE_45: org.bukkit.Rotation;
public static values(): org.bukkit.Rotation[];
public static valueOf(name: string): org.bukkit.Rotation;
/**
* Rotate clockwise by 90 degrees.
*/
public rotateClockwise(): org.bukkit.Rotation;
/**
* Rotate counter-clockwise by 90 degrees.
*/
public rotateCounterClockwise(): org.bukkit.Rotation;
}
}
}

View File

@@ -1,19 +0,0 @@
declare namespace org {
namespace bukkit {
class SandstoneType {
public static CRACKED: org.bukkit.SandstoneType;
public static GLYPHED: org.bukkit.SandstoneType;
public static SMOOTH: org.bukkit.SandstoneType;
public static values(): org.bukkit.SandstoneType[];
public static valueOf(name: string): org.bukkit.SandstoneType;
/**
* Gets the associated data value representing this type of sandstone
*/
public getData(): number;
/**
* Gets the type of sandstone with the given data value
*/
public static getByData(data: number): org.bukkit.SandstoneType;
}
}
}

View File

@@ -1,652 +0,0 @@
declare namespace org {
namespace bukkit {
class Server {
public static BROADCAST_CHANNEL_ADMINISTRATIVE: string;
public static BROADCAST_CHANNEL_USERS: string;
/**
* Gets the name of this server implementation.
*/
public getName(): string;
/**
* Gets the version string of this server implementation.
*/
public getVersion(): string;
/**
* Gets the Bukkit version that this server is running.
*/
public getBukkitVersion(): string;
/**
* Gets a view of all currently logged in players. This {@linkplain
* Collections#unmodifiableCollection(Collection) view} is a reused
* object, making some operations like {@link Collection#size()}
* zero-allocation.
* <p>
* The collection is a view backed by the internal representation, such
* that, changes to the internal state of the server will be reflected
* immediately. However, the reuse of the returned collection (identity)
* is not strictly guaranteed for future or all implementations. Casting
* the collection, or relying on interface implementations (like {@link
* Serializable} or {@link List}), is deprecated.
* <p>
* Iteration behavior is undefined outside of self-contained main-thread
* uses. Normal and immediate iterator use without consequences that
* affect the collection are fully supported. The effects following
* (non-exhaustive) {@link Entity#teleport(Location) teleportation},
* {@link Player#setHealth(double) death}, and {@link Player#kickPlayer(
* String) kicking} are undefined. Any use of this collection from
* asynchronous threads is unsafe.
* <p>
* For safe consequential iteration or mimicking the old array behavior,
* using {@link Collection#toArray(Object[])} is recommended. For making
* snapshots, {@link ImmutableList#copyOf(Collection)} is recommended.
*/
public getOnlinePlayers(): any[] /*java.util.Collection*/;
/**
* Get the maximum amount of players which can login to this server.
*/
public getMaxPlayers(): number;
/**
* Get the game port that the server runs on.
*/
public getPort(): number;
/**
* Get the view distance from this server.
*/
public getViewDistance(): number;
/**
* Get the IP that this server is bound to, or empty string if not
* specified.
*/
public getIp(): string;
/**
* Get world type (level-type setting) for default world.
*/
public getWorldType(): string;
/**
* Get generate-structures setting.
*/
public getGenerateStructures(): boolean;
/**
* Gets whether this server allows the End or not.
*/
public getAllowEnd(): boolean;
/**
* Gets whether this server allows the Nether or not.
*/
public getAllowNether(): boolean;
/**
* Gets whether this server has a whitelist or not.
*/
public hasWhitelist(): boolean;
/**
* Sets if the server is whitelisted.
*/
public setWhitelist(value: boolean): void;
/**
* Gets a list of whitelisted players.
*/
public getWhitelistedPlayers(): any[] /*java.util.Set*/;
/**
* Reloads the whitelist from disk.
*/
public reloadWhitelist(): void;
/**
* Broadcast a message to all players.
* <p>
* This is the same as calling {@link #broadcast(java.lang.String,
* java.lang.String)} to {@link #BROADCAST_CHANNEL_USERS}
*/
public broadcastMessage(message: string): number;
/**
* Gets the name of the update folder. The update folder is used to safely
* update plugins at the right moment on a plugin load.
* <p>
* The update folder name is relative to the plugins folder.
*/
public getUpdateFolder(): string;
/**
* Gets the update folder. The update folder is used to safely update
* plugins at the right moment on a plugin load.
*/
public getUpdateFolderFile(): any;
/**
* Gets the value of the connection throttle setting.
*/
public getConnectionThrottle(): number;
/**
* Gets default ticks per animal spawns value.
* <p>
* <b>Example Usage:</b>
* <ul>
* <li>A value of 1 will mean the server will attempt to spawn monsters
* every tick.
* <li>A value of 400 will mean the server will attempt to spawn monsters
* every 400th tick.
* <li>A value below 0 will be reset back to Minecraft's default.
* </ul>
* <p>
* <b>Note:</b> If set to 0, animal spawning will be disabled. We
* recommend using spawn-animals to control this instead.
* <p>
* Minecraft default: 400.
*/
public getTicksPerAnimalSpawns(): number;
/**
* Gets the default ticks per monster spawns value.
* <p>
* <b>Example Usage:</b>
* <ul>
* <li>A value of 1 will mean the server will attempt to spawn monsters
* every tick.
* <li>A value of 400 will mean the server will attempt to spawn monsters
* every 400th tick.
* <li>A value below 0 will be reset back to Minecraft's default.
* </ul>
* <p>
* <b>Note:</b> If set to 0, monsters spawning will be disabled. We
* recommend using spawn-monsters to control this instead.
* <p>
* Minecraft default: 1.
*/
public getTicksPerMonsterSpawns(): number;
/**
* Gets a player object by the given username.
* <p>
* This method may not return objects for offline players.
*/
public getPlayer(name: string): org.bukkit.entity.Player;
/**
* Gets the player with the exact given name, case insensitive.
*/
public getPlayerExact(name: string): org.bukkit.entity.Player;
/**
* Attempts to match any players with the given name, and returns a list
* of all possibly matches.
* <p>
* This list is not sorted in any particular order. If an exact match is
* found, the returned list will only contain a single result.
*/
public matchPlayer(name: string): any[] /*java.util.List*/;
/**
* Gets the player with the given UUID.
*/
public getPlayer(id: any): org.bukkit.entity.Player;
/**
* Gets the plugin manager for interfacing with plugins.
*/
public getPluginManager(): org.bukkit.plugin.PluginManager;
/**
* Gets the scheduler for managing scheduled events.
*/
public getScheduler(): org.bukkit.scheduler.BukkitScheduler;
/**
* Gets a services manager.
*/
public getServicesManager(): org.bukkit.plugin.ServicesManager;
/**
* Gets a list of all worlds on this server.
*/
public getWorlds(): any[] /*java.util.List*/;
/**
* Creates or loads a world with the given name using the specified
* options.
* <p>
* If the world is already loaded, it will just return the equivalent of
* getWorld(creator.name()).
*/
public createWorld(creator: org.bukkit.WorldCreator): org.bukkit.World;
/**
* Unloads a world with the given name.
*/
public unloadWorld(name: string, save: boolean): boolean;
/**
* Unloads the given world.
*/
public unloadWorld(world: org.bukkit.World, save: boolean): boolean;
/**
* Gets the world with the given name.
*/
public getWorld(name: string): org.bukkit.World;
/**
* Gets the world from the given Unique ID.
*/
public getWorld(uid: any): org.bukkit.World;
/**
* Gets the map from the given item ID.
*/
public getMap(id: number): org.bukkit.map.MapView;
/**
* Create a new map with an automatically assigned ID.
*/
public createMap(world: org.bukkit.World): org.bukkit.map.MapView;
/**
* Create a new explorer map targeting the closest nearby structure of a
* given {@link StructureType}.
* <br>
* This method uses implementation default values for radius and
* findUnexplored (usually 100, true).
*/
public createExplorerMap(world: org.bukkit.World, location: org.bukkit.Location, structureType: org.bukkit.StructureType): org.bukkit.inventory.ItemStack;
/**
* Create a new explorer map targeting the closest nearby structure of a
* given {@link StructureType}.
* <br>
* This method uses implementation default values for radius and
* findUnexplored (usually 100, true).
*/
public createExplorerMap(world: org.bukkit.World, location: org.bukkit.Location, structureType: org.bukkit.StructureType, radius: number, findUnexplored: boolean): org.bukkit.inventory.ItemStack;
/**
* Reloads the server, refreshing settings and plugin information.
*/
public reload(): void;
/**
* Reload only the Minecraft data for the server. This includes custom
* advancements and loot tables.
*/
public reloadData(): void;
/**
* Returns the primary logger associated with this server instance.
*/
public getLogger(): any;
/**
* Gets a {@link PluginCommand} with the given name or alias.
*/
public getPluginCommand(name: string): org.bukkit.command.PluginCommand;
/**
* Writes loaded players to disk.
*/
public savePlayers(): void;
/**
* Dispatches a command on this server, and executes it if found.
*/
public dispatchCommand(sender: org.bukkit.command.CommandSender, commandLine: string): boolean;
/**
* Adds a recipe to the crafting manager.
*/
public addRecipe(recipe: org.bukkit.inventory.Recipe): boolean;
/**
* Get a list of all recipes for a given item. The stack size is ignored
* in comparisons. If the durability is -1, it will match any data value.
*/
public getRecipesFor(result: org.bukkit.inventory.ItemStack): any[] /*java.util.List*/;
/**
* Get an iterator through the list of crafting recipes.
*/
public recipeIterator(): any;
/**
* Clears the list of crafting recipes.
*/
public clearRecipes(): void;
/**
* Resets the list of crafting recipes to the default.
*/
public resetRecipes(): void;
/**
* Gets a list of command aliases defined in the server properties.
*/
public getCommandAliases(): Map<any, any> /*java.util.Map*/;
/**
* Gets the radius, in blocks, around each worlds spawn point to protect.
*/
public getSpawnRadius(): number;
/**
* Sets the radius, in blocks, around each worlds spawn point to protect.
*/
public setSpawnRadius(value: number): void;
/**
* Gets whether the Server is in online mode or not.
*/
public getOnlineMode(): boolean;
/**
* Gets whether this server allows flying or not.
*/
public getAllowFlight(): boolean;
/**
* Gets whether the server is in hardcore mode or not.
*/
public isHardcore(): boolean;
/**
* Shutdowns the server, stopping everything.
*/
public shutdown(): void;
/**
* Broadcasts the specified message to every user with the given
* permission name.
*/
public broadcast(message: string, permission: string): number;
/**
* Gets the player by the given name, regardless if they are offline or
* online.
* <p>
* This method may involve a blocking web request to get the UUID for the
* given name.
* <p>
* This will return an object even if the player does not exist. To this
* method, all players will exist.
*/
public getOfflinePlayer(name: string): org.bukkit.OfflinePlayer;
/**
* Gets the player by the given UUID, regardless if they are offline or
* online.
* <p>
* This will return an object even if the player does not exist. To this
* method, all players will exist.
*/
public getOfflinePlayer(id: any): org.bukkit.OfflinePlayer;
/**
* Gets a set containing all current IPs that are banned.
*/
public getIPBans(): any[] /*java.util.Set*/;
/**
* Bans the specified address from the server.
*/
public banIP(address: string): void;
/**
* Unbans the specified address from the server.
*/
public unbanIP(address: string): void;
/**
* Gets a set containing all banned players.
*/
public getBannedPlayers(): any[] /*java.util.Set*/;
/**
* Gets a ban list for the supplied type.
* <p>
* Bans by name are no longer supported and this method will return
* null when trying to request them. The replacement is bans by UUID.
*/
public getBanList(type: org.bukkit.BanList.Type): org.bukkit.BanList;
/**
* Gets a set containing all player operators.
*/
public getOperators(): any[] /*java.util.Set*/;
/**
* Gets the default {@link GameMode} for new players.
*/
public getDefaultGameMode(): org.bukkit.GameMode;
/**
* Sets the default {@link GameMode} for new players.
*/
public setDefaultGameMode(mode: org.bukkit.GameMode): void;
/**
* Gets a {@link ConsoleCommandSender} that may be used as an input source
* for this server.
*/
public getConsoleSender(): org.bukkit.command.ConsoleCommandSender;
/**
* Gets the folder that contains all of the various {@link World}s.
*/
public getWorldContainer(): any;
/**
* Gets every player that has ever played on this server.
*/
public getOfflinePlayers(): org.bukkit.OfflinePlayer[];
/**
* Gets the {@link Messenger} responsible for this server.
*/
public getMessenger(): org.bukkit.plugin.messaging.Messenger;
/**
* Gets the {@link HelpMap} providing help topics for this server.
*/
public getHelpMap(): org.bukkit.help.HelpMap;
/**
* Creates an empty inventory with the specified type. If the type
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
* otherwise the new inventory has the normal size for its type.
* <br>
* {@link InventoryType#WORKBENCH} will not process crafting recipes if
* created with this method. Use
* {@link Player#openWorkbench(Location, boolean)} instead.
* <br>
* {@link InventoryType#ENCHANTING} will not process {@link ItemStack}s
* for possible enchanting results. Use
* {@link Player#openEnchanting(Location, boolean)} instead.
*/
public createInventory(owner: org.bukkit.inventory.InventoryHolder, type: org.bukkit.event.inventory.InventoryType): org.bukkit.inventory.Inventory;
/**
* Creates an empty inventory with the specified type and title. If the type
* is {@link InventoryType#CHEST}, the new inventory has a size of 27;
* otherwise the new inventory has the normal size for its type.<br>
* It should be noted that some inventory types do not support titles and
* may not render with said titles on the Minecraft client.
* <br>
* {@link InventoryType#WORKBENCH} will not process crafting recipes if
* created with this method. Use
* {@link Player#openWorkbench(Location, boolean)} instead.
* <br>
* {@link InventoryType#ENCHANTING} will not process {@link ItemStack}s
* for possible enchanting results. Use
* {@link Player#openEnchanting(Location, boolean)} instead.
*/
public createInventory(owner: org.bukkit.inventory.InventoryHolder, type: org.bukkit.event.inventory.InventoryType, title: string): org.bukkit.inventory.Inventory;
/**
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
* specified size.
*/
public createInventory(owner: org.bukkit.inventory.InventoryHolder, size: number): org.bukkit.inventory.Inventory;
/**
* Creates an empty inventory of type {@link InventoryType#CHEST} with the
* specified size and title.
*/
public createInventory(owner: org.bukkit.inventory.InventoryHolder, size: number, title: string): org.bukkit.inventory.Inventory;
/**
* Creates an empty merchant.
*/
public createMerchant(title: string): org.bukkit.inventory.Merchant;
/**
* Gets user-specified limit for number of monsters that can spawn in a
* chunk.
*/
public getMonsterSpawnLimit(): number;
/**
* Gets user-specified limit for number of animals that can spawn in a
* chunk.
*/
public getAnimalSpawnLimit(): number;
/**
* Gets user-specified limit for number of water animals that can spawn in
* a chunk.
*/
public getWaterAnimalSpawnLimit(): number;
/**
* Gets user-specified limit for number of ambient mobs that can spawn in
* a chunk.
*/
public getAmbientSpawnLimit(): number;
/**
* Checks the current thread against the expected primary thread for the
* server.
* <p>
* <b>Note:</b> this method should not be used to indicate the current
* synchronized state of the runtime. A current thread matching the main
* thread indicates that it is synchronized, but a mismatch <b>does not
* preclude</b> the same assumption.
*/
public isPrimaryThread(): boolean;
/**
* Gets the message that is displayed on the server list.
*/
public getMotd(): string;
/**
* Gets the default message that is displayed when the server is stopped.
*/
public getShutdownMessage(): string;
/**
* Gets the current warning state for the server.
*/
public getWarningState(): org.bukkit.Warning.WarningState;
/**
* Gets the instance of the item factory (for {@link ItemMeta}).
*/
public getItemFactory(): org.bukkit.inventory.ItemFactory;
/**
* Gets the instance of the scoreboard manager.
* <p>
* This will only exist after the first world has loaded.
*/
public getScoreboardManager(): org.bukkit.scoreboard.ScoreboardManager;
/**
* Gets an instance of the server's default server-icon.
*/
public getServerIcon(): org.bukkit.util.CachedServerIcon;
/**
* Loads an image from a file, and returns a cached image for the specific
* server-icon.
* <p>
* Size and type are implementation defined. An incompatible file is
* guaranteed to throw an implementation-defined {@link Exception}.
*/
public loadServerIcon(file: any): org.bukkit.util.CachedServerIcon;
/**
* Creates a cached server-icon for the specific image.
* <p>
* Size and type are implementation defined. An incompatible file is
* guaranteed to throw an implementation-defined {@link Exception}.
*/
public loadServerIcon(image: any): org.bukkit.util.CachedServerIcon;
/**
* Set the idle kick timeout. Any players idle for the specified amount of
* time will be automatically kicked.
* <p>
* A value of 0 will disable the idle kick timeout.
*/
public setIdleTimeout(threshold: number): void;
/**
* Gets the idle kick timeout.
*/
public getIdleTimeout(): number;
/**
* Create a ChunkData for use in a generator.
* See {@link ChunkGenerator#generateChunkData(org.bukkit.World, java.util.Random, int, int, org.bukkit.generator.ChunkGenerator.BiomeGrid)}
*/
public createChunkData(world: org.bukkit.World): org.bukkit.generator.ChunkGenerator.ChunkData;
/**
* Creates a boss bar instance to display to players. The progress
* defaults to 1.0
*/
public createBossBar(title: string, color: org.bukkit.boss.BarColor, style: org.bukkit.boss.BarStyle, flags: org.bukkit.boss.BarFlag): org.bukkit.boss.BossBar;
/**
* Creates a boss bar instance to display to players. The progress defaults
* to 1.0.
* <br>
* This instance is added to the persistent storage of the server and will
* be editable by commands and restored after restart.
*/
public createBossBar(key: org.bukkit.NamespacedKey, title: string, color: org.bukkit.boss.BarColor, style: org.bukkit.boss.BarStyle, flags: org.bukkit.boss.BarFlag): org.bukkit.boss.KeyedBossBar;
/**
* Gets an unmodifiable iterator through all persistent bossbars.
* <ul>
* <li><b>not</b> bound to a {@link org.bukkit.entity.Boss}</li>
* <li>
* <b>not</b> created using
* {@link #createBossBar(String, BarColor, BarStyle, BarFlag...)}
* </li>
* </ul>
* e.g. bossbars created using the bossbar command
*/
public getBossBars(): any;
/**
* Gets the {@link KeyedBossBar} specified by this key.
* <ul>
* <li><b>not</b> bound to a {@link org.bukkit.entity.Boss}</li>
* <li>
* <b>not</b> created using
* {@link #createBossBar(String, BarColor, BarStyle, BarFlag...)}
* </li>
* </ul>
* e.g. bossbars created using the bossbar command
*/
public getBossBar(key: org.bukkit.NamespacedKey): org.bukkit.boss.KeyedBossBar;
/**
* Removes a {@link KeyedBossBar} specified by this key.
* <ul>
* <li><b>not</b> bound to a {@link org.bukkit.entity.Boss}</li>
* <li>
* <b>not</b> created using
* {@link #createBossBar(String, BarColor, BarStyle, BarFlag...)}
* </li>
* </ul>
* e.g. bossbars created using the bossbar command
*/
public removeBossBar(key: org.bukkit.NamespacedKey): boolean;
/**
* Gets an entity on the server by its UUID
*/
public getEntity(uuid: any): org.bukkit.entity.Entity;
/**
* Get the advancement specified by this key.
*/
public getAdvancement(key: org.bukkit.NamespacedKey): org.bukkit.advancement.Advancement;
/**
* Get an iterator through all advancements. Advancements cannot be removed
* from this iterator,
*/
public advancementIterator(): any;
/**
* Creates a new {@link BlockData} instance for the specified Material, with
* all properties initialized to unspecified defaults.
*/
public createBlockData(material: org.bukkit.Material): org.bukkit.block.data.BlockData;
/**
* Creates a new {@link BlockData} instance for the specified Material, with
* all properties initialized to unspecified defaults.
*/
public createBlockData(material: org.bukkit.Material, consumer: any): org.bukkit.block.data.BlockData;
/**
* Creates a new {@link BlockData} instance with material and properties
* parsed from provided data.
*/
public createBlockData(data: string): org.bukkit.block.data.BlockData;
/**
* Creates a new {@link BlockData} instance for the specified Material, with
* all properties initialized to unspecified defaults, except for those
* provided in data.
* <br>
* If <code>material</code> is specified, then the data string must not also
* contain the material.
*/
public createBlockData(material: org.bukkit.Material, data: string): org.bukkit.block.data.BlockData;
/**
* Gets a tag which has already been defined within the server. Plugins are
* suggested to use the concrete tags in {@link Tag} rather than this method
* which makes no guarantees about which tags are available, and may also be
* less performant due to lack of caching.
* <br>
* Tags will be searched for in an implementation specific manner, but a
* path consisting of namespace/tags/registry/key is expected.
* <br>
* Server implementations are allowed to handle only the registries
* indicated in {@link Tag}.
*/
public getTag(registry: string, tag: org.bukkit.NamespacedKey, clazz: any): org.bukkit.Tag;
/**
* Gets a all tags which have been defined within the server.
* <br>
* Server implementations are allowed to handle only the registries
* indicated in {@link Tag}.
* <br>
* No guarantees are made about the mutability of the returned iterator.
*/
public getTags(registry: string, clazz: any): any;
/**
* Gets the specified {@link LootTable}.
*/
public getLootTable(key: org.bukkit.NamespacedKey): org.bukkit.loot.LootTable;
/**
* Selects entities using the given Vanilla selector.
* <br>
* No guarantees are made about the selector format, other than they match
* the Vanilla format for the active Minecraft version.
* <br>
* Usually a selector will start with '@', unless selecting a Player in
* which case it may simply be the Player's name or UUID.
* <br>
* Note that in Vanilla, elevated permissions are usually required to use
* '@' selectors, but this method should not check such permissions from the
* sender.
*/
public selectEntities(sender: org.bukkit.command.CommandSender, selector: string): any[] /*java.util.List*/;
public getUnsafe(): org.bukkit.UnsafeValues;
}
}
}

View File

@@ -1,14 +0,0 @@
declare namespace org {
namespace bukkit {
class SkullType {
public static SKELETON: org.bukkit.SkullType;
public static WITHER: org.bukkit.SkullType;
public static ZOMBIE: org.bukkit.SkullType;
public static PLAYER: org.bukkit.SkullType;
public static CREEPER: org.bukkit.SkullType;
public static DRAGON: org.bukkit.SkullType;
public static values(): org.bukkit.SkullType[];
public static valueOf(name: string): org.bukkit.SkullType;
}
}
}

View File

@@ -1,803 +0,0 @@
declare namespace org {
namespace bukkit {
class Sound {
public static AMBIENT_CAVE: any;
public static AMBIENT_UNDERWATER_ENTER: any;
public static AMBIENT_UNDERWATER_EXIT: any;
public static AMBIENT_UNDERWATER_LOOP: any;
public static AMBIENT_UNDERWATER_LOOP_ADDITIONS: any;
public static AMBIENT_UNDERWATER_LOOP_ADDITIONS_RARE: any;
public static AMBIENT_UNDERWATER_LOOP_ADDITIONS_ULTRA_RARE: any;
public static BLOCK_ANVIL_BREAK: any;
public static BLOCK_ANVIL_DESTROY: any;
public static BLOCK_ANVIL_FALL: any;
public static BLOCK_ANVIL_HIT: any;
public static BLOCK_ANVIL_LAND: any;
public static BLOCK_ANVIL_PLACE: any;
public static BLOCK_ANVIL_STEP: any;
public static BLOCK_ANVIL_USE: any;
public static BLOCK_BAMBOO_BREAK: any;
public static BLOCK_BAMBOO_FALL: any;
public static BLOCK_BAMBOO_HIT: any;
public static BLOCK_BAMBOO_PLACE: any;
public static BLOCK_BAMBOO_SAPLING_BREAK: any;
public static BLOCK_BAMBOO_SAPLING_HIT: any;
public static BLOCK_BAMBOO_SAPLING_PLACE: any;
public static BLOCK_BAMBOO_STEP: any;
public static BLOCK_BARREL_CLOSE: any;
public static BLOCK_BARREL_OPEN: any;
public static BLOCK_BEACON_ACTIVATE: any;
public static BLOCK_BEACON_AMBIENT: any;
public static BLOCK_BEACON_DEACTIVATE: any;
public static BLOCK_BEACON_POWER_SELECT: any;
public static BLOCK_BELL_RESONATE: any;
public static BLOCK_BELL_USE: any;
public static BLOCK_BLASTFURNACE_FIRE_CRACKLE: any;
public static BLOCK_BREWING_STAND_BREW: any;
public static BLOCK_BUBBLE_COLUMN_BUBBLE_POP: any;
public static BLOCK_BUBBLE_COLUMN_UPWARDS_AMBIENT: any;
public static BLOCK_BUBBLE_COLUMN_UPWARDS_INSIDE: any;
public static BLOCK_BUBBLE_COLUMN_WHIRLPOOL_AMBIENT: any;
public static BLOCK_BUBBLE_COLUMN_WHIRLPOOL_INSIDE: any;
public static BLOCK_CAMPFIRE_CRACKLE: any;
public static BLOCK_CHEST_CLOSE: any;
public static BLOCK_CHEST_LOCKED: any;
public static BLOCK_CHEST_OPEN: any;
public static BLOCK_CHORUS_FLOWER_DEATH: any;
public static BLOCK_CHORUS_FLOWER_GROW: any;
public static BLOCK_COMPARATOR_CLICK: any;
public static BLOCK_COMPOSTER_EMPTY: any;
public static BLOCK_COMPOSTER_FILL: any;
public static BLOCK_COMPOSTER_FILL_SUCCESS: any;
public static BLOCK_COMPOSTER_READY: any;
public static BLOCK_CONDUIT_ACTIVATE: any;
public static BLOCK_CONDUIT_AMBIENT: any;
public static BLOCK_CONDUIT_AMBIENT_SHORT: any;
public static BLOCK_CONDUIT_ATTACK_TARGET: any;
public static BLOCK_CONDUIT_DEACTIVATE: any;
public static BLOCK_CORAL_BLOCK_BREAK: any;
public static BLOCK_CORAL_BLOCK_FALL: any;
public static BLOCK_CORAL_BLOCK_HIT: any;
public static BLOCK_CORAL_BLOCK_PLACE: any;
public static BLOCK_CORAL_BLOCK_STEP: any;
public static BLOCK_CROP_BREAK: any;
public static BLOCK_DISPENSER_DISPENSE: any;
public static BLOCK_DISPENSER_FAIL: any;
public static BLOCK_DISPENSER_LAUNCH: any;
public static BLOCK_ENCHANTMENT_TABLE_USE: any;
public static BLOCK_ENDER_CHEST_CLOSE: any;
public static BLOCK_ENDER_CHEST_OPEN: any;
public static BLOCK_END_GATEWAY_SPAWN: any;
public static BLOCK_END_PORTAL_FRAME_FILL: any;
public static BLOCK_END_PORTAL_SPAWN: any;
public static BLOCK_FENCE_GATE_CLOSE: any;
public static BLOCK_FENCE_GATE_OPEN: any;
public static BLOCK_FIRE_AMBIENT: any;
public static BLOCK_FIRE_EXTINGUISH: any;
public static BLOCK_FURNACE_FIRE_CRACKLE: any;
public static BLOCK_GLASS_BREAK: any;
public static BLOCK_GLASS_FALL: any;
public static BLOCK_GLASS_HIT: any;
public static BLOCK_GLASS_PLACE: any;
public static BLOCK_GLASS_STEP: any;
public static BLOCK_GRASS_BREAK: any;
public static BLOCK_GRASS_FALL: any;
public static BLOCK_GRASS_HIT: any;
public static BLOCK_GRASS_PLACE: any;
public static BLOCK_GRASS_STEP: any;
public static BLOCK_GRAVEL_BREAK: any;
public static BLOCK_GRAVEL_FALL: any;
public static BLOCK_GRAVEL_HIT: any;
public static BLOCK_GRAVEL_PLACE: any;
public static BLOCK_GRAVEL_STEP: any;
public static BLOCK_GRINDSTONE_USE: any;
public static BLOCK_IRON_DOOR_CLOSE: any;
public static BLOCK_IRON_DOOR_OPEN: any;
public static BLOCK_IRON_TRAPDOOR_CLOSE: any;
public static BLOCK_IRON_TRAPDOOR_OPEN: any;
public static BLOCK_LADDER_BREAK: any;
public static BLOCK_LADDER_FALL: any;
public static BLOCK_LADDER_HIT: any;
public static BLOCK_LADDER_PLACE: any;
public static BLOCK_LADDER_STEP: any;
public static BLOCK_LANTERN_BREAK: any;
public static BLOCK_LANTERN_FALL: any;
public static BLOCK_LANTERN_HIT: any;
public static BLOCK_LANTERN_PLACE: any;
public static BLOCK_LANTERN_STEP: any;
public static BLOCK_LAVA_AMBIENT: any;
public static BLOCK_LAVA_EXTINGUISH: any;
public static BLOCK_LAVA_POP: any;
public static BLOCK_LEVER_CLICK: any;
public static BLOCK_LILY_PAD_PLACE: any;
public static BLOCK_METAL_BREAK: any;
public static BLOCK_METAL_FALL: any;
public static BLOCK_METAL_HIT: any;
public static BLOCK_METAL_PLACE: any;
public static BLOCK_METAL_PRESSURE_PLATE_CLICK_OFF: any;
public static BLOCK_METAL_PRESSURE_PLATE_CLICK_ON: any;
public static BLOCK_METAL_STEP: any;
public static BLOCK_NETHER_WART_BREAK: any;
public static BLOCK_NOTE_BLOCK_BANJO: any;
public static BLOCK_NOTE_BLOCK_BASEDRUM: any;
public static BLOCK_NOTE_BLOCK_BASS: any;
public static BLOCK_NOTE_BLOCK_BELL: any;
public static BLOCK_NOTE_BLOCK_BIT: any;
public static BLOCK_NOTE_BLOCK_CHIME: any;
public static BLOCK_NOTE_BLOCK_COW_BELL: any;
public static BLOCK_NOTE_BLOCK_DIDGERIDOO: any;
public static BLOCK_NOTE_BLOCK_FLUTE: any;
public static BLOCK_NOTE_BLOCK_GUITAR: any;
public static BLOCK_NOTE_BLOCK_HARP: any;
public static BLOCK_NOTE_BLOCK_HAT: any;
public static BLOCK_NOTE_BLOCK_IRON_XYLOPHONE: any;
public static BLOCK_NOTE_BLOCK_PLING: any;
public static BLOCK_NOTE_BLOCK_SNARE: any;
public static BLOCK_NOTE_BLOCK_XYLOPHONE: any;
public static BLOCK_PISTON_CONTRACT: any;
public static BLOCK_PISTON_EXTEND: any;
public static BLOCK_PORTAL_AMBIENT: any;
public static BLOCK_PORTAL_TRAVEL: any;
public static BLOCK_PORTAL_TRIGGER: any;
public static BLOCK_PUMPKIN_CARVE: any;
public static BLOCK_REDSTONE_TORCH_BURNOUT: any;
public static BLOCK_SAND_BREAK: any;
public static BLOCK_SAND_FALL: any;
public static BLOCK_SAND_HIT: any;
public static BLOCK_SAND_PLACE: any;
public static BLOCK_SAND_STEP: any;
public static BLOCK_SCAFFOLDING_BREAK: any;
public static BLOCK_SCAFFOLDING_FALL: any;
public static BLOCK_SCAFFOLDING_HIT: any;
public static BLOCK_SCAFFOLDING_PLACE: any;
public static BLOCK_SCAFFOLDING_STEP: any;
public static BLOCK_SHULKER_BOX_CLOSE: any;
public static BLOCK_SHULKER_BOX_OPEN: any;
public static BLOCK_SLIME_BLOCK_BREAK: any;
public static BLOCK_SLIME_BLOCK_FALL: any;
public static BLOCK_SLIME_BLOCK_HIT: any;
public static BLOCK_SLIME_BLOCK_PLACE: any;
public static BLOCK_SLIME_BLOCK_STEP: any;
public static BLOCK_SMOKER_SMOKE: any;
public static BLOCK_SNOW_BREAK: any;
public static BLOCK_SNOW_FALL: any;
public static BLOCK_SNOW_HIT: any;
public static BLOCK_SNOW_PLACE: any;
public static BLOCK_SNOW_STEP: any;
public static BLOCK_STONE_BREAK: any;
public static BLOCK_STONE_BUTTON_CLICK_OFF: any;
public static BLOCK_STONE_BUTTON_CLICK_ON: any;
public static BLOCK_STONE_FALL: any;
public static BLOCK_STONE_HIT: any;
public static BLOCK_STONE_PLACE: any;
public static BLOCK_STONE_PRESSURE_PLATE_CLICK_OFF: any;
public static BLOCK_STONE_PRESSURE_PLATE_CLICK_ON: any;
public static BLOCK_STONE_STEP: any;
public static BLOCK_SWEET_BERRY_BUSH_BREAK: any;
public static BLOCK_SWEET_BERRY_BUSH_PLACE: any;
public static BLOCK_TRIPWIRE_ATTACH: any;
public static BLOCK_TRIPWIRE_CLICK_OFF: any;
public static BLOCK_TRIPWIRE_CLICK_ON: any;
public static BLOCK_TRIPWIRE_DETACH: any;
public static BLOCK_WATER_AMBIENT: any;
public static BLOCK_WET_GRASS_BREAK: any;
public static BLOCK_WET_GRASS_FALL: any;
public static BLOCK_WET_GRASS_HIT: any;
public static BLOCK_WET_GRASS_PLACE: any;
public static BLOCK_WET_GRASS_STEP: any;
public static BLOCK_WOODEN_BUTTON_CLICK_OFF: any;
public static BLOCK_WOODEN_BUTTON_CLICK_ON: any;
public static BLOCK_WOODEN_DOOR_CLOSE: any;
public static BLOCK_WOODEN_DOOR_OPEN: any;
public static BLOCK_WOODEN_PRESSURE_PLATE_CLICK_OFF: any;
public static BLOCK_WOODEN_PRESSURE_PLATE_CLICK_ON: any;
public static BLOCK_WOODEN_TRAPDOOR_CLOSE: any;
public static BLOCK_WOODEN_TRAPDOOR_OPEN: any;
public static BLOCK_WOOD_BREAK: any;
public static BLOCK_WOOD_FALL: any;
public static BLOCK_WOOD_HIT: any;
public static BLOCK_WOOD_PLACE: any;
public static BLOCK_WOOD_STEP: any;
public static BLOCK_WOOL_BREAK: any;
public static BLOCK_WOOL_FALL: any;
public static BLOCK_WOOL_HIT: any;
public static BLOCK_WOOL_PLACE: any;
public static BLOCK_WOOL_STEP: any;
public static ENCHANT_THORNS_HIT: any;
public static ENTITY_ARMOR_STAND_BREAK: any;
public static ENTITY_ARMOR_STAND_FALL: any;
public static ENTITY_ARMOR_STAND_HIT: any;
public static ENTITY_ARMOR_STAND_PLACE: any;
public static ENTITY_ARROW_HIT: any;
public static ENTITY_ARROW_HIT_PLAYER: any;
public static ENTITY_ARROW_SHOOT: any;
public static ENTITY_BAT_AMBIENT: any;
public static ENTITY_BAT_DEATH: any;
public static ENTITY_BAT_HURT: any;
public static ENTITY_BAT_LOOP: any;
public static ENTITY_BAT_TAKEOFF: any;
public static ENTITY_BLAZE_AMBIENT: any;
public static ENTITY_BLAZE_BURN: any;
public static ENTITY_BLAZE_DEATH: any;
public static ENTITY_BLAZE_HURT: any;
public static ENTITY_BLAZE_SHOOT: any;
public static ENTITY_BOAT_PADDLE_LAND: any;
public static ENTITY_BOAT_PADDLE_WATER: any;
public static ENTITY_CAT_AMBIENT: any;
public static ENTITY_CAT_BEG_FOR_FOOD: any;
public static ENTITY_CAT_DEATH: any;
public static ENTITY_CAT_EAT: any;
public static ENTITY_CAT_HISS: any;
public static ENTITY_CAT_HURT: any;
public static ENTITY_CAT_PURR: any;
public static ENTITY_CAT_PURREOW: any;
public static ENTITY_CAT_STRAY_AMBIENT: any;
public static ENTITY_CHICKEN_AMBIENT: any;
public static ENTITY_CHICKEN_DEATH: any;
public static ENTITY_CHICKEN_EGG: any;
public static ENTITY_CHICKEN_HURT: any;
public static ENTITY_CHICKEN_STEP: any;
public static ENTITY_COD_AMBIENT: any;
public static ENTITY_COD_DEATH: any;
public static ENTITY_COD_FLOP: any;
public static ENTITY_COD_HURT: any;
public static ENTITY_COW_AMBIENT: any;
public static ENTITY_COW_DEATH: any;
public static ENTITY_COW_HURT: any;
public static ENTITY_COW_MILK: any;
public static ENTITY_COW_STEP: any;
public static ENTITY_CREEPER_DEATH: any;
public static ENTITY_CREEPER_HURT: any;
public static ENTITY_CREEPER_PRIMED: any;
public static ENTITY_DOLPHIN_AMBIENT: any;
public static ENTITY_DOLPHIN_AMBIENT_WATER: any;
public static ENTITY_DOLPHIN_ATTACK: any;
public static ENTITY_DOLPHIN_DEATH: any;
public static ENTITY_DOLPHIN_EAT: any;
public static ENTITY_DOLPHIN_HURT: any;
public static ENTITY_DOLPHIN_JUMP: any;
public static ENTITY_DOLPHIN_PLAY: any;
public static ENTITY_DOLPHIN_SPLASH: any;
public static ENTITY_DOLPHIN_SWIM: any;
public static ENTITY_DONKEY_AMBIENT: any;
public static ENTITY_DONKEY_ANGRY: any;
public static ENTITY_DONKEY_CHEST: any;
public static ENTITY_DONKEY_DEATH: any;
public static ENTITY_DONKEY_HURT: any;
public static ENTITY_DRAGON_FIREBALL_EXPLODE: any;
public static ENTITY_DROWNED_AMBIENT: any;
public static ENTITY_DROWNED_AMBIENT_WATER: any;
public static ENTITY_DROWNED_DEATH: any;
public static ENTITY_DROWNED_DEATH_WATER: any;
public static ENTITY_DROWNED_HURT: any;
public static ENTITY_DROWNED_HURT_WATER: any;
public static ENTITY_DROWNED_SHOOT: any;
public static ENTITY_DROWNED_STEP: any;
public static ENTITY_DROWNED_SWIM: any;
public static ENTITY_EGG_THROW: any;
public static ENTITY_ELDER_GUARDIAN_AMBIENT: any;
public static ENTITY_ELDER_GUARDIAN_AMBIENT_LAND: any;
public static ENTITY_ELDER_GUARDIAN_CURSE: any;
public static ENTITY_ELDER_GUARDIAN_DEATH: any;
public static ENTITY_ELDER_GUARDIAN_DEATH_LAND: any;
public static ENTITY_ELDER_GUARDIAN_FLOP: any;
public static ENTITY_ELDER_GUARDIAN_HURT: any;
public static ENTITY_ELDER_GUARDIAN_HURT_LAND: any;
public static ENTITY_ENDERMAN_AMBIENT: any;
public static ENTITY_ENDERMAN_DEATH: any;
public static ENTITY_ENDERMAN_HURT: any;
public static ENTITY_ENDERMAN_SCREAM: any;
public static ENTITY_ENDERMAN_STARE: any;
public static ENTITY_ENDERMAN_TELEPORT: any;
public static ENTITY_ENDERMITE_AMBIENT: any;
public static ENTITY_ENDERMITE_DEATH: any;
public static ENTITY_ENDERMITE_HURT: any;
public static ENTITY_ENDERMITE_STEP: any;
public static ENTITY_ENDER_DRAGON_AMBIENT: any;
public static ENTITY_ENDER_DRAGON_DEATH: any;
public static ENTITY_ENDER_DRAGON_FLAP: any;
public static ENTITY_ENDER_DRAGON_GROWL: any;
public static ENTITY_ENDER_DRAGON_HURT: any;
public static ENTITY_ENDER_DRAGON_SHOOT: any;
public static ENTITY_ENDER_EYE_DEATH: any;
public static ENTITY_ENDER_EYE_LAUNCH: any;
public static ENTITY_ENDER_PEARL_THROW: any;
public static ENTITY_EVOKER_AMBIENT: any;
public static ENTITY_EVOKER_CAST_SPELL: any;
public static ENTITY_EVOKER_CELEBRATE: any;
public static ENTITY_EVOKER_DEATH: any;
public static ENTITY_EVOKER_FANGS_ATTACK: any;
public static ENTITY_EVOKER_HURT: any;
public static ENTITY_EVOKER_PREPARE_ATTACK: any;
public static ENTITY_EVOKER_PREPARE_SUMMON: any;
public static ENTITY_EVOKER_PREPARE_WOLOLO: any;
public static ENTITY_EXPERIENCE_BOTTLE_THROW: any;
public static ENTITY_EXPERIENCE_ORB_PICKUP: any;
public static ENTITY_FIREWORK_ROCKET_BLAST: any;
public static ENTITY_FIREWORK_ROCKET_BLAST_FAR: any;
public static ENTITY_FIREWORK_ROCKET_LARGE_BLAST: any;
public static ENTITY_FIREWORK_ROCKET_LARGE_BLAST_FAR: any;
public static ENTITY_FIREWORK_ROCKET_LAUNCH: any;
public static ENTITY_FIREWORK_ROCKET_SHOOT: any;
public static ENTITY_FIREWORK_ROCKET_TWINKLE: any;
public static ENTITY_FIREWORK_ROCKET_TWINKLE_FAR: any;
public static ENTITY_FISHING_BOBBER_RETRIEVE: any;
public static ENTITY_FISHING_BOBBER_SPLASH: any;
public static ENTITY_FISHING_BOBBER_THROW: any;
public static ENTITY_FISH_SWIM: any;
public static ENTITY_FOX_AGGRO: any;
public static ENTITY_FOX_AMBIENT: any;
public static ENTITY_FOX_BITE: any;
public static ENTITY_FOX_DEATH: any;
public static ENTITY_FOX_EAT: any;
public static ENTITY_FOX_HURT: any;
public static ENTITY_FOX_SCREECH: any;
public static ENTITY_FOX_SLEEP: any;
public static ENTITY_FOX_SNIFF: any;
public static ENTITY_FOX_SPIT: any;
public static ENTITY_GENERIC_BIG_FALL: any;
public static ENTITY_GENERIC_BURN: any;
public static ENTITY_GENERIC_DEATH: any;
public static ENTITY_GENERIC_DRINK: any;
public static ENTITY_GENERIC_EAT: any;
public static ENTITY_GENERIC_EXPLODE: any;
public static ENTITY_GENERIC_EXTINGUISH_FIRE: any;
public static ENTITY_GENERIC_HURT: any;
public static ENTITY_GENERIC_SMALL_FALL: any;
public static ENTITY_GENERIC_SPLASH: any;
public static ENTITY_GENERIC_SWIM: any;
public static ENTITY_GHAST_AMBIENT: any;
public static ENTITY_GHAST_DEATH: any;
public static ENTITY_GHAST_HURT: any;
public static ENTITY_GHAST_SCREAM: any;
public static ENTITY_GHAST_SHOOT: any;
public static ENTITY_GHAST_WARN: any;
public static ENTITY_GUARDIAN_AMBIENT: any;
public static ENTITY_GUARDIAN_AMBIENT_LAND: any;
public static ENTITY_GUARDIAN_ATTACK: any;
public static ENTITY_GUARDIAN_DEATH: any;
public static ENTITY_GUARDIAN_DEATH_LAND: any;
public static ENTITY_GUARDIAN_FLOP: any;
public static ENTITY_GUARDIAN_HURT: any;
public static ENTITY_GUARDIAN_HURT_LAND: any;
public static ENTITY_HORSE_AMBIENT: any;
public static ENTITY_HORSE_ANGRY: any;
public static ENTITY_HORSE_ARMOR: any;
public static ENTITY_HORSE_BREATHE: any;
public static ENTITY_HORSE_DEATH: any;
public static ENTITY_HORSE_EAT: any;
public static ENTITY_HORSE_GALLOP: any;
public static ENTITY_HORSE_HURT: any;
public static ENTITY_HORSE_JUMP: any;
public static ENTITY_HORSE_LAND: any;
public static ENTITY_HORSE_SADDLE: any;
public static ENTITY_HORSE_STEP: any;
public static ENTITY_HORSE_STEP_WOOD: any;
public static ENTITY_HOSTILE_BIG_FALL: any;
public static ENTITY_HOSTILE_DEATH: any;
public static ENTITY_HOSTILE_HURT: any;
public static ENTITY_HOSTILE_SMALL_FALL: any;
public static ENTITY_HOSTILE_SPLASH: any;
public static ENTITY_HOSTILE_SWIM: any;
public static ENTITY_HUSK_AMBIENT: any;
public static ENTITY_HUSK_CONVERTED_TO_ZOMBIE: any;
public static ENTITY_HUSK_DEATH: any;
public static ENTITY_HUSK_HURT: any;
public static ENTITY_HUSK_STEP: any;
public static ENTITY_ILLUSIONER_AMBIENT: any;
public static ENTITY_ILLUSIONER_CAST_SPELL: any;
public static ENTITY_ILLUSIONER_DEATH: any;
public static ENTITY_ILLUSIONER_HURT: any;
public static ENTITY_ILLUSIONER_MIRROR_MOVE: any;
public static ENTITY_ILLUSIONER_PREPARE_BLINDNESS: any;
public static ENTITY_ILLUSIONER_PREPARE_MIRROR: any;
public static ENTITY_IRON_GOLEM_ATTACK: any;
public static ENTITY_IRON_GOLEM_DEATH: any;
public static ENTITY_IRON_GOLEM_HURT: any;
public static ENTITY_IRON_GOLEM_STEP: any;
public static ENTITY_ITEM_BREAK: any;
public static ENTITY_ITEM_FRAME_ADD_ITEM: any;
public static ENTITY_ITEM_FRAME_BREAK: any;
public static ENTITY_ITEM_FRAME_PLACE: any;
public static ENTITY_ITEM_FRAME_REMOVE_ITEM: any;
public static ENTITY_ITEM_FRAME_ROTATE_ITEM: any;
public static ENTITY_ITEM_PICKUP: any;
public static ENTITY_LEASH_KNOT_BREAK: any;
public static ENTITY_LEASH_KNOT_PLACE: any;
public static ENTITY_LIGHTNING_BOLT_IMPACT: any;
public static ENTITY_LIGHTNING_BOLT_THUNDER: any;
public static ENTITY_LINGERING_POTION_THROW: any;
public static ENTITY_LLAMA_AMBIENT: any;
public static ENTITY_LLAMA_ANGRY: any;
public static ENTITY_LLAMA_CHEST: any;
public static ENTITY_LLAMA_DEATH: any;
public static ENTITY_LLAMA_EAT: any;
public static ENTITY_LLAMA_HURT: any;
public static ENTITY_LLAMA_SPIT: any;
public static ENTITY_LLAMA_STEP: any;
public static ENTITY_LLAMA_SWAG: any;
public static ENTITY_MAGMA_CUBE_DEATH: any;
public static ENTITY_MAGMA_CUBE_DEATH_SMALL: any;
public static ENTITY_MAGMA_CUBE_HURT: any;
public static ENTITY_MAGMA_CUBE_HURT_SMALL: any;
public static ENTITY_MAGMA_CUBE_JUMP: any;
public static ENTITY_MAGMA_CUBE_SQUISH: any;
public static ENTITY_MAGMA_CUBE_SQUISH_SMALL: any;
public static ENTITY_MINECART_INSIDE: any;
public static ENTITY_MINECART_RIDING: any;
public static ENTITY_MOOSHROOM_CONVERT: any;
public static ENTITY_MOOSHROOM_EAT: any;
public static ENTITY_MOOSHROOM_MILK: any;
public static ENTITY_MOOSHROOM_SHEAR: any;
public static ENTITY_MOOSHROOM_SUSPICIOUS_MILK: any;
public static ENTITY_MULE_AMBIENT: any;
public static ENTITY_MULE_CHEST: any;
public static ENTITY_MULE_DEATH: any;
public static ENTITY_MULE_HURT: any;
public static ENTITY_OCELOT_AMBIENT: any;
public static ENTITY_OCELOT_DEATH: any;
public static ENTITY_OCELOT_HURT: any;
public static ENTITY_PAINTING_BREAK: any;
public static ENTITY_PAINTING_PLACE: any;
public static ENTITY_PANDA_AGGRESSIVE_AMBIENT: any;
public static ENTITY_PANDA_AMBIENT: any;
public static ENTITY_PANDA_BITE: any;
public static ENTITY_PANDA_CANT_BREED: any;
public static ENTITY_PANDA_DEATH: any;
public static ENTITY_PANDA_EAT: any;
public static ENTITY_PANDA_HURT: any;
public static ENTITY_PANDA_PRE_SNEEZE: any;
public static ENTITY_PANDA_SNEEZE: any;
public static ENTITY_PANDA_STEP: any;
public static ENTITY_PANDA_WORRIED_AMBIENT: any;
public static ENTITY_PARROT_AMBIENT: any;
public static ENTITY_PARROT_DEATH: any;
public static ENTITY_PARROT_EAT: any;
public static ENTITY_PARROT_FLY: any;
public static ENTITY_PARROT_HURT: any;
public static ENTITY_PARROT_IMITATE_BLAZE: any;
public static ENTITY_PARROT_IMITATE_CREEPER: any;
public static ENTITY_PARROT_IMITATE_DROWNED: any;
public static ENTITY_PARROT_IMITATE_ELDER_GUARDIAN: any;
public static ENTITY_PARROT_IMITATE_ENDERMAN: any;
public static ENTITY_PARROT_IMITATE_ENDERMITE: any;
public static ENTITY_PARROT_IMITATE_ENDER_DRAGON: any;
public static ENTITY_PARROT_IMITATE_EVOKER: any;
public static ENTITY_PARROT_IMITATE_GHAST: any;
public static ENTITY_PARROT_IMITATE_GUARDIAN: any;
public static ENTITY_PARROT_IMITATE_HUSK: any;
public static ENTITY_PARROT_IMITATE_ILLUSIONER: any;
public static ENTITY_PARROT_IMITATE_MAGMA_CUBE: any;
public static ENTITY_PARROT_IMITATE_PANDA: any;
public static ENTITY_PARROT_IMITATE_PHANTOM: any;
public static ENTITY_PARROT_IMITATE_PILLAGER: any;
public static ENTITY_PARROT_IMITATE_POLAR_BEAR: any;
public static ENTITY_PARROT_IMITATE_RAVAGER: any;
public static ENTITY_PARROT_IMITATE_SHULKER: any;
public static ENTITY_PARROT_IMITATE_SILVERFISH: any;
public static ENTITY_PARROT_IMITATE_SKELETON: any;
public static ENTITY_PARROT_IMITATE_SLIME: any;
public static ENTITY_PARROT_IMITATE_SPIDER: any;
public static ENTITY_PARROT_IMITATE_STRAY: any;
public static ENTITY_PARROT_IMITATE_VEX: any;
public static ENTITY_PARROT_IMITATE_VINDICATOR: any;
public static ENTITY_PARROT_IMITATE_WITCH: any;
public static ENTITY_PARROT_IMITATE_WITHER: any;
public static ENTITY_PARROT_IMITATE_WITHER_SKELETON: any;
public static ENTITY_PARROT_IMITATE_WOLF: any;
public static ENTITY_PARROT_IMITATE_ZOMBIE: any;
public static ENTITY_PARROT_IMITATE_ZOMBIE_PIGMAN: any;
public static ENTITY_PARROT_IMITATE_ZOMBIE_VILLAGER: any;
public static ENTITY_PARROT_STEP: any;
public static ENTITY_PHANTOM_AMBIENT: any;
public static ENTITY_PHANTOM_BITE: any;
public static ENTITY_PHANTOM_DEATH: any;
public static ENTITY_PHANTOM_FLAP: any;
public static ENTITY_PHANTOM_HURT: any;
public static ENTITY_PHANTOM_SWOOP: any;
public static ENTITY_PIG_AMBIENT: any;
public static ENTITY_PIG_DEATH: any;
public static ENTITY_PIG_HURT: any;
public static ENTITY_PIG_SADDLE: any;
public static ENTITY_PIG_STEP: any;
public static ENTITY_PILLAGER_AMBIENT: any;
public static ENTITY_PILLAGER_CELEBRATE: any;
public static ENTITY_PILLAGER_DEATH: any;
public static ENTITY_PILLAGER_HURT: any;
public static ENTITY_PLAYER_ATTACK_CRIT: any;
public static ENTITY_PLAYER_ATTACK_KNOCKBACK: any;
public static ENTITY_PLAYER_ATTACK_NODAMAGE: any;
public static ENTITY_PLAYER_ATTACK_STRONG: any;
public static ENTITY_PLAYER_ATTACK_SWEEP: any;
public static ENTITY_PLAYER_ATTACK_WEAK: any;
public static ENTITY_PLAYER_BIG_FALL: any;
public static ENTITY_PLAYER_BREATH: any;
public static ENTITY_PLAYER_BURP: any;
public static ENTITY_PLAYER_DEATH: any;
public static ENTITY_PLAYER_HURT: any;
public static ENTITY_PLAYER_HURT_DROWN: any;
public static ENTITY_PLAYER_HURT_ON_FIRE: any;
public static ENTITY_PLAYER_HURT_SWEET_BERRY_BUSH: any;
public static ENTITY_PLAYER_LEVELUP: any;
public static ENTITY_PLAYER_SMALL_FALL: any;
public static ENTITY_PLAYER_SPLASH: any;
public static ENTITY_PLAYER_SPLASH_HIGH_SPEED: any;
public static ENTITY_PLAYER_SWIM: any;
public static ENTITY_POLAR_BEAR_AMBIENT: any;
public static ENTITY_POLAR_BEAR_AMBIENT_BABY: any;
public static ENTITY_POLAR_BEAR_DEATH: any;
public static ENTITY_POLAR_BEAR_HURT: any;
public static ENTITY_POLAR_BEAR_STEP: any;
public static ENTITY_POLAR_BEAR_WARNING: any;
public static ENTITY_PUFFER_FISH_AMBIENT: any;
public static ENTITY_PUFFER_FISH_BLOW_OUT: any;
public static ENTITY_PUFFER_FISH_BLOW_UP: any;
public static ENTITY_PUFFER_FISH_DEATH: any;
public static ENTITY_PUFFER_FISH_FLOP: any;
public static ENTITY_PUFFER_FISH_HURT: any;
public static ENTITY_PUFFER_FISH_STING: any;
public static ENTITY_RABBIT_AMBIENT: any;
public static ENTITY_RABBIT_ATTACK: any;
public static ENTITY_RABBIT_DEATH: any;
public static ENTITY_RABBIT_HURT: any;
public static ENTITY_RABBIT_JUMP: any;
public static ENTITY_RAVAGER_AMBIENT: any;
public static ENTITY_RAVAGER_ATTACK: any;
public static ENTITY_RAVAGER_CELEBRATE: any;
public static ENTITY_RAVAGER_DEATH: any;
public static ENTITY_RAVAGER_HURT: any;
public static ENTITY_RAVAGER_ROAR: any;
public static ENTITY_RAVAGER_STEP: any;
public static ENTITY_RAVAGER_STUNNED: any;
public static ENTITY_SALMON_AMBIENT: any;
public static ENTITY_SALMON_DEATH: any;
public static ENTITY_SALMON_FLOP: any;
public static ENTITY_SALMON_HURT: any;
public static ENTITY_SHEEP_AMBIENT: any;
public static ENTITY_SHEEP_DEATH: any;
public static ENTITY_SHEEP_HURT: any;
public static ENTITY_SHEEP_SHEAR: any;
public static ENTITY_SHEEP_STEP: any;
public static ENTITY_SHULKER_AMBIENT: any;
public static ENTITY_SHULKER_BULLET_HIT: any;
public static ENTITY_SHULKER_BULLET_HURT: any;
public static ENTITY_SHULKER_CLOSE: any;
public static ENTITY_SHULKER_DEATH: any;
public static ENTITY_SHULKER_HURT: any;
public static ENTITY_SHULKER_HURT_CLOSED: any;
public static ENTITY_SHULKER_OPEN: any;
public static ENTITY_SHULKER_SHOOT: any;
public static ENTITY_SHULKER_TELEPORT: any;
public static ENTITY_SILVERFISH_AMBIENT: any;
public static ENTITY_SILVERFISH_DEATH: any;
public static ENTITY_SILVERFISH_HURT: any;
public static ENTITY_SILVERFISH_STEP: any;
public static ENTITY_SKELETON_AMBIENT: any;
public static ENTITY_SKELETON_DEATH: any;
public static ENTITY_SKELETON_HORSE_AMBIENT: any;
public static ENTITY_SKELETON_HORSE_AMBIENT_WATER: any;
public static ENTITY_SKELETON_HORSE_DEATH: any;
public static ENTITY_SKELETON_HORSE_GALLOP_WATER: any;
public static ENTITY_SKELETON_HORSE_HURT: any;
public static ENTITY_SKELETON_HORSE_JUMP_WATER: any;
public static ENTITY_SKELETON_HORSE_STEP_WATER: any;
public static ENTITY_SKELETON_HORSE_SWIM: any;
public static ENTITY_SKELETON_HURT: any;
public static ENTITY_SKELETON_SHOOT: any;
public static ENTITY_SKELETON_STEP: any;
public static ENTITY_SLIME_ATTACK: any;
public static ENTITY_SLIME_DEATH: any;
public static ENTITY_SLIME_DEATH_SMALL: any;
public static ENTITY_SLIME_HURT: any;
public static ENTITY_SLIME_HURT_SMALL: any;
public static ENTITY_SLIME_JUMP: any;
public static ENTITY_SLIME_JUMP_SMALL: any;
public static ENTITY_SLIME_SQUISH: any;
public static ENTITY_SLIME_SQUISH_SMALL: any;
public static ENTITY_SNOWBALL_THROW: any;
public static ENTITY_SNOW_GOLEM_AMBIENT: any;
public static ENTITY_SNOW_GOLEM_DEATH: any;
public static ENTITY_SNOW_GOLEM_HURT: any;
public static ENTITY_SNOW_GOLEM_SHOOT: any;
public static ENTITY_SPIDER_AMBIENT: any;
public static ENTITY_SPIDER_DEATH: any;
public static ENTITY_SPIDER_HURT: any;
public static ENTITY_SPIDER_STEP: any;
public static ENTITY_SPLASH_POTION_BREAK: any;
public static ENTITY_SPLASH_POTION_THROW: any;
public static ENTITY_SQUID_AMBIENT: any;
public static ENTITY_SQUID_DEATH: any;
public static ENTITY_SQUID_HURT: any;
public static ENTITY_SQUID_SQUIRT: any;
public static ENTITY_STRAY_AMBIENT: any;
public static ENTITY_STRAY_DEATH: any;
public static ENTITY_STRAY_HURT: any;
public static ENTITY_STRAY_STEP: any;
public static ENTITY_TNT_PRIMED: any;
public static ENTITY_TROPICAL_FISH_AMBIENT: any;
public static ENTITY_TROPICAL_FISH_DEATH: any;
public static ENTITY_TROPICAL_FISH_FLOP: any;
public static ENTITY_TROPICAL_FISH_HURT: any;
public static ENTITY_TURTLE_AMBIENT_LAND: any;
public static ENTITY_TURTLE_DEATH: any;
public static ENTITY_TURTLE_DEATH_BABY: any;
public static ENTITY_TURTLE_EGG_BREAK: any;
public static ENTITY_TURTLE_EGG_CRACK: any;
public static ENTITY_TURTLE_EGG_HATCH: any;
public static ENTITY_TURTLE_HURT: any;
public static ENTITY_TURTLE_HURT_BABY: any;
public static ENTITY_TURTLE_LAY_EGG: any;
public static ENTITY_TURTLE_SHAMBLE: any;
public static ENTITY_TURTLE_SHAMBLE_BABY: any;
public static ENTITY_TURTLE_SWIM: any;
public static ENTITY_VEX_AMBIENT: any;
public static ENTITY_VEX_CHARGE: any;
public static ENTITY_VEX_DEATH: any;
public static ENTITY_VEX_HURT: any;
public static ENTITY_VILLAGER_AMBIENT: any;
public static ENTITY_VILLAGER_CELEBRATE: any;
public static ENTITY_VILLAGER_DEATH: any;
public static ENTITY_VILLAGER_HURT: any;
public static ENTITY_VILLAGER_NO: any;
public static ENTITY_VILLAGER_TRADE: any;
public static ENTITY_VILLAGER_WORK_ARMORER: any;
public static ENTITY_VILLAGER_WORK_BUTCHER: any;
public static ENTITY_VILLAGER_WORK_CARTOGRAPHER: any;
public static ENTITY_VILLAGER_WORK_CLERIC: any;
public static ENTITY_VILLAGER_WORK_FARMER: any;
public static ENTITY_VILLAGER_WORK_FISHERMAN: any;
public static ENTITY_VILLAGER_WORK_FLETCHER: any;
public static ENTITY_VILLAGER_WORK_LEATHERWORKER: any;
public static ENTITY_VILLAGER_WORK_LIBRARIAN: any;
public static ENTITY_VILLAGER_WORK_MASON: any;
public static ENTITY_VILLAGER_WORK_SHEPHERD: any;
public static ENTITY_VILLAGER_WORK_TOOLSMITH: any;
public static ENTITY_VILLAGER_WORK_WEAPONSMITH: any;
public static ENTITY_VILLAGER_YES: any;
public static ENTITY_VINDICATOR_AMBIENT: any;
public static ENTITY_VINDICATOR_CELEBRATE: any;
public static ENTITY_VINDICATOR_DEATH: any;
public static ENTITY_VINDICATOR_HURT: any;
public static ENTITY_WANDERING_TRADER_AMBIENT: any;
public static ENTITY_WANDERING_TRADER_DEATH: any;
public static ENTITY_WANDERING_TRADER_DISAPPEARED: any;
public static ENTITY_WANDERING_TRADER_DRINK_MILK: any;
public static ENTITY_WANDERING_TRADER_DRINK_POTION: any;
public static ENTITY_WANDERING_TRADER_HURT: any;
public static ENTITY_WANDERING_TRADER_NO: any;
public static ENTITY_WANDERING_TRADER_REAPPEARED: any;
public static ENTITY_WANDERING_TRADER_TRADE: any;
public static ENTITY_WANDERING_TRADER_YES: any;
public static ENTITY_WITCH_AMBIENT: any;
public static ENTITY_WITCH_CELEBRATE: any;
public static ENTITY_WITCH_DEATH: any;
public static ENTITY_WITCH_DRINK: any;
public static ENTITY_WITCH_HURT: any;
public static ENTITY_WITCH_THROW: any;
public static ENTITY_WITHER_AMBIENT: any;
public static ENTITY_WITHER_BREAK_BLOCK: any;
public static ENTITY_WITHER_DEATH: any;
public static ENTITY_WITHER_HURT: any;
public static ENTITY_WITHER_SHOOT: any;
public static ENTITY_WITHER_SKELETON_AMBIENT: any;
public static ENTITY_WITHER_SKELETON_DEATH: any;
public static ENTITY_WITHER_SKELETON_HURT: any;
public static ENTITY_WITHER_SKELETON_STEP: any;
public static ENTITY_WITHER_SPAWN: any;
public static ENTITY_WOLF_AMBIENT: any;
public static ENTITY_WOLF_DEATH: any;
public static ENTITY_WOLF_GROWL: any;
public static ENTITY_WOLF_HOWL: any;
public static ENTITY_WOLF_HURT: any;
public static ENTITY_WOLF_PANT: any;
public static ENTITY_WOLF_SHAKE: any;
public static ENTITY_WOLF_STEP: any;
public static ENTITY_WOLF_WHINE: any;
public static ENTITY_ZOMBIE_AMBIENT: any;
public static ENTITY_ZOMBIE_ATTACK_IRON_DOOR: any;
public static ENTITY_ZOMBIE_ATTACK_WOODEN_DOOR: any;
public static ENTITY_ZOMBIE_BREAK_WOODEN_DOOR: any;
public static ENTITY_ZOMBIE_CONVERTED_TO_DROWNED: any;
public static ENTITY_ZOMBIE_DEATH: any;
public static ENTITY_ZOMBIE_DESTROY_EGG: any;
public static ENTITY_ZOMBIE_HORSE_AMBIENT: any;
public static ENTITY_ZOMBIE_HORSE_DEATH: any;
public static ENTITY_ZOMBIE_HORSE_HURT: any;
public static ENTITY_ZOMBIE_HURT: any;
public static ENTITY_ZOMBIE_INFECT: any;
public static ENTITY_ZOMBIE_PIGMAN_AMBIENT: any;
public static ENTITY_ZOMBIE_PIGMAN_ANGRY: any;
public static ENTITY_ZOMBIE_PIGMAN_DEATH: any;
public static ENTITY_ZOMBIE_PIGMAN_HURT: any;
public static ENTITY_ZOMBIE_STEP: any;
public static ENTITY_ZOMBIE_VILLAGER_AMBIENT: any;
public static ENTITY_ZOMBIE_VILLAGER_CONVERTED: any;
public static ENTITY_ZOMBIE_VILLAGER_CURE: any;
public static ENTITY_ZOMBIE_VILLAGER_DEATH: any;
public static ENTITY_ZOMBIE_VILLAGER_HURT: any;
public static ENTITY_ZOMBIE_VILLAGER_STEP: any;
public static EVENT_RAID_HORN: any;
public static ITEM_ARMOR_EQUIP_CHAIN: any;
public static ITEM_ARMOR_EQUIP_DIAMOND: any;
public static ITEM_ARMOR_EQUIP_ELYTRA: any;
public static ITEM_ARMOR_EQUIP_GENERIC: any;
public static ITEM_ARMOR_EQUIP_GOLD: any;
public static ITEM_ARMOR_EQUIP_IRON: any;
public static ITEM_ARMOR_EQUIP_LEATHER: any;
public static ITEM_ARMOR_EQUIP_TURTLE: any;
public static ITEM_AXE_STRIP: any;
public static ITEM_BOOK_PAGE_TURN: any;
public static ITEM_BOOK_PUT: any;
public static ITEM_BOTTLE_EMPTY: any;
public static ITEM_BOTTLE_FILL: any;
public static ITEM_BOTTLE_FILL_DRAGONBREATH: any;
public static ITEM_BUCKET_EMPTY: any;
public static ITEM_BUCKET_EMPTY_FISH: any;
public static ITEM_BUCKET_EMPTY_LAVA: any;
public static ITEM_BUCKET_FILL: any;
public static ITEM_BUCKET_FILL_FISH: any;
public static ITEM_BUCKET_FILL_LAVA: any;
public static ITEM_CHORUS_FRUIT_TELEPORT: any;
public static ITEM_CROP_PLANT: any;
public static ITEM_CROSSBOW_HIT: any;
public static ITEM_CROSSBOW_LOADING_END: any;
public static ITEM_CROSSBOW_LOADING_MIDDLE: any;
public static ITEM_CROSSBOW_LOADING_START: any;
public static ITEM_CROSSBOW_QUICK_CHARGE_1: any;
public static ITEM_CROSSBOW_QUICK_CHARGE_2: any;
public static ITEM_CROSSBOW_QUICK_CHARGE_3: any;
public static ITEM_CROSSBOW_SHOOT: any;
public static ITEM_ELYTRA_FLYING: any;
public static ITEM_FIRECHARGE_USE: any;
public static ITEM_FLINTANDSTEEL_USE: any;
public static ITEM_HOE_TILL: any;
public static ITEM_NETHER_WART_PLANT: any;
public static ITEM_SHIELD_BLOCK: any;
public static ITEM_SHIELD_BREAK: any;
public static ITEM_SHOVEL_FLATTEN: any;
public static ITEM_SWEET_BERRIES_PICK_FROM_BUSH: any;
public static ITEM_TOTEM_USE: any;
public static ITEM_TRIDENT_HIT: any;
public static ITEM_TRIDENT_HIT_GROUND: any;
public static ITEM_TRIDENT_RETURN: any;
public static ITEM_TRIDENT_RIPTIDE_1: any;
public static ITEM_TRIDENT_RIPTIDE_2: any;
public static ITEM_TRIDENT_RIPTIDE_3: any;
public static ITEM_TRIDENT_THROW: any;
public static ITEM_TRIDENT_THUNDER: any;
public static MUSIC_CREATIVE: any;
public static MUSIC_CREDITS: any;
public static MUSIC_DISC_11: any;
public static MUSIC_DISC_13: any;
public static MUSIC_DISC_BLOCKS: any;
public static MUSIC_DISC_CAT: any;
public static MUSIC_DISC_CHIRP: any;
public static MUSIC_DISC_FAR: any;
public static MUSIC_DISC_MALL: any;
public static MUSIC_DISC_MELLOHI: any;
public static MUSIC_DISC_STAL: any;
public static MUSIC_DISC_STRAD: any;
public static MUSIC_DISC_WAIT: any;
public static MUSIC_DISC_WARD: any;
public static MUSIC_DRAGON: any;
public static MUSIC_END: any;
public static MUSIC_GAME: any;
public static MUSIC_MENU: any;
public static MUSIC_NETHER: any;
public static MUSIC_UNDER_WATER: any;
public static UI_BUTTON_CLICK: any;
public static UI_CARTOGRAPHY_TABLE_TAKE_RESULT: any;
public static UI_LOOM_SELECT_PATTERN: any;
public static UI_LOOM_TAKE_RESULT: any;
public static UI_STONECUTTER_SELECT_RECIPE: any;
public static UI_STONECUTTER_TAKE_RESULT: any;
public static UI_TOAST_CHALLENGE_COMPLETE: any;
public static UI_TOAST_IN: any;
public static UI_TOAST_OUT: any;
public static WEATHER_RAIN: any;
public static WEATHER_RAIN_ABOVE: any;
public static values(): any;
public static valueOf(name: any): any;
}
}
}

View File

@@ -1,18 +0,0 @@
declare namespace org {
namespace bukkit {
class SoundCategory {
public static MASTER: org.bukkit.SoundCategory;
public static MUSIC: org.bukkit.SoundCategory;
public static RECORDS: org.bukkit.SoundCategory;
public static WEATHER: org.bukkit.SoundCategory;
public static BLOCKS: org.bukkit.SoundCategory;
public static HOSTILE: org.bukkit.SoundCategory;
public static NEUTRAL: org.bukkit.SoundCategory;
public static PLAYERS: org.bukkit.SoundCategory;
public static AMBIENT: org.bukkit.SoundCategory;
public static VOICE: org.bukkit.SoundCategory;
public static values(): org.bukkit.SoundCategory[];
public static valueOf(name: string): org.bukkit.SoundCategory;
}
}
}

View File

@@ -1,14 +0,0 @@
declare namespace org {
namespace bukkit {
namespace Statistic {
class Type {
public static UNTYPED: org.bukkit.Statistic.Type;
public static ITEM: org.bukkit.Statistic.Type;
public static BLOCK: org.bukkit.Statistic.Type;
public static ENTITY: org.bukkit.Statistic.Type;
public static values(): org.bukkit.Statistic.Type[];
public static valueOf(name: string): org.bukkit.Statistic.Type;
}
}
}
}

View File

@@ -1,107 +0,0 @@
declare namespace org {
namespace bukkit {
class Statistic {
public static DAMAGE_DEALT: org.bukkit.Statistic;
public static DAMAGE_TAKEN: org.bukkit.Statistic;
public static DEATHS: org.bukkit.Statistic;
public static MOB_KILLS: org.bukkit.Statistic;
public static PLAYER_KILLS: org.bukkit.Statistic;
public static FISH_CAUGHT: org.bukkit.Statistic;
public static ANIMALS_BRED: org.bukkit.Statistic;
public static LEAVE_GAME: org.bukkit.Statistic;
public static JUMP: org.bukkit.Statistic;
public static DROP_COUNT: org.bukkit.Statistic;
public static DROP: org.bukkit.Statistic;
public static PICKUP: org.bukkit.Statistic;
public static PLAY_ONE_MINUTE: org.bukkit.Statistic;
public static WALK_ONE_CM: org.bukkit.Statistic;
public static WALK_ON_WATER_ONE_CM: org.bukkit.Statistic;
public static FALL_ONE_CM: org.bukkit.Statistic;
public static SNEAK_TIME: org.bukkit.Statistic;
public static CLIMB_ONE_CM: org.bukkit.Statistic;
public static FLY_ONE_CM: org.bukkit.Statistic;
public static WALK_UNDER_WATER_ONE_CM: org.bukkit.Statistic;
public static MINECART_ONE_CM: org.bukkit.Statistic;
public static BOAT_ONE_CM: org.bukkit.Statistic;
public static PIG_ONE_CM: org.bukkit.Statistic;
public static HORSE_ONE_CM: org.bukkit.Statistic;
public static SPRINT_ONE_CM: org.bukkit.Statistic;
public static CROUCH_ONE_CM: org.bukkit.Statistic;
public static AVIATE_ONE_CM: org.bukkit.Statistic;
public static MINE_BLOCK: org.bukkit.Statistic;
public static USE_ITEM: org.bukkit.Statistic;
public static BREAK_ITEM: org.bukkit.Statistic;
public static CRAFT_ITEM: org.bukkit.Statistic;
public static KILL_ENTITY: org.bukkit.Statistic;
public static ENTITY_KILLED_BY: org.bukkit.Statistic;
public static TIME_SINCE_DEATH: org.bukkit.Statistic;
public static TALKED_TO_VILLAGER: org.bukkit.Statistic;
public static TRADED_WITH_VILLAGER: org.bukkit.Statistic;
public static CAKE_SLICES_EATEN: org.bukkit.Statistic;
public static CAULDRON_FILLED: org.bukkit.Statistic;
public static CAULDRON_USED: org.bukkit.Statistic;
public static ARMOR_CLEANED: org.bukkit.Statistic;
public static BANNER_CLEANED: org.bukkit.Statistic;
public static BREWINGSTAND_INTERACTION: org.bukkit.Statistic;
public static BEACON_INTERACTION: org.bukkit.Statistic;
public static DROPPER_INSPECTED: org.bukkit.Statistic;
public static HOPPER_INSPECTED: org.bukkit.Statistic;
public static DISPENSER_INSPECTED: org.bukkit.Statistic;
public static NOTEBLOCK_PLAYED: org.bukkit.Statistic;
public static NOTEBLOCK_TUNED: org.bukkit.Statistic;
public static FLOWER_POTTED: org.bukkit.Statistic;
public static TRAPPED_CHEST_TRIGGERED: org.bukkit.Statistic;
public static ENDERCHEST_OPENED: org.bukkit.Statistic;
public static ITEM_ENCHANTED: org.bukkit.Statistic;
public static RECORD_PLAYED: org.bukkit.Statistic;
public static FURNACE_INTERACTION: org.bukkit.Statistic;
public static CRAFTING_TABLE_INTERACTION: org.bukkit.Statistic;
public static CHEST_OPENED: org.bukkit.Statistic;
public static SLEEP_IN_BED: org.bukkit.Statistic;
public static SHULKER_BOX_OPENED: org.bukkit.Statistic;
public static TIME_SINCE_REST: org.bukkit.Statistic;
public static SWIM_ONE_CM: org.bukkit.Statistic;
public static DAMAGE_DEALT_ABSORBED: org.bukkit.Statistic;
public static DAMAGE_DEALT_RESISTED: org.bukkit.Statistic;
public static DAMAGE_BLOCKED_BY_SHIELD: org.bukkit.Statistic;
public static DAMAGE_ABSORBED: org.bukkit.Statistic;
public static DAMAGE_RESISTED: org.bukkit.Statistic;
public static CLEAN_SHULKER_BOX: org.bukkit.Statistic;
public static OPEN_BARREL: org.bukkit.Statistic;
public static INTERACT_WITH_BLAST_FURNACE: org.bukkit.Statistic;
public static INTERACT_WITH_SMOKER: org.bukkit.Statistic;
public static INTERACT_WITH_LECTERN: org.bukkit.Statistic;
public static INTERACT_WITH_CAMPFIRE: org.bukkit.Statistic;
public static INTERACT_WITH_CARTOGRAPHY_TABLE: org.bukkit.Statistic;
public static INTERACT_WITH_LOOM: org.bukkit.Statistic;
public static INTERACT_WITH_STONECUTTER: org.bukkit.Statistic;
public static BELL_RING: org.bukkit.Statistic;
public static RAID_TRIGGER: org.bukkit.Statistic;
public static RAID_WIN: org.bukkit.Statistic;
public static values(): org.bukkit.Statistic[];
public static valueOf(name: string): org.bukkit.Statistic;
/**
* Gets the type of this statistic.
*/
public getType(): org.bukkit.Statistic.Type;
/**
* Checks if this is a substatistic.
* <p>
* A substatistic exists en masse for each block, item, or entitytype, depending on
* {@link #getType()}.
* <p>
* This is a redundant method and equivalent to checking
* <code>getType() != Type.UNTYPED</code>
*/
public isSubstatistic(): boolean;
/**
* Checks if this is a substatistic dealing with blocks.
* <p>
* This is a redundant method and equivalent to checking
* <code>getType() == Type.BLOCK</code>
*/
public isBlock(): boolean;
public getKey(): org.bukkit.NamespacedKey;
}
}
}

View File

@@ -1,38 +0,0 @@
declare namespace org {
namespace bukkit {
class StructureType {
public static MINESHAFT: org.bukkit.StructureType;
public static VILLAGE: org.bukkit.StructureType;
public static NETHER_FORTRESS: org.bukkit.StructureType;
public static STRONGHOLD: org.bukkit.StructureType;
public static JUNGLE_PYRAMID: org.bukkit.StructureType;
public static OCEAN_RUIN: org.bukkit.StructureType;
public static DESERT_PYRAMID: org.bukkit.StructureType;
public static IGLOO: org.bukkit.StructureType;
public static SWAMP_HUT: org.bukkit.StructureType;
public static OCEAN_MONUMENT: org.bukkit.StructureType;
public static END_CITY: org.bukkit.StructureType;
public static WOODLAND_MANSION: org.bukkit.StructureType;
public static BURIED_TREASURE: org.bukkit.StructureType;
public static SHIPWRECK: org.bukkit.StructureType;
public static PILLAGER_OUTPOST: org.bukkit.StructureType;
/**
* Get the name of this structure. This is case-sensitive when used in
* commands.
*/
public getName(): string;
/**
* Get the {@link org.bukkit.map.MapCursor.Type} that this structure can use on maps. If
* this is null, this structure will not appear on explorer maps.
*/
public getMapIcon(): org.bukkit.map.MapCursor.Type;
public equals(other: any): boolean;
public hashCode(): number;
public toString(): string;
/**
* Get all registered {@link StructureType}s.
*/
public static getStructureTypes(): Map<any, any> /*java.util.Map*/;
}
}
}

View File

@@ -1,70 +0,0 @@
declare namespace org {
namespace bukkit {
class Tag {
public static REGISTRY_BLOCKS: string;
public static WOOL: org.bukkit.Tag;
public static PLANKS: org.bukkit.Tag;
public static STONE_BRICKS: org.bukkit.Tag;
public static WOODEN_BUTTONS: org.bukkit.Tag;
public static BUTTONS: org.bukkit.Tag;
public static CARPETS: org.bukkit.Tag;
public static WOODEN_DOORS: org.bukkit.Tag;
public static WOODEN_STAIRS: org.bukkit.Tag;
public static WOODEN_SLABS: org.bukkit.Tag;
public static WOODEN_FENCES: org.bukkit.Tag;
public static WOODEN_PRESSURE_PLATES: org.bukkit.Tag;
public static WOODEN_TRAPDOORS: org.bukkit.Tag;
public static DOORS: org.bukkit.Tag;
public static SAPLINGS: org.bukkit.Tag;
public static LOGS: org.bukkit.Tag;
public static DARK_OAK_LOGS: org.bukkit.Tag;
public static OAK_LOGS: org.bukkit.Tag;
public static BIRCH_LOGS: org.bukkit.Tag;
public static ACACIA_LOGS: org.bukkit.Tag;
public static JUNGLE_LOGS: org.bukkit.Tag;
public static SPRUCE_LOGS: org.bukkit.Tag;
public static BANNERS: org.bukkit.Tag;
public static SAND: org.bukkit.Tag;
public static STAIRS: org.bukkit.Tag;
public static SLABS: org.bukkit.Tag;
public static WALLS: org.bukkit.Tag;
public static ANVIL: org.bukkit.Tag;
public static RAILS: org.bukkit.Tag;
public static LEAVES: org.bukkit.Tag;
public static TRAPDOORS: org.bukkit.Tag;
public static FLOWER_POTS: org.bukkit.Tag;
public static SMALL_FLOWERS: org.bukkit.Tag;
public static BEDS: org.bukkit.Tag;
public static FENCES: org.bukkit.Tag;
public static ENDERMAN_HOLDABLE: org.bukkit.Tag;
public static ICE: org.bukkit.Tag;
public static VALID_SPAWN: org.bukkit.Tag;
public static IMPERMEABLE: org.bukkit.Tag;
public static UNDERWATER_BONEMEALS: org.bukkit.Tag;
public static CORAL_BLOCKS: org.bukkit.Tag;
public static WALL_CORALS: org.bukkit.Tag;
public static CORAL_PLANTS: org.bukkit.Tag;
public static CORALS: org.bukkit.Tag;
public static BAMBOO_PLANTABLE_ON: org.bukkit.Tag;
public static DIRT_LIKE: org.bukkit.Tag;
public static STANDING_SIGNS: org.bukkit.Tag;
public static WALL_SIGNS: org.bukkit.Tag;
public static SIGNS: org.bukkit.Tag;
public static REGISTRY_ITEMS: string;
public static ITEMS_BANNERS: org.bukkit.Tag;
public static ITEMS_BOATS: org.bukkit.Tag;
public static ITEMS_FISHES: org.bukkit.Tag;
public static ITEMS_MUSIC_DISCS: org.bukkit.Tag;
public static ITEMS_COALS: org.bukkit.Tag;
public static ITEMS_ARROWS: org.bukkit.Tag;
/**
* Returns whether or not this tag has an entry for the specified item.
*/
public isTagged(item: org.bukkit.Keyed): boolean;
/**
* Gets an immutable set of all tagged items.
*/
public getValues(): any[] /*java.util.Set*/;
}
}
}

View File

@@ -1,22 +0,0 @@
declare namespace org {
namespace bukkit {
class TreeSpecies {
public static GENERIC: org.bukkit.TreeSpecies;
public static REDWOOD: org.bukkit.TreeSpecies;
public static BIRCH: org.bukkit.TreeSpecies;
public static JUNGLE: org.bukkit.TreeSpecies;
public static ACACIA: org.bukkit.TreeSpecies;
public static DARK_OAK: org.bukkit.TreeSpecies;
public static values(): org.bukkit.TreeSpecies[];
public static valueOf(name: string): org.bukkit.TreeSpecies;
/**
* Gets the associated data value representing this species
*/
public getData(): number;
/**
* Gets the TreeSpecies with the given data value
*/
public static getByData(data: number): org.bukkit.TreeSpecies;
}
}
}

View File

@@ -1,25 +0,0 @@
declare namespace org {
namespace bukkit {
class TreeType {
public static TREE: org.bukkit.TreeType;
public static BIG_TREE: org.bukkit.TreeType;
public static REDWOOD: org.bukkit.TreeType;
public static TALL_REDWOOD: org.bukkit.TreeType;
public static BIRCH: org.bukkit.TreeType;
public static JUNGLE: org.bukkit.TreeType;
public static SMALL_JUNGLE: org.bukkit.TreeType;
public static COCOA_TREE: org.bukkit.TreeType;
public static JUNGLE_BUSH: org.bukkit.TreeType;
public static RED_MUSHROOM: org.bukkit.TreeType;
public static BROWN_MUSHROOM: org.bukkit.TreeType;
public static SWAMP: org.bukkit.TreeType;
public static ACACIA: org.bukkit.TreeType;
public static DARK_OAK: org.bukkit.TreeType;
public static MEGA_REDWOOD: org.bukkit.TreeType;
public static TALL_BIRCH: org.bukkit.TreeType;
public static CHORUS_PLANT: org.bukkit.TreeType;
public static values(): org.bukkit.TreeType[];
public static valueOf(name: string): org.bukkit.TreeType;
}
}
}

Some files were not shown because too many files have changed in this diff Show More