mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-06 15:44:44 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
c37b13dcb3 | |||
086dac2ea4 | |||
b2b8598b5b | |||
61e5d9f1b6 | |||
c8989b3332 | |||
9f54472dd6 | |||
115932c65a |
@ -80,6 +80,10 @@ tasks.named<ShadowJar>("shadowJar") {
|
||||
relocate("com.intellectualsites.http", "com.plotsquared.core.http")
|
||||
relocate("com.intellectualsites.paster", "com.plotsquared.core.paster")
|
||||
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.
|
||||
minimize()
|
||||
|
@ -176,7 +176,7 @@ public class BukkitRegionManager extends RegionManager {
|
||||
final boolean ignoreAugment,
|
||||
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 p1z = pos1.getZ();
|
||||
|
@ -73,6 +73,7 @@ public class Unlink extends SubCommand {
|
||||
}
|
||||
if (!plot.isMerged()) {
|
||||
player.sendMessage(TranslatableCaption.of("merge.unlink_impossible"));
|
||||
return false;
|
||||
}
|
||||
final boolean createRoad;
|
||||
if (args.length != 0) {
|
||||
@ -100,6 +101,7 @@ public class Unlink extends SubCommand {
|
||||
if (!force && !plot.isOwner(player.getUUID()) && !Permissions
|
||||
.hasPermission(player, Permission.PERMISSION_ADMIN_COMMAND_UNLINK)) {
|
||||
player.sendMessage(TranslatableCaption.of("permission.no_plot_perms"));
|
||||
return true;
|
||||
}
|
||||
Runnable runnable = () -> {
|
||||
if (!plot.getPlotModificationManager().unlinkPlot(createRoad, createRoad)) {
|
||||
|
@ -71,7 +71,6 @@ public class ComponentPresetManager {
|
||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + ComponentPresetManager.class.getSimpleName());
|
||||
|
||||
private final List<ComponentPreset> presets;
|
||||
private final String guiName;
|
||||
private final EconHandler econHandler;
|
||||
private final InventoryUtil inventoryUtil;
|
||||
private File componentsFile;
|
||||
@ -104,15 +103,14 @@ public class ComponentPresetManager {
|
||||
|
||||
final YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(this.componentsFile);
|
||||
|
||||
if (!yamlConfiguration.contains("title")) {
|
||||
yamlConfiguration.set("title", "&6Plot Components");
|
||||
if (yamlConfiguration.contains("title")) {
|
||||
yamlConfiguration.set("title", "#Now in /lang/messages_%.json, preset.title");
|
||||
try {
|
||||
yamlConfiguration.save(this.componentsFile);
|
||||
} catch (IOException e) {
|
||||
LOGGER.error("Failed to save default values to components.yml", e);
|
||||
}
|
||||
}
|
||||
this.guiName = yamlConfiguration.getString("title", "&6Plot Components");
|
||||
|
||||
if (yamlConfiguration.contains("presets")) {
|
||||
this.presets = yamlConfiguration
|
||||
@ -183,7 +181,8 @@ public class ComponentPresetManager {
|
||||
allowedPresets.add(componentPreset);
|
||||
}
|
||||
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
|
||||
public boolean onClick(final int index) {
|
||||
if (!getPlayer().getCurrentPlot().equals(plot)) {
|
||||
|
@ -61,7 +61,7 @@ public abstract class RegionManager {
|
||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + RegionManager.class.getSimpleName());
|
||||
|
||||
public static RegionManager manager = null;
|
||||
private final WorldUtil worldUtil;
|
||||
protected final WorldUtil worldUtil;
|
||||
private final GlobalBlockQueue blockQueue;
|
||||
private final ProgressSubscriberFactory subscriberFactory;
|
||||
|
||||
|
@ -459,6 +459,7 @@
|
||||
"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_component": "<gray>Component: </gray><gold><component></gold>",
|
||||
"preset.title": "Plot Components",
|
||||
"generic.generic_other": "<gray>other</gray>",
|
||||
"generic.generic_merged": "<gray>merged</gray>",
|
||||
"generic.generic_unowned": "<gray>unowned</gray>",
|
||||
|
@ -16,7 +16,7 @@ plugins {
|
||||
idea
|
||||
}
|
||||
|
||||
var ver by extra("6.1.1")
|
||||
var ver by extra("6.1.2")
|
||||
var versuffix by extra("-SNAPSHOT")
|
||||
val versionsuffix: String? by project
|
||||
if (versionsuffix != null) {
|
||||
@ -76,7 +76,7 @@ allprojects {
|
||||
dependencies {
|
||||
// Tests
|
||||
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") {
|
||||
|
@ -14,7 +14,7 @@ snakeyaml = "1.28" # Version set by Bukkit
|
||||
# Adventure & MiniMessage
|
||||
adventure-api = "4.9.1"
|
||||
adventure-text-minimessage = "4.1.0-SNAPSHOT"
|
||||
adventure-platform-bukkit = "4.0.0-SNAPSHOT"
|
||||
adventure-platform-bukkit = "4.0.0"
|
||||
|
||||
# Plugins
|
||||
worldedit = "7.2.6"
|
||||
|
Reference in New Issue
Block a user