mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-17 21:04:42 +02:00
Compare commits
6 Commits
fix/big-bo
...
renovate/g
Author | SHA1 | Date | |
---|---|---|---|
09c3ed4fe6 | |||
f45064c4c4 | |||
af32399dd2 | |||
f3c03348d9 | |||
a53330e39b | |||
e2ba93dab9 |
@ -50,7 +50,6 @@ import com.plotsquared.bukkit.util.BukkitUtil;
|
|||||||
import com.plotsquared.bukkit.util.BukkitWorld;
|
import com.plotsquared.bukkit.util.BukkitWorld;
|
||||||
import com.plotsquared.bukkit.util.SetGenCB;
|
import com.plotsquared.bukkit.util.SetGenCB;
|
||||||
import com.plotsquared.bukkit.util.TranslationUpdateManager;
|
import com.plotsquared.bukkit.util.TranslationUpdateManager;
|
||||||
import com.plotsquared.bukkit.util.UpdateUtility;
|
|
||||||
import com.plotsquared.bukkit.util.task.BukkitTaskManager;
|
import com.plotsquared.bukkit.util.task.BukkitTaskManager;
|
||||||
import com.plotsquared.bukkit.util.task.PaperTimeConverter;
|
import com.plotsquared.bukkit.util.task.PaperTimeConverter;
|
||||||
import com.plotsquared.bukkit.util.task.SpigotTimeConverter;
|
import com.plotsquared.bukkit.util.task.SpigotTimeConverter;
|
||||||
@ -303,9 +302,11 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
|
|
||||||
this.serverLocale = Locale.forLanguageTag(Settings.Enabled_Components.DEFAULT_LOCALE);
|
this.serverLocale = Locale.forLanguageTag(Settings.Enabled_Components.DEFAULT_LOCALE);
|
||||||
|
|
||||||
|
/* TODO Enable update checker before v7 is released to GA
|
||||||
if (PremiumVerification.isPremium() && Settings.Enabled_Components.UPDATE_NOTIFICATIONS) {
|
if (PremiumVerification.isPremium() && Settings.Enabled_Components.UPDATE_NOTIFICATIONS) {
|
||||||
injector.getInstance(UpdateUtility.class).updateChecker();
|
injector.getInstance(UpdateUtility.class).updateChecker();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (PremiumVerification.isPremium()) {
|
if (PremiumVerification.isPremium()) {
|
||||||
LOGGER.info("PlotSquared version licensed to Spigot user {}", getUserID());
|
LOGGER.info("PlotSquared version licensed to Spigot user {}", getUserID());
|
||||||
|
@ -1116,6 +1116,7 @@ public class BlockEventListener implements Listener {
|
|||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
plot.debug("Explosion was cancelled because explosion = false");
|
plot.debug("Explosion was cancelled because explosion = false");
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
event.blockList().removeIf(blox -> !plot.equals(area.getOwnedPlot(BukkitUtil.adapt(blox.getLocation()))));
|
event.blockList().removeIf(blox -> !plot.equals(area.getOwnedPlot(BukkitUtil.adapt(blox.getLocation()))));
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ import java.nio.file.Paths;
|
|||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a helper class which replaces occurrences of 'suggest_command' with 'run_command' in messages_%.json.
|
* This is a helper class which replaces older syntax no longer supported by MiniMessage with replacements in messages_%.json.
|
||||||
* MiniMessage changed the syntax between major releases. To warrant a smooth upgrade, we attempt to replace any occurrences
|
* MiniMessage changed the syntax between major releases. To warrant a smooth upgrade, we attempt to replace any occurrences
|
||||||
* while loading PlotSquared.
|
* while loading PlotSquared.
|
||||||
*
|
*
|
||||||
@ -38,14 +38,22 @@ import java.util.stream.Stream;
|
|||||||
public class TranslationUpdateManager {
|
public class TranslationUpdateManager {
|
||||||
|
|
||||||
public static void upgradeTranslationFile() throws IOException {
|
public static void upgradeTranslationFile() throws IOException {
|
||||||
String searchText = "suggest_command";
|
String suggestCommand = "suggest_command";
|
||||||
String replacementText = "run_command";
|
String suggestCommandReplacement = "run_command";
|
||||||
|
String minHeight = "minHeight";
|
||||||
|
String minheightReplacement = "minheight";
|
||||||
|
String maxHeight = "maxHeight";
|
||||||
|
String maxheightReplacement = "maxheight";
|
||||||
|
|
||||||
try (Stream<Path> paths = Files.walk(Paths.get(PlotSquared.platform().getDirectory().toPath().resolve("lang").toUri()))) {
|
try (Stream<Path> paths = Files.walk(Paths.get(PlotSquared.platform().getDirectory().toPath().resolve("lang").toUri()))) {
|
||||||
paths
|
paths
|
||||||
.filter(Files::isRegularFile)
|
.filter(Files::isRegularFile)
|
||||||
.filter(p -> p.getFileName().toString().matches("messages_[a-z]{2}\\.json"))
|
.filter(p -> p.getFileName().toString().matches("messages_[a-z]{2}\\.json"))
|
||||||
.forEach(p -> replaceInFile(p, searchText, replacementText));
|
.forEach(p -> {
|
||||||
|
replaceInFile(p, suggestCommand, suggestCommandReplacement);
|
||||||
|
replaceInFile(p, minHeight, minheightReplacement);
|
||||||
|
replaceInFile(p, maxHeight, maxheightReplacement);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ public class Auto extends SubCommand {
|
|||||||
PlotExpression costExp = plotarea.getPrices().get("claim");
|
PlotExpression costExp = plotarea.getPrices().get("claim");
|
||||||
PlotExpression mergeCostExp = plotarea.getPrices().get("merge");
|
PlotExpression mergeCostExp = plotarea.getPrices().get("merge");
|
||||||
int size = sizeX * sizeZ;
|
int size = sizeX * sizeZ;
|
||||||
double mergeCost = size > 1 && mergeCostExp == null ? 0d : mergeCostExp.evaluate(size);
|
double mergeCost = size <= 1 || mergeCostExp == null ? 0d : mergeCostExp.evaluate(size);
|
||||||
double cost = costExp.evaluate(Settings.Limit.GLOBAL ?
|
double cost = costExp.evaluate(Settings.Limit.GLOBAL ?
|
||||||
player.getPlotCount() :
|
player.getPlotCount() :
|
||||||
player.getPlotCount(plotarea.getWorldName()));
|
player.getPlotCount(plotarea.getWorldName()));
|
||||||
|
@ -657,9 +657,9 @@ public abstract class PlotArea implements ComponentLike {
|
|||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("height.height_limit"),
|
TranslatableCaption.of("height.height_limit"),
|
||||||
TagResolver.builder()
|
TagResolver.builder()
|
||||||
.tag("minHeight", Tag.inserting(Component.text(minBuildHeight)))
|
.tag("minheight", Tag.inserting(Component.text(minBuildHeight)))
|
||||||
.tag(
|
.tag(
|
||||||
"maxHeight",
|
"maxheight",
|
||||||
Tag.inserting(Component.text(maxBuildHeight))
|
Tag.inserting(Component.text(maxBuildHeight))
|
||||||
).build()
|
).build()
|
||||||
);
|
);
|
||||||
|
@ -486,7 +486,7 @@
|
|||||||
"single.get_position": "<prefix><gold>Go to the first corner and use: <gray><command> to create position 1.</gold>",
|
"single.get_position": "<prefix><gold>Go to the first corner and use: <gray><command> to create position 1.</gold>",
|
||||||
"single.delete_world_region": "<prefix><red>Stop the server and delete: <world>/region.</red>",
|
"single.delete_world_region": "<prefix><red>Stop the server and delete: <world>/region.</red>",
|
||||||
"single.regeneration_complete": "<prefix><gold>Regeneration complete.</gold>",
|
"single.regeneration_complete": "<prefix><gold>Regeneration complete.</gold>",
|
||||||
"single.worldcreation_location": "<prefix><gold>World creation settings may be stored in multiple locations:</gold>\n<dark_gray> - </dark_gray><gray>bukkit.yml in your server's root folder.</gray>\n<dark_gray> - </dark_gray><gray>PlotSquared's settings.yml</gray>\n<dark_gray> - </dark_gray><gray>Hyperverse's worlds.yml (or any world management plugin)</gray>\n<dark_gray> - </dark_gray><red>Stop the server and delete it from these locations.</red>",
|
"single.worldcreation_location": "<prefix><gold>World creation settings may be stored in multiple locations:</gold>\n<dark_gray> - </dark_gray><gray>bukkit.yml in your server's root folder.</gray>\n<dark_gray> - </dark_gray><gray>PlotSquared's worlds.yml</gray>\n<dark_gray> - </dark_gray><gray>Hyperverse's worlds.yml (or any world management plugin)</gray>\n<dark_gray> - </dark_gray><red>Stop the server and delete it from these locations.</red>",
|
||||||
"legacyconfig.legacy_config_found": "<prefix><green>A legacy configuration file was detected. Conversion will be attempted.</green>",
|
"legacyconfig.legacy_config_found": "<prefix><green>A legacy configuration file was detected. Conversion will be attempted.</green>",
|
||||||
"legacyconfig.legacy_config_backup": "<prefix><gold>A copy of worlds.yml has been saved in the file worlds.yml.old</gold>.",
|
"legacyconfig.legacy_config_backup": "<prefix><gold>A copy of worlds.yml has been saved in the file worlds.yml.old</gold>.",
|
||||||
"legacyconfig.legacy_config_replaced": "<prefix><gray><value1> has been replaced with <value2></gray>",
|
"legacyconfig.legacy_config_replaced": "<prefix><gray><value1> has been replaced with <value2></gray>",
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
5
gradlew
vendored
5
gradlew
vendored
@ -130,10 +130,13 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
if ! command -v java >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
|
Reference in New Issue
Block a user