Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #649 from book000/fix/update-versions.json
Browse files Browse the repository at this point in the history
fix: versions.jsonの更新
  • Loading branch information
book000 authored Jan 22, 2022
2 parents f1de303 + beac198 commit c57d823
Show file tree
Hide file tree
Showing 2 changed files with 8,241 additions and 375 deletions.
11 changes: 6 additions & 5 deletions src/main/java/com/jaoafa/mymaid4/event/Event_ViaVerCheck.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* jaoLicense
*
* Copyright (c) 2021 jao Minecraft Server
* Copyright (c) 2022 jao Minecraft Server
*
* The following license applies to this project: jaoLicense
*
Expand Down Expand Up @@ -50,6 +50,7 @@ public void run() {
int i = Via.getAPI().getPlayerVersion(player.getUniqueId());
String ver = String.valueOf(i);

// https://gitlab.bixilon.de/bixilon/minosoft/-/blob/master/src/main/resources/assets/minosoft/mapping/versions.json
InputStream is = getClass().getResourceAsStream("/versions.json");
if (is == null) {
return;
Expand All @@ -73,9 +74,9 @@ public void run() {
return;
}

String version = obj.getString(ver);
String version = obj.getJSONObject(ver).getString("name");

if (!version.equals("1.16.5")) {
if (!version.equals("1.18.1")) {
player.sendMessage(Component.text().append(
Component.text("[VersionChecker]"),
Component.space(),
Expand All @@ -84,13 +85,13 @@ public void run() {
player.sendMessage(Component.text().append(
Component.text("[VersionChecker]"),
Component.space(),
Component.text("サーババージョンは1.16.5のため、", NamedTextColor.AQUA),
Component.text("サーババージョンは1.18.1のため、", NamedTextColor.AQUA),
Component.text("一部のブロック・機能は利用できません。", NamedTextColor.RED)
).build());
player.sendMessage(Component.text().append(
Component.text("[VersionChecker]"),
Component.space(),
Component.text("クライアントバージョンを「1.16.5」にすることを強くお勧めします。", NamedTextColor.AQUA)
Component.text("クライアントバージョンを「1.18.1」にすることを強くお勧めします。", NamedTextColor.AQUA)
).build());
}

Expand Down
Loading

0 comments on commit c57d823

Please sign in to comment.