This repository was archived by the owner on Dec 7, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
java/in/twizmwaz/cardinal Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,8 @@ public enum ChatConstant {
338338 UI_LATEST_VERSION ("userInterface.latestVersion" ),
339339 UI_UPDATE_AVAILABLE ("userInterface.updateAvailable" ),
340340 UI_VERSION ("userInterface.version" ),
341+ UI_JAVA_VERSION ("userInterface.java-version" ),
342+ UI_JAVA_UPDATE ("userInterface.java-update" ),
341343 UI_MATCH_REPORT_UPLOAD ("userInterface.matchReportUpload" ),
342344 UI_MATCH_REPORT_SUCCESS ("userInterface.matchReportSuccess" ),
343345 UI_MATCH_REPORT_FAILED ("userInterface.matchReportFailed" ),
Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ public class CardinalCommand {
2525 public static void cardinal (final CommandContext cmd , CommandSender sender ) throws CommandPermissionsException {
2626 if (cmd .hasFlag ('v' )) {
2727 sender .sendMessage (ChatColor .GOLD + ChatConstant .UI_VERSION .asMessage (new UnlocalizedChatMessage (Cardinal .getInstance ().getDescription ().getVersion ())).getMessage (ChatUtil .getLocale (sender )));
28+ sender .sendMessage (ChatColor .GOLD + ChatConstant .UI_JAVA_VERSION .asMessage (new UnlocalizedChatMessage (System .getProperty ("java.version" ))).getMessage (ChatUtil .getLocale (sender )));
29+ if (System .getProperty ("java.version" ).startsWith ("1.7" )) {
30+ sender .sendMessage (ChatColor .DARK_RED + ChatConstant .UI_JAVA_UPDATE .getMessage (ChatUtil .getLocale (sender )));
31+ }
2832 Bukkit .getScheduler ().runTaskAsynchronously (Cardinal .getInstance (), UpdateHandler .getUpdateHandler ().getNotificationTask (sender ));
2933 }
3034 if (cmd .hasFlag ('r' )) {
Original file line number Diff line number Diff line change 336336 <latestVersion >Cardinal is up-to-date!</latestVersion >
337337 <updateAvailable >A newer build of Cardinal is available!</updateAvailable >
338338 <version >This server is running Cardinal version {0}</version >
339+ <java-version >This server is running Java version {0}</java-version >
340+ <java-update >Sportbukkit & Cardinal will stop working with java 7 shortly, you need to update java</java-update >
339341 <matchReportUpload >Uploading match report...</matchReportUpload >
340342 <matchReportSuccess >Match report successfully uploaded! You can view it at {0}</matchReportSuccess >
341343 <matchReportFailed >An error occurred while uploading the match report</matchReportFailed >
You can’t perform that action at this time.
0 commit comments