kotori-plugin-minecraft 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @Package kotori-plugin-minecraft
3
- * @Version 1.0.2
3
+ * @Version 1.0.3
4
4
  * @Author Hotaru <me@hotaru.icu>
5
5
  * @Copyright 2024-2025 Hotaru. All rights reserved.
6
- * @License BAN-ZHINESE-USING
6
+ * @License GPL-3.0
7
7
  * @Link https://github.com/kotorijs/kotori
8
- * @Date 2025/8/4 17:30:09
8
+ * @Date 2026/2/14 15:09:43
9
9
  */
10
10
  "use strict";
11
11
  var __defProp = Object.defineProperty;
@@ -97,12 +97,6 @@ const mcvSchema1 = import_kotori_bot.Tsu.Object({
97
97
  })
98
98
  )
99
99
  });
100
- const mcvSchema2 = import_kotori_bot.Tsu.Array(
101
- import_kotori_bot.Tsu.Object({
102
- name: import_kotori_bot.Tsu.String(),
103
- releaseDate: import_kotori_bot.Tsu.String().optional()
104
- })
105
- );
106
100
  function main(ctx) {
107
101
  ctx.command("motd <ip> [port:number=25565] - minecraft.descr.motd").action(async (data, session) => {
108
102
  const res = motdSchema.parse(
@@ -122,7 +116,7 @@ function main(ctx) {
122
116
  const params = [ip, port, location, motd, gamemode, agreement, version, online, max, delay];
123
117
  return session.format("minecraft.msg.motdbe", params);
124
118
  });
125
- ctx.command("mcskin <name>").action(async (data, session) => {
119
+ ctx.command("mcskin <name> - minecraft.descr.mcskin").action(async (data, session) => {
126
120
  const res = mcskinSchema.parse(await ctx.http.get("https://api.hotaru.icu/api/mcskin", { name: data.args[0] }));
127
121
  if (!res.data) return session.format("minecraft.msg.mcskin.fail", [data.args[0]]);
128
122
  return session.format("minecraft.msg.mcskin", [
@@ -131,17 +125,15 @@ function main(ctx) {
131
125
  res.data.cape ? import_kotori_bot.Messages.image(res.data.cape) : "",
132
126
  res.data.avatar ? import_kotori_bot.Messages.image(`base64://${res.data.avatar.substring(22)}`) : ""
133
127
  ]);
134
- }).help("minecraft.descr.mcskin");
135
- ctx.command("mcv").action(async (_, session) => {
128
+ });
129
+ ctx.command("mcv - minecraft.descr.mcv").action(async (_, session) => {
136
130
  const res = mcvSchema1.parse(await ctx.http.get("https://piston-meta.mojang.com/mc/game/version_manifest.json"));
137
- const res2 = mcvSchema2.parse(await ctx.http.get("https://bugs.mojang.com/rest/api/2/project/10200/versions"));
138
131
  const { release, snapshot } = res.latest;
139
132
  const releaseDate = session.i18n.date(new Date(res.versions.find((el) => el.id === release)?.releaseTime ?? 0));
140
133
  const snapshotDate = session.i18n.date(new Date(res.versions.find((el) => el.id === snapshot)?.releaseTime ?? 0));
141
- const { name: mcbe, releaseDate: mcbeDate } = res2.find((el) => !!el.releaseDate) ?? {};
142
- const params = [release, releaseDate, snapshot, snapshotDate, mcbe, session.i18n.date(new Date(mcbeDate ?? 0))];
134
+ const params = [release, releaseDate, snapshot, snapshotDate, "", ""];
143
135
  return session.format("minecraft.msg.mcv", params);
144
- }).help("minecraft.descr.mcv");
136
+ });
145
137
  }
146
138
  // Annotate the CommonJS export names for ESM import in node:
147
139
  0 && (module.exports = {
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @Package kotori-plugin-minecraft
3
- * @Version 1.0.2
3
+ * @Version 1.0.3
4
4
  * @Author Hotaru <me@hotaru.icu>
5
5
  * @Copyright 2024-2025 Hotaru. All rights reserved.
6
- * @License BAN-ZHINESE-USING
6
+ * @License GPL-3.0
7
7
  * @Link https://github.com/kotorijs/kotori
8
- * @Date 2025/8/4 17:30:09
8
+ * @Date 2026/2/14 15:09:43
9
9
  */
10
10
  "use strict";
11
11
  var __create = Object.create;
package/lib/utils/java.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * @Package kotori-plugin-minecraft
3
- * @Version 1.0.2
3
+ * @Version 1.0.3
4
4
  * @Author Hotaru <me@hotaru.icu>
5
5
  * @Copyright 2024-2025 Hotaru. All rights reserved.
6
- * @License BAN-ZHINESE-USING
6
+ * @License GPL-3.0
7
7
  * @Link https://github.com/kotorijs/kotori
8
- * @Date 2025/8/4 17:30:09
8
+ * @Date 2026/2/14 15:09:43
9
9
  */
10
10
  "use strict";
11
11
  var __create = Object.create;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kotori-plugin-minecraft",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Plugin Of For Minecraft!",
5
5
  "main": "lib/index.js",
6
6
  "keywords": [
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "author": "Hotaru <me@hotaru.icu>",
19
19
  "peerDependencies": {
20
- "kotori-bot": "^1.7.1"
20
+ "kotori-bot": "^1.7.3"
21
21
  },
22
22
  "kotori": {
23
23
  "meta": {