Compare commits

..

7 Commits
6.1.1 ... 6.1.2

Author SHA1 Message Date
c37b13dcb3 Fix bad move to adventure 2021-09-18 21:54:22 +01:00
086dac2ea4 Update dependency net.kyori:adventure-platform-bukkit to v4.0.0 (#3245)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-16 15:29:17 +02:00
b2b8598b5b Fix #3246 2021-09-15 13:19:25 +01:00
61e5d9f1b6 Move /p components title to translations file matching other parts of components
- Also component-ify title, this must not be limited to a String.
2021-09-15 11:13:03 +02:00
c8989b3332 Update dependency org.junit.jupiter:junit-jupiter to v5.8.0 (#3244)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-09-13 10:23:38 +02:00
9f54472dd6 Relocate annotations properly 2021-09-12 13:56:08 +02:00
115932c65a 6.1.2 2021-09-11 14:28:08 +02:00
8 changed files with 16 additions and 10 deletions

View File

@ -80,6 +80,10 @@ tasks.named<ShadowJar>("shadowJar") {
relocate("com.intellectualsites.http", "com.plotsquared.core.http") relocate("com.intellectualsites.http", "com.plotsquared.core.http")
relocate("com.intellectualsites.paster", "com.plotsquared.core.paster") relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
relocate("org.incendo.serverlib", "com.plotsquared.bukkit.serverlib") relocate("org.incendo.serverlib", "com.plotsquared.bukkit.serverlib")
relocate("org.jetbrains", "com.plotsquared.core.annotations")
relocate("org.intellij.lang", "com.plotsquared.core.intellij.annotations")
relocate("javax.annotation", "com.plotsquared.core.annotation")
relocate("javax.inject", "com.plotsquared.core.annotation.inject")
// Get rid of all the libs which are 100% unused. // Get rid of all the libs which are 100% unused.
minimize() minimize()

View File

@ -176,7 +176,7 @@ public class BukkitRegionManager extends RegionManager {
final boolean ignoreAugment, final boolean ignoreAugment,
final @Nullable Runnable whenDone final @Nullable Runnable whenDone
) { ) {
final BukkitWorld world = new BukkitWorld((World) pos1.getWorld()); final BukkitWorld world = (BukkitWorld) worldUtil.getWeWorld(pos1.getWorldName());
final int p1x = pos1.getX(); final int p1x = pos1.getX();
final int p1z = pos1.getZ(); final int p1z = pos1.getZ();

View File

@ -73,6 +73,7 @@ public class Unlink extends SubCommand {
} }
if (!plot.isMerged()) { if (!plot.isMerged()) {
player.sendMessage(TranslatableCaption.of("merge.unlink_impossible")); player.sendMessage(TranslatableCaption.of("merge.unlink_impossible"));
return false;
} }
final boolean createRoad; final boolean createRoad;
if (args.length != 0) { if (args.length != 0) {
@ -100,6 +101,7 @@ public class Unlink extends SubCommand {
if (!force && !plot.isOwner(player.getUUID()) && !Permissions if (!force && !plot.isOwner(player.getUUID()) && !Permissions
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_UNLINK)) { .hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_UNLINK)) {
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms")); player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
return true;
} }
Runnable runnable = () -> { Runnable runnable = () -> {
if (!plot.getPlotModificationManager().unlinkPlot(createRoad, createRoad)) { if (!plot.getPlotModificationManager().unlinkPlot(createRoad, createRoad)) {

View File

@ -71,7 +71,6 @@ public class ComponentPresetManager {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + ComponentPresetManager.class.getSimpleName()); private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + ComponentPresetManager.class.getSimpleName());
private final List<ComponentPreset> presets; private final List<ComponentPreset> presets;
private final String guiName;
private final EconHandler econHandler; private final EconHandler econHandler;
private final InventoryUtil inventoryUtil; private final InventoryUtil inventoryUtil;
private File componentsFile; private File componentsFile;
@ -104,15 +103,14 @@ public class ComponentPresetManager {
final YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(this.componentsFile); final YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(this.componentsFile);
if (!yamlConfiguration.contains("title")) { if (yamlConfiguration.contains("title")) {
yamlConfiguration.set("title", "&6Plot Components"); yamlConfiguration.set("title", "#Now in /lang/messages_%.json, preset.title");
try { try {
yamlConfiguration.save(this.componentsFile); yamlConfiguration.save(this.componentsFile);
} catch (IOException e) { } catch (IOException e) {
LOGGER.error("Failed to save default values to components.yml", e); LOGGER.error("Failed to save default values to components.yml", e);
} }
} }
this.guiName = yamlConfiguration.getString("title", "&6Plot Components");
if (yamlConfiguration.contains("presets")) { if (yamlConfiguration.contains("presets")) {
this.presets = yamlConfiguration this.presets = yamlConfiguration
@ -183,7 +181,8 @@ public class ComponentPresetManager {
allowedPresets.add(componentPreset); allowedPresets.add(componentPreset);
} }
final int size = (int) Math.ceil((double) allowedPresets.size() / 9.0D); final int size = (int) Math.ceil((double) allowedPresets.size() / 9.0D);
final PlotInventory plotInventory = new PlotInventory(this.inventoryUtil, player, size, this.guiName) { final PlotInventory plotInventory = new PlotInventory(this.inventoryUtil, player, size,
TranslatableCaption.of("preset.title").getComponent(player)) {
@Override @Override
public boolean onClick(final int index) { public boolean onClick(final int index) {
if (!getPlayer().getCurrentPlot().equals(plot)) { if (!getPlayer().getCurrentPlot().equals(plot)) {

View File

@ -61,7 +61,7 @@ public abstract class RegionManager {
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + RegionManager.class.getSimpleName()); private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + RegionManager.class.getSimpleName());
public static RegionManager manager = null; public static RegionManager manager = null;
private final WorldUtil worldUtil; protected final WorldUtil worldUtil;
private final GlobalBlockQueue blockQueue; private final GlobalBlockQueue blockQueue;
private final ProgressSubscriberFactory subscriberFactory; private final ProgressSubscriberFactory subscriberFactory;

View File

@ -459,6 +459,7 @@
"preset.preset_invalid": "<prefix><red>Could not generate a pattern from that preset.</red>", "preset.preset_invalid": "<prefix><red>Could not generate a pattern from that preset.</red>",
"preset.preset_lore_cost": "<prefix><gray>Cost: </gray><gold><cost></gold>", "preset.preset_lore_cost": "<prefix><gray>Cost: </gray><gold><cost></gold>",
"preset.preset_lore_component": "<gray>Component: </gray><gold><component></gold>", "preset.preset_lore_component": "<gray>Component: </gray><gold><component></gold>",
"preset.title": "Plot Components",
"generic.generic_other": "<gray>other</gray>", "generic.generic_other": "<gray>other</gray>",
"generic.generic_merged": "<gray>merged</gray>", "generic.generic_merged": "<gray>merged</gray>",
"generic.generic_unowned": "<gray>unowned</gray>", "generic.generic_unowned": "<gray>unowned</gray>",

View File

@ -16,7 +16,7 @@ plugins {
idea idea
} }
var ver by extra("6.1.1") var ver by extra("6.1.2")
var versuffix by extra("-SNAPSHOT") var versuffix by extra("-SNAPSHOT")
val versionsuffix: String? by project val versionsuffix: String? by project
if (versionsuffix != null) { if (versionsuffix != null) {
@ -76,7 +76,7 @@ allprojects {
dependencies { dependencies {
// Tests // Tests
testImplementation("junit:junit:4.13.2") testImplementation("junit:junit:4.13.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.7.2") testImplementation("org.junit.jupiter:junit-jupiter:5.8.0")
} }
plugins.withId("java") { plugins.withId("java") {

View File

@ -14,7 +14,7 @@ snakeyaml = "1.28" # Version set by Bukkit
# Adventure & MiniMessage # Adventure & MiniMessage
adventure-api = "4.9.1" adventure-api = "4.9.1"
adventure-text-minimessage = "4.1.0-SNAPSHOT" adventure-text-minimessage = "4.1.0-SNAPSHOT"
adventure-platform-bukkit = "4.0.0-SNAPSHOT" adventure-platform-bukkit = "4.0.0"
# Plugins # Plugins
worldedit = "7.2.6" worldedit = "7.2.6"