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

Commit

Permalink
Changes -> Added in-game restart required message
Browse files Browse the repository at this point in the history
  • Loading branch information
EinfacheSache committed Jul 22, 2023
1 parent 6e4aef4 commit 49685bf
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<dependency>
<groupId>com.github.CubeAttack</groupId>
<artifactId>EasyAPI</artifactId>
<version>f0e587ac69</version>
<version>596efd829f</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public void run() {
"OPEN_URL", result.getReleaseUrl(), null, null);
}

if (result.getVersionStatus().equals(VersionUtils.VersionStatus.REQUIRED_RESTART)) {
instance.sendMessage(player, localization.get("plugin.restart-required.message", result.getCurrentVersion(), result.getLatestVersion()));
}

if (!instance.getCore().isSetup() && instance.getCore().getPlayerInSetup().isEmpty()) {
instance.sendMessage(player, localization.get("setup.required.first"));
instance.sendMessage(player, localization.get("setup.required.second"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ private void versionCheckSchedule() {
public void run() {
core.setVersionResult(VersionUtils.checkVersion("NeoProtect", "NeoPlugin", "v" + core.getPlugin().getVersion(), Config.isAutoUpdater()));
}
}, 1000 * 15, 1000 * 60 * 3);
}, 1000 * 10, 1000 * 60 * 3);
}

private void attackCheckSchedule() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public void onLogin(PlayerJoinEvent event) {
"OPEN_URL", result.getReleaseUrl(), null, null);
}

if (result.getVersionStatus().equals(VersionUtils.VersionStatus.REQUIRED_RESTART)) {
instance.sendMessage(player, localization.get("plugin.restart-required.message", result.getCurrentVersion(), result.getLatestVersion()));
}

if (!instance.getCore().isSetup() && instance.getCore().getPlayerInSetup().isEmpty()) {
instance.sendMessage(player, localization.get("setup.required.first"));
instance.sendMessage(player, localization.get("setup.required.second"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public void run() {
"OPEN_URL", result.getReleaseUrl(), null, null);
}

if (result.getVersionStatus().equals(VersionUtils.VersionStatus.REQUIRED_RESTART)) {
instance.sendMessage(player, localization.get("plugin.restart-required.message", result.getCurrentVersion(), result.getLatestVersion()));
}

if (!instance.getCore().isSetup() && instance.getCore().getPlayerInSetup().isEmpty()) {
instance.sendMessage(player, localization.get("setup.required.first"));
instance.sendMessage(player, localization.get("setup.required.second"));
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/language_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ utils.activated=§aaktiviert
utils.deactivated=§cdeaktiviert

plugin.outdated.message=§cDas Plugin {0} ist veraltet, bitte downloade die aktuelle Version {1}
plugin.restart-required.message=§cDie Plugin {0} entspricht nicht dem neuesten Release. Bitte starte den Server neu, um auf die aktuelle Version {1} zu aktualisieren

debug.spigot=Dieser Befehl ist nur für Proxy-Server verfügbar
debug.starting=§aDebug-Tool wird gestartet...
debug.running=§cDebug-Tool läuft aktuell bereits
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/language_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ utils.activated=§aactivated
utils.deactivated=§cdeactivated

plugin.outdated.message=§cThe plugin {0} is outdated, please download the latest version {1}
plugin.restart-required.message=§cThe plugin {0} does not match the latest release. Please restart the server to update to the version {1}

debug.spigot=This command is only available for proxy-server
debug.starting=§aStarting debug tool...
debug.running=§cDebug tool is progressing right now
Expand Down

0 comments on commit 49685bf

Please sign in to comment.