mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-14 19:34:43 +02:00
Compare commits
8 Commits
refactor/v
...
6.6.2
Author | SHA1 | Date | |
---|---|---|---|
c28177d6af | |||
8a80f252cf | |||
93571c72d1 | |||
6fd7379221 | |||
dc5c80d812 | |||
96e9a61e7c | |||
b9bd9b81e6 | |||
ec77812879 |
@ -48,7 +48,7 @@ public class Confirm extends SubCommand {
|
|||||||
player.sendMessage(TranslatableCaption.of("confirm.expired_confirm"));
|
player.sendMessage(TranslatableCaption.of("confirm.expired_confirm"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
TaskManager.runTaskAsync(command.command);
|
TaskManager.runTask(command.command);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ import com.plotsquared.core.plot.schematic.Schematic;
|
|||||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||||
import com.plotsquared.core.util.Permissions;
|
import com.plotsquared.core.util.Permissions;
|
||||||
import com.plotsquared.core.util.SchematicHandler;
|
import com.plotsquared.core.util.SchematicHandler;
|
||||||
|
import com.plotsquared.core.util.TimeUtil;
|
||||||
import com.plotsquared.core.util.task.RunnableVal;
|
import com.plotsquared.core.util.task.RunnableVal;
|
||||||
import com.plotsquared.core.util.task.TaskManager;
|
import com.plotsquared.core.util.task.TaskManager;
|
||||||
import net.kyori.adventure.text.minimessage.Template;
|
import net.kyori.adventure.text.minimessage.Template;
|
||||||
@ -205,7 +206,7 @@ public class Load extends SubCommand {
|
|||||||
if (split.length < 5) {
|
if (split.length < 5) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String time = secToTime((System.currentTimeMillis() / 1000) - Long.parseLong(split[0]));
|
String time = TimeUtil.secToTime((System.currentTimeMillis() / 1000) - Long.parseLong(split[0]));
|
||||||
String world = split[1];
|
String world = split[1];
|
||||||
PlotId id = PlotId.fromString(split[2] + ';' + split[3]);
|
PlotId id = PlotId.fromString(split[2] + ';' + split[3]);
|
||||||
String size = split[4];
|
String size = split[4];
|
||||||
@ -223,6 +224,10 @@ public class Load extends SubCommand {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link TimeUtil#secToTime(long)}
|
||||||
|
*/
|
||||||
|
@Deprecated(forRemoval = true, since = "6.6.2")
|
||||||
public String secToTime(long time) {
|
public String secToTime(long time) {
|
||||||
StringBuilder toreturn = new StringBuilder();
|
StringBuilder toreturn = new StringBuilder();
|
||||||
if (time >= 33868800) {
|
if (time >= 33868800) {
|
||||||
|
@ -29,7 +29,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@Deprecated(since = "TODO", forRemoval = true)
|
@Deprecated(since = "6.6.2", forRemoval = true)
|
||||||
public class RegExUtil {
|
public class RegExUtil {
|
||||||
|
|
||||||
public static Map<String, Pattern> compiledPatterns;
|
public static Map<String, Pattern> compiledPatterns;
|
||||||
|
@ -44,27 +44,27 @@ public final class TimeUtil {
|
|||||||
StringBuilder toReturn = new StringBuilder();
|
StringBuilder toReturn = new StringBuilder();
|
||||||
if (time >= 33868800) {
|
if (time >= 33868800) {
|
||||||
int years = (int) (time / 33868800);
|
int years = (int) (time / 33868800);
|
||||||
time -= years * 33868800;
|
time -= years * 33868800L;
|
||||||
toReturn.append(years).append("y ");
|
toReturn.append(years).append("y ");
|
||||||
}
|
}
|
||||||
if (time >= 604800) {
|
if (time >= 604800) {
|
||||||
int weeks = (int) (time / 604800);
|
int weeks = (int) (time / 604800);
|
||||||
time -= weeks * 604800;
|
time -= weeks * 604800L;
|
||||||
toReturn.append(weeks).append("w ");
|
toReturn.append(weeks).append("w ");
|
||||||
}
|
}
|
||||||
if (time >= 86400) {
|
if (time >= 86400) {
|
||||||
int days = (int) (time / 86400);
|
int days = (int) (time / 86400);
|
||||||
time -= days * 86400;
|
time -= days * 86400L;
|
||||||
toReturn.append(days).append("d ");
|
toReturn.append(days).append("d ");
|
||||||
}
|
}
|
||||||
if (time >= 3600) {
|
if (time >= 3600) {
|
||||||
int hours = (int) (time / 3600);
|
int hours = (int) (time / 3600);
|
||||||
time -= hours * 3600;
|
time -= hours * 3600L;
|
||||||
toReturn.append(hours).append("h ");
|
toReturn.append(hours).append("h ");
|
||||||
}
|
}
|
||||||
if (time >= 60) {
|
if (time >= 60) {
|
||||||
int minutes = (int) (time / 60);
|
int minutes = (int) (time / 60);
|
||||||
time -= minutes * 60;
|
time -= minutes * 60L;
|
||||||
toReturn.append(minutes).append("m ");
|
toReturn.append(minutes).append("m ");
|
||||||
}
|
}
|
||||||
if (toReturn.length() == 0 || time > 0) {
|
if (toReturn.length() == 0 || time > 0) {
|
||||||
|
@ -18,7 +18,7 @@ plugins {
|
|||||||
idea
|
idea
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "6.6.2-SNAPSHOT"
|
version = "6.6.2"
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "com.plotsquared"
|
group = "com.plotsquared"
|
||||||
|
@ -6,7 +6,7 @@ guava = "31.0.1-jre" # Version set by Minecraft
|
|||||||
|
|
||||||
# Platform expectations
|
# Platform expectations
|
||||||
paper = "1.18.1-R0.1-SNAPSHOT"
|
paper = "1.18.1-R0.1-SNAPSHOT"
|
||||||
checker-qual = "3.21.3"
|
checker-qual = "3.21.4"
|
||||||
guice = "5.1.0"
|
guice = "5.1.0"
|
||||||
findbugs = "3.0.1"
|
findbugs = "3.0.1"
|
||||||
snakeyaml = "1.30" # Version set by Bukkit
|
snakeyaml = "1.30" # Version set by Bukkit
|
||||||
@ -17,7 +17,7 @@ adventure-text-minimessage = "4.1.0-SNAPSHOT"
|
|||||||
adventure-platform-bukkit = "4.0.1"
|
adventure-platform-bukkit = "4.0.1"
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
worldedit = "7.2.9"
|
worldedit = "7.2.10"
|
||||||
fawe = "2.1.0"
|
fawe = "2.1.0"
|
||||||
vault = "1.7.1"
|
vault = "1.7.1"
|
||||||
placeholderapi = "2.11.1"
|
placeholderapi = "2.11.1"
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
Reference in New Issue
Block a user