mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-26 00:55:28 +02:00
Compare commits
6 Commits
v7
...
renovate/c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c7fde7b931 | ||
![]() |
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>",
|
||||||
|
@@ -77,7 +77,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(platform("com.intellectualsites.bom:bom-newest:1.29"))
|
implementation(platform("com.intellectualsites.bom:bom-newest:1.31"))
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
Reference in New Issue
Block a user