Skip to content

Commit

Permalink
Bump plugin version -> 2.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Rothes committed Jan 29, 2023
1 parent fa528c3 commit 60dace1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions Version Infos.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"Version_Channels": {
"Stable": {
"Latest_Version_Number": 104,
"Latest_Version_Number": 105,
"Log_Level": "Info",
"Actions": [],
"Message": {
"en-US": "§bA new version of PSR (\"2.15.0\") is available!\n§bDownload here: https://www.spigotmc.org/resources/protocolstringreplacer.96573/",
"zh-CN": "§bProtocolStringReplacer 有新版本 (\"2.15.0\") 了!\n§b请更新您的插件: https://beta.mcbbs.net/resource/servermod/xmkw2tv1"
"en-US": "§bA new version of PSR (\"2.16.0\") is available!\n§bDownload here: https://www.spigotmc.org/resources/protocolstringreplacer.96573/",
"zh-CN": "§bProtocolStringReplacer 有新版本 (\"2.16.0\") 了!\n§b请更新您的插件: https://beta.mcbbs.net/resource/servermod/xmkw2tv1"
}
}
},
"Version_Actions": {
"0-999": {
"Log_Level": "Info",
"Actions": [],
"Message_Times": 2,
"Message_Times": 1,
"Message": {
"en-US": "§bEnjoy PSR? Join our Discord: https://discord.gg/zwzzkmYCBb",
"zh-CN": "§b喜欢PSR吗? 欢迎加入我们的 QQ群: 422532220 !"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>me.rothes</groupId>
<artifactId>ProtocolStringReplacer</artifactId>
<version>2.15.0</version>
<version>2.16.0</version>
<packaging>jar</packaging>

<repositories>
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/me/rothes/protocolstringreplacer/Updater.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@

public class Updater implements Listener {

private final String VERSION_CHANNCEL = "Stable";
private final int VERSION_NUMBER = 104;
private static final String VERSION_CHANCEL = "Stable";
private static final int VERSION_NUMBER = 105;
private final HashMap<String, Integer> msgTimesMap = new HashMap<>();
private final List<String> messages = new ArrayList<>();
private final ProtocolStringReplacer plugin;
Expand Down Expand Up @@ -123,15 +123,15 @@ private void checkJson(String json) {
JsonObject channels = root.getAsJsonObject("Version_Channels");

messages.clear();
if (channels.has(VERSION_CHANNCEL)) {
JsonObject channel = channels.getAsJsonObject(VERSION_CHANNCEL);
if (channels.has(VERSION_CHANCEL)) {
JsonObject channel = channels.getAsJsonObject(VERSION_CHANCEL);
if (channel.has("Message")
&& channel.getAsJsonPrimitive("Latest_Version_Number").getAsInt() > VERSION_NUMBER) {
sendJsonMessage(channel, "updater");
}
} else {
ProtocolStringReplacer.warn(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Invalid-Channel", VERSION_CHANNCEL));
messages.add(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Invalid-Channel", VERSION_CHANNCEL));
ProtocolStringReplacer.warn(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Invalid-Channel", VERSION_CHANCEL));
messages.add(PsrLocalization.getLocaledMessage("Console-Sender.Messages.Updater.Invalid-Channel", VERSION_CHANCEL));
return;
}

Expand Down

0 comments on commit 60dace1

Please sign in to comment.