mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Perform code formatting according to editorconfig (#3981)
* Perform code reformatting * Fix javadoc errors
This commit is contained in:

committed by
GitHub

parent
9cd0ee9b49
commit
e6db8e2750
@ -49,8 +49,8 @@ import com.plotsquared.bukkit.player.BukkitPlayerManager;
|
||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||
import com.plotsquared.bukkit.util.BukkitWorld;
|
||||
import com.plotsquared.bukkit.util.SetGenCB;
|
||||
import com.plotsquared.bukkit.util.UpdateUtility;
|
||||
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.PaperTimeConverter;
|
||||
import com.plotsquared.bukkit.util.task.SpigotTimeConverter;
|
||||
@ -366,7 +366,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(ServerListener.class), this);
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(EntitySpawnListener.class), this);
|
||||
if (PaperLib.isPaper() && Settings.Paper_Components.PAPER_LISTENERS) {
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener.class), this);
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener.class), this);
|
||||
} else {
|
||||
getServer().getPluginManager().registerEvents(injector().getInstance(SpigotListener.class), this);
|
||||
}
|
||||
@ -1185,9 +1185,17 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
public @NonNull String worldEditImplementations() {
|
||||
StringBuilder msg = new StringBuilder();
|
||||
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) {
|
||||
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());
|
||||
} else {
|
||||
msg.append("WorldEdit: ").append(Bukkit.getPluginManager().getPlugin("WorldEdit").getDescription().getVersion());
|
||||
|
@ -54,7 +54,7 @@ import java.util.Set;
|
||||
|
||||
public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrapper<ChunkGenerator> {
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + BukkitPlotGenerator.class.getSimpleName());
|
||||
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + BukkitPlotGenerator.class.getSimpleName());
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public final boolean PAPER_ASYNC_SAFE = true;
|
||||
@ -382,7 +382,8 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
||||
}
|
||||
PlotArea area = UncheckedWorldLocation.at(name, chunkX << 4, 0, chunkZ << 4).getPlotArea();
|
||||
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
|
||||
));
|
||||
}
|
||||
|
@ -759,7 +759,9 @@ public class BlockEventListener implements Listener {
|
||||
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 newMoisture = newFarmland.getMoisture();
|
||||
|
||||
|
@ -92,7 +92,11 @@ public class BlockEventListener117 implements Listener {
|
||||
}
|
||||
|
||||
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)) {
|
||||
if (plotPlayer != null) {
|
||||
if (plot != null) {
|
||||
|
@ -234,7 +234,8 @@ public class ChunkListener implements Listener {
|
||||
Chunk chunk = event.getChunk();
|
||||
if (Settings.Chunk_Processor.AUTO_TRIM) {
|
||||
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)) {
|
||||
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.types.BooleanFlag;
|
||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||
import com.plotsquared.core.util.PlotFlagUtil;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.tag.Tag;
|
||||
import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver;
|
||||
import com.plotsquared.core.util.PlotFlagUtil;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.TileState;
|
||||
@ -439,9 +439,11 @@ public class PaperListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean getBooleanFlagValue(@NonNull FlagContainer container,
|
||||
@NonNull Class<? extends BooleanFlag<?>> flagClass,
|
||||
boolean defaultValue) {
|
||||
private boolean getBooleanFlagValue(
|
||||
@NonNull FlagContainer container,
|
||||
@NonNull Class<? extends BooleanFlag<?>> flagClass,
|
||||
boolean defaultValue
|
||||
) {
|
||||
BooleanFlag<?> flag = container.getFlag(flagClass);
|
||||
return flag == null ? defaultValue : flag.getValue();
|
||||
}
|
||||
|
@ -572,7 +572,8 @@ public class PlayerEventListener implements Listener {
|
||||
if (now == null) {
|
||||
try (final MetaDataAccess<Boolean> kickAccess =
|
||||
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(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
TagResolver.resolver(
|
||||
@ -665,7 +666,8 @@ public class PlayerEventListener implements Listener {
|
||||
if (plot == null) {
|
||||
try (final MetaDataAccess<Boolean> kickAccess =
|
||||
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(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
TagResolver.resolver(
|
||||
|
@ -30,9 +30,9 @@ import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.PlotHandler;
|
||||
import com.plotsquared.core.plot.flag.implementations.ProjectilesFlag;
|
||||
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.resolver.TagResolver;
|
||||
import com.plotsquared.core.util.PlotFlagUtil;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
@ -43,7 +43,7 @@ public class BukkitOfflinePlayer implements OfflinePlotPlayer {
|
||||
*/
|
||||
public BukkitOfflinePlayer(
|
||||
final @NonNull OfflinePlayer player, final @NonNull
|
||||
PermissionHandler permissionHandler
|
||||
PermissionHandler permissionHandler
|
||||
) {
|
||||
this.player = player;
|
||||
this.permissionProfile = permissionHandler.getPermissionProfile(this)
|
||||
|
@ -270,7 +270,7 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator {
|
||||
if (getChunkObject() instanceof Chunk chunkObject) {
|
||||
existing = chunkObject.getBlock(x & 15, y, z & 15);
|
||||
} else {
|
||||
existing = getBukkitWorld().getBlockAt(x, y, z);
|
||||
existing = getBukkitWorld().getBlockAt(x, y, z);
|
||||
}
|
||||
final BlockState existingBaseBlock = BukkitAdapter.adapt(existing.getBlockData());
|
||||
if (BukkitBlockUtil.get(existing).equals(existingBaseBlock) && existing.getBlockData().matches(blockData)) {
|
||||
|
@ -62,7 +62,6 @@ public class GenChunk extends ZeroedDelegateScopedQueueCoordinator {
|
||||
/**
|
||||
* @param minY minimum world Y, inclusive
|
||||
* @param maxY maximum world Y, inclusive
|
||||
*
|
||||
* @since 6.6.0
|
||||
*/
|
||||
public GenChunk(int minY, int maxY) {
|
||||
|
@ -70,7 +70,7 @@ public class BukkitRegionManager extends RegionManager {
|
||||
@Inject
|
||||
public BukkitRegionManager(
|
||||
@NonNull WorldUtil worldUtil, @NonNull GlobalBlockQueue blockQueue, @NonNull
|
||||
ProgressSubscriberFactory subscriberFactory
|
||||
ProgressSubscriberFactory subscriberFactory
|
||||
) {
|
||||
super(worldUtil, blockQueue, subscriberFactory);
|
||||
this.blockQueue = blockQueue;
|
||||
|
@ -60,4 +60,5 @@ public class TranslationUpdateManager {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,7 +54,8 @@ public class UpdateUtility implements Listener {
|
||||
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() {
|
||||
task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.javaPlugin, () -> {
|
||||
try {
|
||||
|
@ -4,16 +4,16 @@ api-version: "1.13"
|
||||
version: "${version}"
|
||||
load: STARTUP
|
||||
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/
|
||||
softdepend: [Vault, PlaceholderAPI, Essentials, LuckPerms, BungeePerms, MVdWPlaceholderAPI]
|
||||
loadbefore: [MultiWorld, Multiverse-Core]
|
||||
depend: [WorldEdit]
|
||||
softdepend: [ Vault, PlaceholderAPI, Essentials, LuckPerms, BungeePerms, MVdWPlaceholderAPI ]
|
||||
loadbefore: [ MultiWorld, Multiverse-Core ]
|
||||
depend: [ WorldEdit ]
|
||||
database: false
|
||||
commands:
|
||||
plots:
|
||||
description: Plot command.
|
||||
aliases: [p,plot,ps,plotsquared,p2,2,plotme]
|
||||
aliases: [ p,plot,ps,plotsquared,p2,2,plotme ]
|
||||
permission: plots.use
|
||||
permission-message: "You are lacking the permission node 'plots.use'"
|
||||
permissions:
|
||||
|
Reference in New Issue
Block a user