Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ShirasawaSama committed Apr 10, 2023
1 parent 35c0b33 commit 8e9e556
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/downloadMinecraftLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (!existsSync('languages/minecraft')) mkdirSync('languages/minecraft')
const supportLanguages = ['zh_cn']
fetchVersion().then(body => get<{ objects: Record<string, { hash: string }> }>(body.assetIndex.url).then(body => supportLanguages.forEach(it => {
const { hash } = body.objects[`minecraft/lang/${it}.json`]
require('nugget')(`http://resources.download.minecraft.net/${hash.slice(0, 2)}/${hash}`, { target: `languages/minecraft/${it}.json` }, err => {
require('nugget')(`https://resources.download.minecraft.net/${hash.slice(0, 2)}/${hash}`, { target: `languages/minecraft/${it}.json` }, err => {
if (err) exit(err)
console.log('Successfully downloaded:', it + '.json')
})
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cn/apisium/nekomaid/builtin/PlayerList.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static void init(NekoMaid main) {
String msg = ((String) it[1]).isEmpty() ? null : (String) it[1];
main.getServer().getBanList(BanList.Type.NAME).addBan((String) it[0], msg, null, "NekoMaid").save();
Player p = Bukkit.getPlayerExact((String) it[0]);
if (p != null) p.kickPlayer(msg);
if (p != null) main.getServer().getScheduler().runTask(main, () -> p.kickPlayer(msg));
main.getLogger().info("Banned " + it[0] + ": " + (msg == null ? "" : msg));
} catch (Throwable e) {
e.printStackTrace();
Expand Down

0 comments on commit 8e9e556

Please sign in to comment.