mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Perform code formatting according to editorconfig (#3981)
* Perform code reformatting * Fix javadoc errors
This commit is contained in:
parent
9cd0ee9b49
commit
e6db8e2750
@ -1,7 +1,7 @@
|
|||||||
name: Announce release on discord
|
name: Announce release on discord
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [ published ]
|
||||||
jobs:
|
jobs:
|
||||||
send_announcement:
|
send_announcement:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
4
.github/workflows/build-pr.yml
vendored
4
.github/workflows/build-pr.yml
vendored
@ -1,12 +1,12 @@
|
|||||||
name: Build PR
|
name: Build PR
|
||||||
on: [pull_request]
|
on: [ pull_request ]
|
||||||
jobs:
|
jobs:
|
||||||
build_pr:
|
build_pr:
|
||||||
if: github.repository_owner == 'IntellectualSites'
|
if: github.repository_owner == 'IntellectualSites'
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: ['java']
|
language: [ 'java' ]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
4
.github/workflows/release-drafter.yml
vendored
4
.github/workflows/release-drafter.yml
vendored
@ -4,9 +4,9 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- v6
|
- v6
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, reopened, synchronize]
|
types: [ opened, reopened, synchronize ]
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened, reopened, synchronize]
|
types: [ opened, reopened, synchronize ]
|
||||||
jobs:
|
jobs:
|
||||||
update_release_draft:
|
update_release_draft:
|
||||||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
||||||
|
@ -49,8 +49,8 @@ import com.plotsquared.bukkit.player.BukkitPlayerManager;
|
|||||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
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.UpdateUtility;
|
|
||||||
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;
|
||||||
@ -1185,9 +1185,17 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
public @NonNull String worldEditImplementations() {
|
public @NonNull String worldEditImplementations() {
|
||||||
StringBuilder msg = new StringBuilder();
|
StringBuilder msg = new StringBuilder();
|
||||||
if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
|
if (Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null) {
|
||||||
msg.append("FastAsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit").getDescription().getVersion());
|
msg.append("FastAsyncWorldEdit: ").append(Bukkit
|
||||||
|
.getPluginManager()
|
||||||
|
.getPlugin("FastAsyncWorldEdit")
|
||||||
|
.getDescription()
|
||||||
|
.getVersion());
|
||||||
} else if (Bukkit.getPluginManager().getPlugin("AsyncWorldEdit") != null) {
|
} else if (Bukkit.getPluginManager().getPlugin("AsyncWorldEdit") != null) {
|
||||||
msg.append("AsyncWorldEdit: ").append(Bukkit.getPluginManager().getPlugin("AsyncWorldEdit").getDescription().getVersion()).append("\n");
|
msg.append("AsyncWorldEdit: ").append(Bukkit
|
||||||
|
.getPluginManager()
|
||||||
|
.getPlugin("AsyncWorldEdit")
|
||||||
|
.getDescription()
|
||||||
|
.getVersion()).append("\n");
|
||||||
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
||||||
} else {
|
} else {
|
||||||
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
||||||
|
@ -382,7 +382,8 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
|||||||
}
|
}
|
||||||
PlotArea area = UncheckedWorldLocation.at(name, chunkX << 4, 0, chunkZ << 4).getPlotArea();
|
PlotArea area = UncheckedWorldLocation.at(name, chunkX << 4, 0, chunkZ << 4).getPlotArea();
|
||||||
if (area == null) {
|
if (area == null) {
|
||||||
throw new IllegalStateException(String.format("Cannot generate chunk that does not belong to a plot area. World: %s",
|
throw new IllegalStateException(String.format(
|
||||||
|
"Cannot generate chunk that does not belong to a plot area. World: %s",
|
||||||
name
|
name
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -759,7 +759,9 @@ public class BlockEventListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (block.getBlockData() instanceof Farmland farmland && event.getNewState().getBlockData() instanceof Farmland newFarmland) {
|
if (block.getBlockData() instanceof Farmland farmland && event
|
||||||
|
.getNewState()
|
||||||
|
.getBlockData() instanceof Farmland newFarmland) {
|
||||||
int currentMoisture = farmland.getMoisture();
|
int currentMoisture = farmland.getMoisture();
|
||||||
int newMoisture = newFarmland.getMoisture();
|
int newMoisture = newFarmland.getMoisture();
|
||||||
|
|
||||||
|
@ -92,7 +92,11 @@ public class BlockEventListener117 implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Plot plot = location.getOwnedPlot();
|
Plot plot = location.getOwnedPlot();
|
||||||
if (plot == null && !PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(area, MiscInteractFlag.class, true) || plot != null && !plot.getFlag(
|
if (plot == null && !PlotFlagUtil.isAreaRoadFlagsAndFlagEquals(
|
||||||
|
area,
|
||||||
|
MiscInteractFlag.class,
|
||||||
|
true
|
||||||
|
) || plot != null && !plot.getFlag(
|
||||||
MiscInteractFlag.class)) {
|
MiscInteractFlag.class)) {
|
||||||
if (plotPlayer != null) {
|
if (plotPlayer != null) {
|
||||||
if (plot != null) {
|
if (plot != null) {
|
||||||
|
@ -234,7 +234,8 @@ public class ChunkListener implements Listener {
|
|||||||
Chunk chunk = event.getChunk();
|
Chunk chunk = event.getChunk();
|
||||||
if (Settings.Chunk_Processor.AUTO_TRIM) {
|
if (Settings.Chunk_Processor.AUTO_TRIM) {
|
||||||
String world = chunk.getWorld().getName();
|
String world = chunk.getWorld().getName();
|
||||||
if ((!Settings.Enabled_Components.WORLDS || !SinglePlotArea.isSinglePlotWorld(world)) && this.plotAreaManager.hasPlotArea(world)) {
|
if ((!Settings.Enabled_Components.WORLDS || !SinglePlotArea.isSinglePlotWorld(world)) && this.plotAreaManager.hasPlotArea(
|
||||||
|
world)) {
|
||||||
if (unloadChunk(world, chunk, true)) {
|
if (unloadChunk(world, chunk, true)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,10 @@ import com.plotsquared.core.plot.flag.implementations.DoneFlag;
|
|||||||
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
||||||
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
import com.plotsquared.core.plot.flag.types.BooleanFlag;
|
||||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||||
|
import com.plotsquared.core.util.PlotFlagUtil;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||||
import com.plotsquared.core.util.PlotFlagUtil;
|
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.TileState;
|
import org.bukkit.block.TileState;
|
||||||
@ -439,9 +439,11 @@ public class PaperListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean getBooleanFlagValue(@NonNull FlagContainer container,
|
private boolean getBooleanFlagValue(
|
||||||
|
@NonNull FlagContainer container,
|
||||||
@NonNull Class<? extends BooleanFlag<?>> flagClass,
|
@NonNull Class<? extends BooleanFlag<?>> flagClass,
|
||||||
boolean defaultValue) {
|
boolean defaultValue
|
||||||
|
) {
|
||||||
BooleanFlag<?> flag = container.getFlag(flagClass);
|
BooleanFlag<?> flag = container.getFlag(flagClass);
|
||||||
return flag == null ? defaultValue : flag.getValue();
|
return flag == null ? defaultValue : flag.getValue();
|
||||||
}
|
}
|
||||||
|
@ -572,7 +572,8 @@ public class PlayerEventListener implements Listener {
|
|||||||
if (now == null) {
|
if (now == null) {
|
||||||
try (final MetaDataAccess<Boolean> kickAccess =
|
try (final MetaDataAccess<Boolean> kickAccess =
|
||||||
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
||||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) {
|
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(
|
||||||
|
false)) {
|
||||||
pp.sendMessage(
|
pp.sendMessage(
|
||||||
TranslatableCaption.of("permission.no_permission_event"),
|
TranslatableCaption.of("permission.no_permission_event"),
|
||||||
TagResolver.resolver(
|
TagResolver.resolver(
|
||||||
@ -665,7 +666,8 @@ public class PlayerEventListener implements Listener {
|
|||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
try (final MetaDataAccess<Boolean> kickAccess =
|
try (final MetaDataAccess<Boolean> kickAccess =
|
||||||
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
||||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(false)) {
|
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(
|
||||||
|
false)) {
|
||||||
pp.sendMessage(
|
pp.sendMessage(
|
||||||
TranslatableCaption.of("permission.no_permission_event"),
|
TranslatableCaption.of("permission.no_permission_event"),
|
||||||
TagResolver.resolver(
|
TagResolver.resolver(
|
||||||
|
@ -30,9 +30,9 @@ import com.plotsquared.core.plot.PlotArea;
|
|||||||
import com.plotsquared.core.plot.PlotHandler;
|
import com.plotsquared.core.plot.PlotHandler;
|
||||||
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
||||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||||
|
import com.plotsquared.core.util.PlotFlagUtil;
|
||||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||||
import com.plotsquared.core.util.PlotFlagUtil;
|
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -62,7 +62,6 @@ public class GenChunk extends ZeroedDelegateScopedQueueCoordinator {
|
|||||||
/**
|
/**
|
||||||
* @param minY minimum world Y, inclusive
|
* @param minY minimum world Y, inclusive
|
||||||
* @param maxY maximum world Y, inclusive
|
* @param maxY maximum world Y, inclusive
|
||||||
*
|
|
||||||
* @since 6.6.0
|
* @since 6.6.0
|
||||||
*/
|
*/
|
||||||
public GenChunk(int minY, int maxY) {
|
public GenChunk(int minY, int maxY) {
|
||||||
|
@ -60,4 +60,5 @@ public class TranslationUpdateManager {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,8 @@ public class UpdateUtility implements Listener {
|
|||||||
internalVersion = PlotSquared.get().getVersion();
|
internalVersion = PlotSquared.get().getVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"deprecation", "DefaultCharset"}) // Suppress Json deprecation, we can't use features from gson 2.8.1 and newer yet
|
@SuppressWarnings({"deprecation", "DefaultCharset"})
|
||||||
|
// Suppress Json deprecation, we can't use features from gson 2.8.1 and newer yet
|
||||||
public void updateChecker() {
|
public void updateChecker() {
|
||||||
task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> {
|
task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> {
|
||||||
try {
|
try {
|
||||||
|
@ -4,16 +4,16 @@ api-version: "1.13"
|
|||||||
version: "${version}"
|
version: "${version}"
|
||||||
load: STARTUP
|
load: STARTUP
|
||||||
description: "Easy, yet powerful Plot World generation and management."
|
description: "Easy, yet powerful Plot World generation and management."
|
||||||
authors: [Citymonstret, Empire92, MattBDev, dordsor21, NotMyFault, SirYwell]
|
authors: [ Citymonstret, Empire92, MattBDev, dordsor21, NotMyFault, SirYwell ]
|
||||||
website: https://www.spigotmc.org/resources/77506/
|
website: https://www.spigotmc.org/resources/77506/
|
||||||
softdepend: [Vault, PlaceholderAPI, Essentials, LuckPerms, BungeePerms, MVdWPlaceholderAPI]
|
softdepend: [ Vault, PlaceholderAPI, Essentials, LuckPerms, BungeePerms, MVdWPlaceholderAPI ]
|
||||||
loadbefore: [MultiWorld, Multiverse-Core]
|
loadbefore: [ MultiWorld, Multiverse-Core ]
|
||||||
depend: [WorldEdit]
|
depend: [ WorldEdit ]
|
||||||
database: false
|
database: false
|
||||||
commands:
|
commands:
|
||||||
plots:
|
plots:
|
||||||
description: Plot command.
|
description: Plot command.
|
||||||
aliases: [p,plot,ps,plotsquared,p2,2,plotme]
|
aliases: [ p,plot,ps,plotsquared,p2,2,plotme ]
|
||||||
permission: plots.use
|
permission: plots.use
|
||||||
permission-message: "You are lacking the permission node 'plots.use'"
|
permission-message: "You are lacking the permission node 'plots.use'"
|
||||||
permissions:
|
permissions:
|
||||||
|
@ -270,7 +270,11 @@ public class PlotSquared {
|
|||||||
captionMap = this.captionLoader.loadAll(this.platform.getDirectory().toPath().resolve("lang"));
|
captionMap = this.captionLoader.loadAll(this.platform.getDirectory().toPath().resolve("lang"));
|
||||||
} else {
|
} else {
|
||||||
String fileName = "messages_" + Settings.Enabled_Components.DEFAULT_LOCALE + ".json";
|
String fileName = "messages_" + Settings.Enabled_Components.DEFAULT_LOCALE + ".json";
|
||||||
captionMap = this.captionLoader.loadOrCreateSingle(this.platform.getDirectory().toPath().resolve("lang").resolve(fileName));
|
captionMap = this.captionLoader.loadOrCreateSingle(this.platform
|
||||||
|
.getDirectory()
|
||||||
|
.toPath()
|
||||||
|
.resolve("lang")
|
||||||
|
.resolve(fileName));
|
||||||
}
|
}
|
||||||
this.captionMaps.put(TranslatableCaption.DEFAULT_NAMESPACE, captionMap);
|
this.captionMaps.put(TranslatableCaption.DEFAULT_NAMESPACE, captionMap);
|
||||||
LOGGER.info(
|
LOGGER.info(
|
||||||
@ -1011,7 +1015,7 @@ public class PlotSquared {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup the configuration for a plot world based on world arguments.
|
* Setup the configuration for a plot world based on world arguments.
|
||||||
*
|
* <p>
|
||||||
*
|
*
|
||||||
* <i>e.g. /mv create <world> normal -g PlotSquared:<args></i>
|
* <i>e.g. /mv create <world> normal -g PlotSquared:<args></i>
|
||||||
*
|
*
|
||||||
|
@ -70,7 +70,8 @@ public class Add extends Command {
|
|||||||
plot.isOwner(player.getUUID()) || player.hasPermission(Permission.PERMISSION_ADMIN_COMMAND_TRUST),
|
plot.isOwner(player.getUUID()) || player.hasPermission(Permission.PERMISSION_ADMIN_COMMAND_TRUST),
|
||||||
TranslatableCaption.of("permission.no_plot_perms")
|
TranslatableCaption.of("permission.no_plot_perms")
|
||||||
);
|
);
|
||||||
checkTrue(args.length == 1,
|
checkTrue(
|
||||||
|
args.length == 1,
|
||||||
TranslatableCaption.of("commandconfig.command_syntax"),
|
TranslatableCaption.of("commandconfig.command_syntax"),
|
||||||
TagResolver.resolver("value", Tag.inserting(Component.text("/plot add <player | *>")))
|
TagResolver.resolver("value", Tag.inserting(Component.text("/plot add <player | *>")))
|
||||||
);
|
);
|
||||||
|
@ -69,7 +69,8 @@ public class Copy extends SubCommand {
|
|||||||
|
|
||||||
plot1.getPlotModificationManager().copy(plot2, player).thenAccept(result -> {
|
plot1.getPlotModificationManager().copy(plot2, player).thenAccept(result -> {
|
||||||
if (result) {
|
if (result) {
|
||||||
player.sendMessage(TranslatableCaption.of("move.copy_success"),
|
player.sendMessage(
|
||||||
|
TranslatableCaption.of("move.copy_success"),
|
||||||
TagResolver.builder()
|
TagResolver.builder()
|
||||||
.tag("origin", Tag.inserting(Component.text(plot1.toString())))
|
.tag("origin", Tag.inserting(Component.text(plot1.toString())))
|
||||||
.tag("target", Tag.inserting(Component.text(plot2.toString())))
|
.tag("target", Tag.inserting(Component.text(plot2.toString())))
|
||||||
|
@ -185,8 +185,11 @@ public class Download extends SubCommand {
|
|||||||
if (Settings.Web.LEGACY_WEBINTERFACE) {
|
if (Settings.Web.LEGACY_WEBINTERFACE) {
|
||||||
schematicHandler
|
schematicHandler
|
||||||
.getCompoundTag(plot)
|
.getCompoundTag(plot)
|
||||||
.whenComplete((compoundTag, throwable) -> {
|
.whenComplete((compoundTag, throwable) -> schematicHandler.upload(
|
||||||
schematicHandler.upload(compoundTag, null, null, new RunnableVal<>() {
|
compoundTag,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
new RunnableVal<>() {
|
||||||
@Override
|
@Override
|
||||||
public void run(URL value) {
|
public void run(URL value) {
|
||||||
plot.removeRunning();
|
plot.removeRunning();
|
||||||
@ -199,8 +202,8 @@ public class Download extends SubCommand {
|
|||||||
);
|
);
|
||||||
player.sendMessage(StaticCaption.of(value.toString()));
|
player.sendMessage(StaticCaption.of(value.toString()));
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
});
|
));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO legacy support
|
// TODO legacy support
|
||||||
|
@ -134,7 +134,12 @@ public class Help extends Command {
|
|||||||
TagResolver.builder()
|
TagResolver.builder()
|
||||||
.tag("command", Tag.inserting(Component.text("/plot help")))
|
.tag("command", Tag.inserting(Component.text("/plot help")))
|
||||||
.tag("category", Tag.inserting(Component.text("all")))
|
.tag("category", Tag.inserting(Component.text("all")))
|
||||||
.tag("category_desc", Tag.inserting(TranslatableCaption.of("help.help_display_all_commands").toComponent(player)))
|
.tag(
|
||||||
|
"category_desc",
|
||||||
|
Tag.inserting(TranslatableCaption
|
||||||
|
.of("help.help_display_all_commands")
|
||||||
|
.toComponent(player))
|
||||||
|
)
|
||||||
.build()
|
.build()
|
||||||
));
|
));
|
||||||
builder.append(Component.newline()).append(MINI_MESSAGE.deserialize(TranslatableCaption
|
builder.append(Component.newline()).append(MINI_MESSAGE.deserialize(TranslatableCaption
|
||||||
|
@ -52,7 +52,8 @@ public class Info extends SubCommand {
|
|||||||
arg = args[0];
|
arg = args[0];
|
||||||
switch (arg) {
|
switch (arg) {
|
||||||
// TODO: (re?)implement /plot info inv. (it was never properly implemented)
|
// TODO: (re?)implement /plot info inv. (it was never properly implemented)
|
||||||
case "trusted", "alias", "biome", "denied", "flags", "id", "size", "members", "creationdate", "seen", "owner", "rating", "likes" -> plot = Plot
|
case "trusted", "alias", "biome", "denied", "flags", "id", "size", "members", "creationdate", "seen", "owner", "rating", "likes" ->
|
||||||
|
plot = Plot
|
||||||
.getPlotFromString(player, null, false);
|
.getPlotFromString(player, null, false);
|
||||||
default -> {
|
default -> {
|
||||||
plot = Plot.getPlotFromString(player, arg, false);
|
plot = Plot.getPlotFromString(player, arg, false);
|
||||||
|
@ -221,7 +221,8 @@ public class Purge extends SubCommand {
|
|||||||
ids.add(plot.temp);
|
ids.add(plot.temp);
|
||||||
if (finalClear) {
|
if (finalClear) {
|
||||||
plot.getPlotModificationManager().clear(false, true, player,
|
plot.getPlotModificationManager().clear(false, true, player,
|
||||||
() -> LOGGER.info("Plot {} cleared by purge", plot.getId()));
|
() -> LOGGER.info("Plot {} cleared by purge", plot.getId())
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
plot.getPlotModificationManager().removeSign();
|
plot.getPlotModificationManager().removeSign();
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,8 @@ public record ComponentPreset(
|
|||||||
public static ComponentPreset deserialize(final @NonNull Map<String, Object> map) {
|
public static ComponentPreset deserialize(final @NonNull Map<String, Object> map) {
|
||||||
final ClassicPlotManagerComponent classicPlotManagerComponent = ClassicPlotManagerComponent
|
final ClassicPlotManagerComponent classicPlotManagerComponent = ClassicPlotManagerComponent
|
||||||
.fromString(map.getOrDefault("component", "").toString()).orElseThrow(() ->
|
.fromString(map.getOrDefault("component", "").toString()).orElseThrow(() ->
|
||||||
new IllegalArgumentException("The preset in components.yml needs a valid target component, got: " + map.get("component")));
|
new IllegalArgumentException("The preset in components.yml needs a valid target component, got: " + map.get(
|
||||||
|
"component")));
|
||||||
final String pattern = map.getOrDefault("pattern", "").toString();
|
final String pattern = map.getOrDefault("pattern", "").toString();
|
||||||
final double cost = Double.parseDouble(map.getOrDefault("cost", "0.0").toString());
|
final double cost = Double.parseDouble(map.getOrDefault("cost", "0.0").toString());
|
||||||
final String permission = map.getOrDefault("permission", "").toString();
|
final String permission = map.getOrDefault("permission", "").toString();
|
||||||
|
@ -225,7 +225,7 @@ public final class CaptionLoader {
|
|||||||
*/
|
*/
|
||||||
public @NonNull CaptionMap loadOrCreateSingle(final @NonNull Path file) throws IOException {
|
public @NonNull CaptionMap loadOrCreateSingle(final @NonNull Path file) throws IOException {
|
||||||
final Locale locale = this.localeExtractor.apply(file);
|
final Locale locale = this.localeExtractor.apply(file);
|
||||||
if (!Files.exists(file) ) {
|
if (!Files.exists(file)) {
|
||||||
Map<String, String> map = new LinkedHashMap<>();
|
Map<String, String> map = new LinkedHashMap<>();
|
||||||
patch(map, locale);
|
patch(map, locale);
|
||||||
save(file, map);
|
save(file, map);
|
||||||
|
@ -56,7 +56,8 @@ final class ClassLoaderCaptionProvider implements DefaultCaptionProvider {
|
|||||||
LOGGER.info("No resource for locale '{}' found in the plugin file." +
|
LOGGER.info("No resource for locale '{}' found in the plugin file." +
|
||||||
"Please ensure you have placed the latest version of the file messages_{}.json in the 'lang' folder." +
|
"Please ensure you have placed the latest version of the file messages_{}.json in the 'lang' folder." +
|
||||||
"You may be able to find completed translations at https://intellectualsites.crowdin.com/plotsquared",
|
"You may be able to find completed translations at https://intellectualsites.crowdin.com/plotsquared",
|
||||||
locale, locale);
|
locale, locale
|
||||||
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
try (final BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) {
|
try (final BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) {
|
||||||
|
@ -53,7 +53,8 @@ public abstract class EntityEvent {
|
|||||||
* @return the event class name
|
* @return the event class name
|
||||||
* @since 6.11.0
|
* @since 6.11.0
|
||||||
*/
|
*/
|
||||||
@NonNull public String getEventName() {
|
@NonNull
|
||||||
|
public String getEventName() {
|
||||||
if (this.name == null) {
|
if (this.name == null) {
|
||||||
this.name = this.getClass().getSimpleName();
|
this.name = this.getClass().getSimpleName();
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ import javax.annotation.Nullable;
|
|||||||
|
|
||||||
@SuppressWarnings("WeakerAccess")
|
@SuppressWarnings("WeakerAccess")
|
||||||
public abstract class ClassicPlotWorld extends SquarePlotWorld {
|
public abstract class ClassicPlotWorld extends SquarePlotWorld {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + ClassicPlotWorld.class.getSimpleName());
|
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + ClassicPlotWorld.class.getSimpleName());
|
||||||
|
|
||||||
public int ROAD_HEIGHT = 62;
|
public int ROAD_HEIGHT = 62;
|
||||||
@ -64,6 +65,21 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
|
|||||||
super(worldName, id, generator, min, max, worldConfiguration, blockQueue);
|
super(worldName, id, generator, min, max, worldConfiguration, blockQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static BlockBucket createCheckedBlockBucket(String input, BlockBucket def) {
|
||||||
|
final BlockBucket bucket = new BlockBucket(input);
|
||||||
|
Pattern pattern = null;
|
||||||
|
try {
|
||||||
|
pattern = bucket.toPattern();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
}
|
||||||
|
if (pattern == null) {
|
||||||
|
LOGGER.error("Failed to parse pattern '{}', check your worlds.yml", input);
|
||||||
|
LOGGER.error("Falling back to {}", def);
|
||||||
|
return def;
|
||||||
|
}
|
||||||
|
return bucket;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CONFIG NODE | DEFAULT VALUE | DESCRIPTION | CONFIGURATION TYPE | REQUIRED FOR INITIAL SETUP.
|
* CONFIG NODE | DEFAULT VALUE | DESCRIPTION | CONFIGURATION TYPE | REQUIRED FOR INITIAL SETUP.
|
||||||
*
|
*
|
||||||
@ -144,19 +160,4 @@ public abstract class ClassicPlotWorld extends SquarePlotWorld {
|
|||||||
return Math.min(WALL_HEIGHT, plotRoadMin);
|
return Math.min(WALL_HEIGHT, plotRoadMin);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BlockBucket createCheckedBlockBucket(String input, BlockBucket def) {
|
|
||||||
final BlockBucket bucket = new BlockBucket(input);
|
|
||||||
Pattern pattern = null;
|
|
||||||
try {
|
|
||||||
pattern = bucket.toPattern();
|
|
||||||
} catch (Exception ignore) {
|
|
||||||
}
|
|
||||||
if (pattern == null) {
|
|
||||||
LOGGER.error("Failed to parse pattern '{}', check your worlds.yml", input);
|
|
||||||
LOGGER.error("Falling back to {}", def);
|
|
||||||
return def;
|
|
||||||
}
|
|
||||||
return bucket;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -341,7 +341,10 @@ public class HybridGen extends IndependentPlotGenerator {
|
|||||||
for (Entity entity : hybridPlotWorld.getPlotSchematicEntities()) {
|
for (Entity entity : hybridPlotWorld.getPlotSchematicEntities()) {
|
||||||
if (region.contains(entity.getLocation().toVector().toBlockPoint())) {
|
if (region.contains(entity.getLocation().toVector().toBlockPoint())) {
|
||||||
Vector3 pos = (entity.getLocation().toVector()
|
Vector3 pos = (entity.getLocation().toVector()
|
||||||
.subtract(region.getMinimumPoint().withY(hybridPlotWorld.getPlotSchematicMinPoint().getY()).toVector3()))
|
.subtract(region
|
||||||
|
.getMinimumPoint()
|
||||||
|
.withY(hybridPlotWorld.getPlotSchematicMinPoint().getY())
|
||||||
|
.toVector3()))
|
||||||
.add(min.getBlockVector3().withY(hybridPlotWorld.SCHEM_Y).toVector3());
|
.add(min.getBlockVector3().withY(hybridPlotWorld.SCHEM_Y).toVector3());
|
||||||
result.setEntity(new PopulatingEntity(
|
result.setEntity(new PopulatingEntity(
|
||||||
entity,
|
entity,
|
||||||
@ -399,6 +402,12 @@ public class HybridGen extends IndependentPlotGenerator {
|
|||||||
return biome == null ? hybridPlotWorld.getPlotBiome() : biome;
|
return biome == null ? hybridPlotWorld.getPlotBiome() : biome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private enum SchematicFeature {
|
||||||
|
BIOMES,
|
||||||
|
ROAD,
|
||||||
|
POPULATING
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper to allow a WorldEdit {@link Entity} to effectively have a mutable location as the location in its NBT should be changed
|
* Wrapper to allow a WorldEdit {@link Entity} to effectively have a mutable location as the location in its NBT should be changed
|
||||||
* when set to the world.
|
* when set to the world.
|
||||||
@ -453,10 +462,4 @@ public class HybridGen extends IndependentPlotGenerator {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum SchematicFeature {
|
|
||||||
BIOMES,
|
|
||||||
ROAD,
|
|
||||||
POPULATING
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,11 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
(pos1.getX() + pos2.getX()) / 2,
|
(pos1.getX() + pos2.getX()) / 2,
|
||||||
(pos1.getZ() + pos2.getZ()) / 2
|
(pos1.getZ() + pos2.getZ()) / 2
|
||||||
), biome)) {
|
), biome)) {
|
||||||
WorldUtil.setBiome(hybridPlotWorld.getWorldName(), new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()), biome);
|
WorldUtil.setBiome(
|
||||||
|
hybridPlotWorld.getWorldName(),
|
||||||
|
new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()),
|
||||||
|
biome
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,8 +207,18 @@ public class HybridPlotManager extends ClassicPlotManager {
|
|||||||
PlotId id2 = PlotId.of(id.getX(), id.getY() + 1);
|
PlotId id2 = PlotId.of(id.getX(), id.getY() + 1);
|
||||||
Location bot = getPlotBottomLocAbs(id2);
|
Location bot = getPlotBottomLocAbs(id2);
|
||||||
Location top = getPlotTopLocAbs(id);
|
Location top = getPlotTopLocAbs(id);
|
||||||
Location pos1 = Location.at(hybridPlotWorld.getWorldName(), bot.getX() - 1, hybridPlotWorld.getMinGenHeight(), top.getZ() + 1);
|
Location pos1 = Location.at(
|
||||||
Location pos2 = Location.at(hybridPlotWorld.getWorldName(), top.getX() + 1, hybridPlotWorld.getMaxGenHeight(), bot.getZ());
|
hybridPlotWorld.getWorldName(),
|
||||||
|
bot.getX() - 1,
|
||||||
|
hybridPlotWorld.getMinGenHeight(),
|
||||||
|
top.getZ() + 1
|
||||||
|
);
|
||||||
|
Location pos2 = Location.at(
|
||||||
|
hybridPlotWorld.getWorldName(),
|
||||||
|
top.getX() + 1,
|
||||||
|
hybridPlotWorld.getMaxGenHeight(),
|
||||||
|
bot.getZ()
|
||||||
|
);
|
||||||
this.resetBiome(hybridPlotWorld, pos1, pos2);
|
this.resetBiome(hybridPlotWorld, pos1, pos2);
|
||||||
if (!hybridPlotWorld.ROAD_SCHEMATIC_ENABLED) {
|
if (!hybridPlotWorld.ROAD_SCHEMATIC_ENABLED) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -57,7 +57,8 @@ public abstract class IndependentPlotGenerator {
|
|||||||
* @param setting PlotArea (settings)
|
* @param setting PlotArea (settings)
|
||||||
* @since TODO
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public void populateChunk(ZeroedDelegateScopedQueueCoordinator result, PlotArea setting) {}
|
public void populateChunk(ZeroedDelegateScopedQueueCoordinator result, PlotArea setting) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a new PlotArea object.
|
* Return a new PlotArea object.
|
||||||
|
@ -142,7 +142,9 @@ public class PlotListener {
|
|||||||
Map.Entry<UUID, List<StatusEffect>> entry = iterator.next();
|
Map.Entry<UUID, List<StatusEffect>> entry = iterator.next();
|
||||||
List<StatusEffect> effects = entry.getValue();
|
List<StatusEffect> effects = entry.getValue();
|
||||||
effects.removeIf(effect -> currentTime > effect.expiresAt);
|
effects.removeIf(effect -> currentTime > effect.expiresAt);
|
||||||
if (effects.isEmpty()) iterator.remove();
|
if (effects.isEmpty()) {
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, TaskTime.seconds(1L));
|
}, TaskTime.seconds(1L));
|
||||||
@ -486,6 +488,7 @@ public class PlotListener {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks an effect as a status effect that will be removed on leaving a plot
|
* Marks an effect as a status effect that will be removed on leaving a plot
|
||||||
|
*
|
||||||
* @param uuid The uuid of the player the effect belongs to
|
* @param uuid The uuid of the player the effect belongs to
|
||||||
* @param name The name of the status effect
|
* @param name The name of the status effect
|
||||||
* @param expiresAt The time when the effect expires
|
* @param expiresAt The time when the effect expires
|
||||||
|
@ -51,7 +51,6 @@ public final class UncheckedWorldLocation extends Location {
|
|||||||
* @param y Y coordinate
|
* @param y Y coordinate
|
||||||
* @param z Z coordinate
|
* @param z Z coordinate
|
||||||
* @return New location
|
* @return New location
|
||||||
*
|
|
||||||
* @since 6.9.0
|
* @since 6.9.0
|
||||||
*/
|
*/
|
||||||
@DoNotUse
|
@DoNotUse
|
||||||
|
@ -658,8 +658,10 @@ public abstract class PlotArea implements ComponentLike {
|
|||||||
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("maxHeight",
|
.tag(
|
||||||
Tag.inserting(Component.text(maxBuildHeight))).build()
|
"maxHeight",
|
||||||
|
Tag.inserting(Component.text(maxBuildHeight))
|
||||||
|
).build()
|
||||||
);
|
);
|
||||||
// Return true if "failed" as the method will always be inverted otherwise
|
// Return true if "failed" as the method will always be inverted otherwise
|
||||||
return true;
|
return true;
|
||||||
|
@ -154,6 +154,7 @@ public class ExpiryTask {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns {@code true} if this task respects unknown owners
|
* Returns {@code true} if this task respects unknown owners
|
||||||
|
*
|
||||||
* @return {@code true} if unknown owners should be counted as never online
|
* @return {@code true} if unknown owners should be counted as never online
|
||||||
* @since 6.4.0
|
* @since 6.4.0
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@ public class BeaconEffectsFlag extends BooleanFlag<BeaconEffectsFlag> {
|
|||||||
public static final BeaconEffectsFlag BEACON_EFFECT_TRUE = new BeaconEffectsFlag(true);
|
public static final BeaconEffectsFlag BEACON_EFFECT_TRUE = new BeaconEffectsFlag(true);
|
||||||
public static final BeaconEffectsFlag BEACON_EFFECT_FALSE = new BeaconEffectsFlag(false);
|
public static final BeaconEffectsFlag BEACON_EFFECT_FALSE = new BeaconEffectsFlag(false);
|
||||||
|
|
||||||
private BeaconEffectsFlag(boolean value){
|
private BeaconEffectsFlag(boolean value) {
|
||||||
super(value, TranslatableCaption.of("flags.flag_description_beacon_effect"));
|
super(value, TranslatableCaption.of("flags.flag_description_beacon_effect"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ public class ProjectilesFlag extends BooleanFlag<ProjectilesFlag> {
|
|||||||
public static final ProjectilesFlag PROJECTILES_TRUE = new ProjectilesFlag(true);
|
public static final ProjectilesFlag PROJECTILES_TRUE = new ProjectilesFlag(true);
|
||||||
public static final ProjectilesFlag PROJECTILES_FALSE = new ProjectilesFlag(false);
|
public static final ProjectilesFlag PROJECTILES_FALSE = new ProjectilesFlag(false);
|
||||||
|
|
||||||
private ProjectilesFlag(boolean value){
|
private ProjectilesFlag(boolean value) {
|
||||||
super(value, TranslatableCaption.of("flags.flag_description_projectiles"));
|
super(value, TranslatableCaption.of("flags.flag_description_projectiles"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ public class SinglePlotArea extends GridPlotWorld {
|
|||||||
* Returns true if the given string matches the naming system used to identify single plot worlds
|
* Returns true if the given string matches the naming system used to identify single plot worlds
|
||||||
* e.g. -1_5 represents plot id *;-1;5. "*" being the plot area name given to single plot world
|
* e.g. -1_5 represents plot id *;-1;5. "*" being the plot area name given to single plot world
|
||||||
* {@link com.plotsquared.core.plot.PlotArea}.
|
* {@link com.plotsquared.core.plot.PlotArea}.
|
||||||
|
*
|
||||||
* @since 6.1.4
|
* @since 6.1.4
|
||||||
*/
|
*/
|
||||||
public static boolean isSinglePlotWorld(String worldName) {
|
public static boolean isSinglePlotWorld(String worldName) {
|
||||||
|
@ -36,7 +36,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||||||
* The min and max points of this queue are offset according to the minimum point given in the constructor, and the offsets set
|
* The min and max points of this queue are offset according to the minimum point given in the constructor, and the offsets set
|
||||||
* in {@link BlockArrayCacheScopedQueueCoordinator#setOffsetX(int)} and
|
* in {@link BlockArrayCacheScopedQueueCoordinator#setOffsetX(int)} and
|
||||||
* {@link BlockArrayCacheScopedQueueCoordinator#setOffsetZ(int)}
|
* {@link BlockArrayCacheScopedQueueCoordinator#setOffsetZ(int)}
|
||||||
*
|
* <p>
|
||||||
* Internal use only. Subject to change at any time and created for specific use cases.
|
* Internal use only. Subject to change at any time and created for specific use cases.
|
||||||
*/
|
*/
|
||||||
@NotPublic
|
@NotPublic
|
||||||
@ -54,6 +54,7 @@ public class BlockArrayCacheScopedQueueCoordinator extends ZeroedDelegateScopedQ
|
|||||||
private final int scopeMaxZ;
|
private final int scopeMaxZ;
|
||||||
private int offsetX = 0;
|
private int offsetX = 0;
|
||||||
private int offsetZ = 0;
|
private int offsetZ = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct a new instance
|
* Construct a new instance
|
||||||
*
|
*
|
||||||
|
@ -29,6 +29,7 @@ public abstract class ChunkCoordinator implements Runnable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Cancel the chunk coordinator.
|
* Cancel the chunk coordinator.
|
||||||
|
*
|
||||||
* @since 6.0.10
|
* @since 6.0.10
|
||||||
*/
|
*/
|
||||||
public abstract void cancel();
|
public abstract void cancel();
|
||||||
|
@ -43,11 +43,10 @@ import java.util.function.Consumer;
|
|||||||
|
|
||||||
public abstract class QueueCoordinator {
|
public abstract class QueueCoordinator {
|
||||||
|
|
||||||
|
private final AtomicBoolean enqueued = new AtomicBoolean();
|
||||||
private boolean forceSync = false;
|
private boolean forceSync = false;
|
||||||
@Nullable
|
@Nullable
|
||||||
private Object chunkObject;
|
private Object chunkObject;
|
||||||
private final AtomicBoolean enqueued = new AtomicBoolean();
|
|
||||||
|
|
||||||
@SuppressWarnings({"unused", "FieldCanBeLocal"})
|
@SuppressWarnings({"unused", "FieldCanBeLocal"})
|
||||||
@Inject
|
@Inject
|
||||||
private GlobalBlockQueue blockQueue;
|
private GlobalBlockQueue blockQueue;
|
||||||
|
@ -53,8 +53,10 @@ public abstract class InventoryUtil {
|
|||||||
* @param item The item to place into the inventory
|
* @param item The item to place into the inventory
|
||||||
* @see #setItemChecked(PlotInventory, int, PlotItemStack)
|
* @see #setItemChecked(PlotInventory, int, PlotItemStack)
|
||||||
*/
|
*/
|
||||||
public void setItem(final PlotInventory plotInventory, final int index,
|
public void setItem(
|
||||||
final PlotItemStack item) {
|
final PlotInventory plotInventory, final int index,
|
||||||
|
final PlotItemStack item
|
||||||
|
) {
|
||||||
setItemChecked(plotInventory, index, item);
|
setItemChecked(plotInventory, index, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,7 +272,8 @@ public abstract class RegionManager {
|
|||||||
fromQueue1.addReadChunks(new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()).getChunks());
|
fromQueue1.addReadChunks(new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()).getChunks());
|
||||||
fromQueue2.addReadChunks(new CuboidRegion(
|
fromQueue2.addReadChunks(new CuboidRegion(
|
||||||
swapPos.getBlockVector3(),
|
swapPos.getBlockVector3(),
|
||||||
BlockVector3.at(swapPos.getX() + pos2.getX() - pos1.getX(),
|
BlockVector3.at(
|
||||||
|
swapPos.getX() + pos2.getX() - pos1.getX(),
|
||||||
pos1.getY(),
|
pos1.getY(),
|
||||||
swapPos.getZ() + pos2.getZ() - pos1.getZ()
|
swapPos.getZ() + pos2.getZ() - pos1.getZ()
|
||||||
)
|
)
|
||||||
|
@ -285,7 +285,8 @@ public abstract class WorldUtil {
|
|||||||
int trz = top.getZ() >> 9;
|
int trz = top.getZ() >> 9;
|
||||||
Set<BlockVector2> files = getChunkChunks(bot.getWorldName());
|
Set<BlockVector2> files = getChunkChunks(bot.getWorldName());
|
||||||
for (BlockVector2 mca : files) {
|
for (BlockVector2 mca : files) {
|
||||||
if (mca.getX() >= brx && mca.getX() <= trx && mca.getZ() >= brz && mca.getZ() <= trz && !added.contains(mca)) {
|
if (mca.getX() >= brx && mca.getX() <= trx && mca.getZ() >= brz && mca.getZ() <= trz && !added.contains(
|
||||||
|
mca)) {
|
||||||
final File file = getMcr(plot.getWorldName(), mca.getX(), mca.getZ());
|
final File file = getMcr(plot.getWorldName(), mca.getX(), mca.getZ());
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
//final String name = "r." + (x - cx) + "." + (z - cz) + ".mca";
|
//final String name = "r." + (x - cx) + "." + (z - cz) + ".mca";
|
||||||
|
@ -102,7 +102,7 @@ public final class PlaceholderRegistry {
|
|||||||
return plot.getAlias();
|
return plot.getAlias();
|
||||||
});
|
});
|
||||||
this.createPlaceholder("currentplot_owner", (player, plot) -> {
|
this.createPlaceholder("currentplot_owner", (player, plot) -> {
|
||||||
if (plot.getFlag(ServerPlotFlag.class)){
|
if (plot.getFlag(ServerPlotFlag.class)) {
|
||||||
return legacyComponent(TranslatableCaption.of("info.server"), player);
|
return legacyComponent(TranslatableCaption.of("info.server"), player);
|
||||||
}
|
}
|
||||||
final UUID plotOwner = plot.getOwnerAbs();
|
final UUID plotOwner = plot.getOwnerAbs();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -128,4 +128,5 @@ public class FlagTest {
|
|||||||
((TranslatableCaption) exception.getErrorMessage()).getKey()
|
((TranslatableCaption) exception.getErrorMessage()).getKey()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -107,4 +107,5 @@ public class PlotRangeIteratorTest {
|
|||||||
Assertions.assertFalse(range.hasNext());
|
Assertions.assertFalse(range.hasNext());
|
||||||
Assertions.assertThrows(NoSuchElementException.class, range::next);
|
Assertions.assertThrows(NoSuchElementException.class, range::next);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,4 +51,5 @@ class LockRepositoryTest {
|
|||||||
}));
|
}));
|
||||||
Assertions.assertFalse(lock.isLocked());
|
Assertions.assertFalse(lock.isLocked());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,10 @@ public class StringManTest {
|
|||||||
new Message("title \"sub title\"", List.of("title", "sub title")),
|
new Message("title \"sub title\"", List.of("title", "sub title")),
|
||||||
new Message("\"a title\" subtitle", List.of("a title", "subtitle")),
|
new Message("\"a title\" subtitle", List.of("a title", "subtitle")),
|
||||||
new Message("\"title\" \"subtitle\"", List.of("title", "subtitle")),
|
new Message("\"title\" \"subtitle\"", List.of("title", "subtitle")),
|
||||||
new Message("\"How <bold>bold</bold> of you\" \"to assume I like <rainbow>rainbows</rainbow>\"",
|
new Message(
|
||||||
List.of("How <bold>bold</bold> of you", "to assume I like <rainbow>rainbows</rainbow>"))
|
"\"How <bold>bold</bold> of you\" \"to assume I like <rainbow>rainbows</rainbow>\"",
|
||||||
|
List.of("How <bold>bold</bold> of you", "to assume I like <rainbow>rainbows</rainbow>")
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
for (Message message : messages) {
|
for (Message message : messages) {
|
||||||
@ -53,4 +55,5 @@ public class StringManTest {
|
|||||||
private record Message(String input, List<String> expected) {
|
private record Message(String input, List<String> expected) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
14
README.md
14
README.md
@ -33,11 +33,13 @@ is to provide a lag-free and smooth experience.
|
|||||||
* [Contributing](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md)
|
* [Contributing](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md)
|
||||||
|
|
||||||
### Developer Resources
|
### Developer Resources
|
||||||
|
|
||||||
* [API Documentation](https://intellectualsites.github.io/plotsquared-documentation/api/api-documentation)
|
* [API Documentation](https://intellectualsites.github.io/plotsquared-documentation/api/api-documentation)
|
||||||
* [Event API](https://intellectualsites.github.io/plotsquared-documentation/api/event-api)
|
* [Event API](https://intellectualsites.github.io/plotsquared-documentation/api/event-api)
|
||||||
* [Flag API](https://intellectualsites.github.io/plotsquared-documentation/api/flag-api)
|
* [Flag API](https://intellectualsites.github.io/plotsquared-documentation/api/flag-api)
|
||||||
|
|
||||||
# Official Addons
|
# Official Addons
|
||||||
|
|
||||||
* [Plot2Dynmap](http://www.spigotmc.org/resources/plot2dynmap.1292/)
|
* [Plot2Dynmap](http://www.spigotmc.org/resources/plot2dynmap.1292/)
|
||||||
* [HoloPlots](https://www.spigotmc.org/resources/holoplots.4880/)
|
* [HoloPlots](https://www.spigotmc.org/resources/holoplots.4880/)
|
||||||
* [PlotHider](https://www.spigotmc.org/resources/plot-hider.20701/)
|
* [PlotHider](https://www.spigotmc.org/resources/plot-hider.20701/)
|
||||||
@ -46,10 +48,14 @@ is to provide a lag-free and smooth experience.
|
|||||||
|
|
||||||
Want to add new features to PlotSquared or fix bugs yourself? You can get the game running, with PlotSquared, from the code here:
|
Want to add new features to PlotSquared or fix bugs yourself? You can get the game running, with PlotSquared, from the code here:
|
||||||
|
|
||||||
For additional information about compiling PlotSquared, see [CONTRIBUTING.md](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md)
|
For additional information about compiling PlotSquared,
|
||||||
|
see [CONTRIBUTING.md](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md)
|
||||||
|
|
||||||
### Submitting Your Changes
|
### Submitting Your Changes
|
||||||
PlotSquared is open source (specifically licensed under GPL v3), so note that your contributions will also be open source. The best way to submit a change is to create a fork on GitHub, put your changes there, and then create a "pull request" on our PlotSquared repository.
|
|
||||||
|
PlotSquared is open source (specifically licensed under GPL v3), so note that your contributions will also be open source. The
|
||||||
|
best way to submit a change is to create a fork on GitHub, put your changes there, and then create a "pull request" on our
|
||||||
|
PlotSquared repository.
|
||||||
|
|
||||||
<a href="https://yourkit.com/">
|
<a href="https://yourkit.com/">
|
||||||
<img src="https://www.yourkit.com/images/yklogo.png">
|
<img src="https://www.yourkit.com/images/yklogo.png">
|
||||||
@ -57,4 +63,6 @@ PlotSquared is open source (specifically licensed under GPL v3), so note that yo
|
|||||||
|
|
||||||
Thank you to YourKit for supporting our product by providing us with their innovative and intelligent tools
|
Thank you to YourKit for supporting our product by providing us with their innovative and intelligent tools
|
||||||
for monitoring and profiling Java and .NET applications.
|
for monitoring and profiling Java and .NET applications.
|
||||||
YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/), and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).
|
YourKit is the creator
|
||||||
|
of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/), [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/),
|
||||||
|
and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import com.diffplug.gradle.spotless.SpotlessPlugin
|
||||||
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
|
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import com.diffplug.gradle.spotless.SpotlessPlugin
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
java
|
java
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Javadocs generated for
|
Javadocs generated for
|
||||||
<a rel="noopener nofollow noreferrer" href="https://github.com/IntellectualSites/PlotSquared/" target="_blank"> PlotSquared</a> |
|
<a href="https://github.com/IntellectualSites/PlotSquared/" rel="noopener nofollow noreferrer" target="_blank"> PlotSquared</a> |
|
||||||
<a rel="noopener nofollow noreferrer" href="https://intellectualsites.github.io/plotsquared-documentation/"> Documentation </a> |
|
<a href="https://intellectualsites.github.io/plotsquared-documentation/" rel="noopener nofollow noreferrer"> Documentation </a> |
|
||||||
Visit us on our <a rel="noopener nofollow noreferrer" href="https://discord.gg/intellectualsites"> Discord server</a> :)
|
Visit us on our <a href="https://discord.gg/intellectualsites" rel="noopener nofollow noreferrer"> Discord server</a> :)
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema" : "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": [
|
"extends" : [
|
||||||
"config:base",
|
"config:base",
|
||||||
":semanticCommitsDisabled"
|
":semanticCommitsDisabled"
|
||||||
],
|
],
|
||||||
"labels": ["dependencies"],
|
"labels" : [
|
||||||
"rebaseWhen": "conflicted",
|
"dependencies"
|
||||||
"schedule": ["on the first day of the week"]
|
],
|
||||||
|
"rebaseWhen" : "conflicted",
|
||||||
|
"schedule" : [
|
||||||
|
"on the first day of the week"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user