diff --git a/build.gradle b/build.gradle index dc30d99..853ffb3 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { defaultTasks 'build', 'shadowJar' group = 'io.github.jamies1211.minereset' -version = '1.0.10' +version = '1.0.11' description = 'MineReset' sourceCompatibility = 1.8 diff --git a/src/main/java/com/github/jamies1211/minereset/MineReset.java b/src/main/java/com/github/jamies1211/minereset/MineReset.java index 3358683..a009e39 100644 --- a/src/main/java/com/github/jamies1211/minereset/MineReset.java +++ b/src/main/java/com/github/jamies1211/minereset/MineReset.java @@ -62,7 +62,7 @@ */ @SuppressWarnings("ArraysAsListWithZeroOrOneArgument") -@Plugin(id = "minereset", name = "MineReset", version = "1.0.10", +@Plugin(id = "minereset", name = "MineReset", version = "1.0.11", description = "Resets mines", authors = {"JamieS1211"}, url = "http://pixelmonweb.officialtjp.com") @@ -534,13 +534,12 @@ public void cycle() { } else { - if (!SendMessages.messageToAllPlayers(fillingChatType, minePrefix + listOfMines + " " + resettingNowSingular) && - fillingChatType != 0) { + if (!SendMessages.messageToAllPlayers(fillingChatType, minePrefix + resettingNowSingular.replace("%mine%", listOfMines.toString())) + && fillingChatType != 0) { MessageChannel.TO_CONSOLE.send(TextSerializers.FORMATTING_CODE.deserialize(minePrefix + invalidFillChatType)); } - MessageChannel.TO_CONSOLE.send(TextSerializers.FORMATTING_CODE.deserialize(minePrefix + - listOfMines + " " + resettingNowSingular)); + MessageChannel.TO_CONSOLE.send(TextSerializers.FORMATTING_CODE.deserialize(minePrefix + resettingNowSingular.replace("%mine%", listOfMines.toString()))); } } diff --git a/src/main/java/com/github/jamies1211/minereset/SecondsToString.java b/src/main/java/com/github/jamies1211/minereset/SecondsToString.java index 2a62692..ee80a60 100644 --- a/src/main/java/com/github/jamies1211/minereset/SecondsToString.java +++ b/src/main/java/com/github/jamies1211/minereset/SecondsToString.java @@ -11,30 +11,30 @@ public static String secondsToTimeString(int totalSeconds) { final int hours = ((((totalSeconds - seconds) / 60) - minutes) / 60); // Hours rounded down. - String secondUnit = Messages.secondUnitPlural; - String minuteUnit = Messages.minuteUnitPlural; - String hourUnit = Messages.hourUnitPlural; + String secondUnit = Messages.secondUnitPlural + " "; + String minuteUnit = Messages.minuteUnitPlural + " "; + String hourUnit = Messages.hourUnitPlural + " "; String secondsString = Integer.toString(seconds); String minutesString = Integer.toString(minutes); String hoursString = Integer.toString(hours); if (seconds == 1) { // Removes plural if not needed. - secondUnit = Messages.secondUnitSingular; + secondUnit = Messages.secondUnitSingular + " "; } else if (seconds == 0 && (hours != 0 || minutes != 0)) { secondsString = ""; secondUnit = ""; } if (minutes == 1) { // Removes plural if not needed. - minuteUnit = Messages.minuteUnitSingular; + minuteUnit = Messages.minuteUnitSingular + " "; } else if (minutes == 0) { minutesString = ""; minuteUnit = ""; } if (hours == 1) { // Removes plural if not needed. - hourUnit = Messages.hourUnitSingular; + hourUnit = Messages.hourUnitSingular + " "; } else if (hours == 0) { hoursString = ""; hourUnit = ""; @@ -42,7 +42,7 @@ public static String secondsToTimeString(int totalSeconds) { - return hoursString + hourUnit + " " + minutesString + minuteUnit + " " + secondsString + secondUnit + " "; + return hoursString + hourUnit + minutesString + minuteUnit + secondsString + secondUnit; } }