mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-03 06:04:43 +02:00
Compare commits
20 Commits
Author | SHA1 | Date | |
---|---|---|---|
773fd6f59f | |||
5cce86d924 | |||
84567bcb00 | |||
d7c2ab1d16 | |||
0d359ade0c | |||
ffbec24290 | |||
ab357deb48 | |||
6130c3dfa5 | |||
5787588500 | |||
b40383b5a4 | |||
be8903128d | |||
08800ec16d | |||
83e274ff9f | |||
0dd8b1053c | |||
0558fcf5d5 | |||
c45bbe3ec5 | |||
07e598e48f | |||
f6f00dfcda | |||
63a6bdc1d6 | |||
abbac057ed |
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
* text=auto
|
||||
|
||||
*.java text
|
||||
*.jar binary
|
2
.github/workflows/build-pr.yml
vendored
2
.github/workflows/build-pr.yml
vendored
@ -20,4 +20,4 @@ jobs:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
- name: Clean Build
|
||||
run: ./gradlew clean build --warning-mode all
|
||||
run: ./gradlew clean build
|
||||
|
@ -71,6 +71,8 @@ import com.plotsquared.core.configuration.Storage;
|
||||
import com.plotsquared.core.configuration.caption.ChatFormatter;
|
||||
import com.plotsquared.core.configuration.file.YamlConfiguration;
|
||||
import com.plotsquared.core.database.DBFunc;
|
||||
import com.plotsquared.core.events.RemoveRoadEntityEvent;
|
||||
import com.plotsquared.core.events.Result;
|
||||
import com.plotsquared.core.generator.GeneratorWrapper;
|
||||
import com.plotsquared.core.generator.IndependentPlotGenerator;
|
||||
import com.plotsquared.core.generator.SingleWorldGenerator;
|
||||
@ -109,6 +111,7 @@ import com.plotsquared.core.uuid.CacheUUIDService;
|
||||
import com.plotsquared.core.uuid.UUIDPipeline;
|
||||
import com.plotsquared.core.uuid.offline.OfflineModeUUIDService;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import net.kyori.adventure.audience.Audience;
|
||||
import net.kyori.adventure.text.Component;
|
||||
@ -810,8 +813,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||
continue;
|
||||
}
|
||||
iterator.remove();
|
||||
entity.remove();
|
||||
this.removeRoadEntity(entity, iterator);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@ -824,8 +826,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||
continue;
|
||||
}
|
||||
iterator.remove();
|
||||
entity.remove();
|
||||
this.removeRoadEntity(entity, iterator);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
@ -835,7 +836,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
case "DROPPED_ITEM":
|
||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS
|
||||
&& plotArea.getOwnedPlotAbs(BukkitUtil.adapt(entity.getLocation())) == null) {
|
||||
entity.remove();
|
||||
this.removeRoadEntity(entity, iterator);
|
||||
}
|
||||
// dropped item
|
||||
continue;
|
||||
@ -866,8 +867,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||
continue;
|
||||
}
|
||||
iterator.remove();
|
||||
entity.remove();
|
||||
this.removeRoadEntity(entity, iterator);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -972,8 +972,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||
continue;
|
||||
}
|
||||
iterator.remove();
|
||||
entity.remove();
|
||||
this.removeRoadEntity(entity, iterator);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -984,8 +983,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||
continue;
|
||||
}
|
||||
iterator.remove();
|
||||
entity.remove();
|
||||
this.removeRoadEntity(entity, iterator);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -999,6 +997,17 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
||||
}), TaskTime.seconds(1L));
|
||||
}
|
||||
|
||||
private void removeRoadEntity(Entity entity, Iterator<Entity> entityIterator) {
|
||||
RemoveRoadEntityEvent event = eventDispatcher.callRemoveRoadEntity(BukkitAdapter.adapt(entity));
|
||||
|
||||
if (event.getEventResult() == Result.DENY) {
|
||||
return;
|
||||
}
|
||||
|
||||
entityIterator.remove();
|
||||
entity.remove();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @Nullable
|
||||
final ChunkGenerator getDefaultWorldGenerator(
|
||||
|
@ -161,6 +161,12 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
||||
world.setWaterAnimalSpawnLimit(limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* The entire method is deprecated, but kept for compatibility with versions lower than or equal to 1.16.2.
|
||||
* The method will be removed in future versions, because WorldEdit and FastAsyncWorldEdit only support the latest point
|
||||
* release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.11.0")
|
||||
@Override
|
||||
public @NonNull ChunkData generateChunkData(
|
||||
@NonNull World world, @NonNull Random random, int x, int z,
|
||||
|
@ -98,6 +98,7 @@ import org.bukkit.event.block.BlockSpreadEvent;
|
||||
import org.bukkit.event.block.CauldronLevelChangeEvent;
|
||||
import org.bukkit.event.block.EntityBlockFormEvent;
|
||||
import org.bukkit.event.block.LeavesDecayEvent;
|
||||
import org.bukkit.event.block.MoistureChangeEvent;
|
||||
import org.bukkit.event.block.SpongeAbsorbEvent;
|
||||
import org.bukkit.event.world.StructureGrowEvent;
|
||||
import org.bukkit.projectiles.BlockProjectileSource;
|
||||
@ -703,6 +704,28 @@ public class BlockEventListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onMoistureChange(MoistureChangeEvent event) {
|
||||
Block block = event.getBlock();
|
||||
Location location = BukkitUtil.adapt(block.getLocation());
|
||||
PlotArea area = location.getPlotArea();
|
||||
if (area == null) {
|
||||
return;
|
||||
}
|
||||
Plot plot = area.getOwnedPlot(location);
|
||||
if (plot == null) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
Material blockType = block.getType();
|
||||
if (blockType == Material.FARMLAND) {
|
||||
if (!plot.getFlag(SoilDryFlag.class)) {
|
||||
plot.debug("Soil could not dry because soil-dry = false");
|
||||
event.setCancelled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onChange(BlockFromToEvent event) {
|
||||
Block fromBlock = event.getBlock();
|
||||
|
@ -75,7 +75,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
* @deprecated Please do not use this method. Instead use {@link BukkitUtil#adapt(Player)}, as it caches player objects.
|
||||
* This method will be made private in a future release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
@Deprecated(forRemoval = true, since = "6.10.9")
|
||||
public BukkitPlayer(
|
||||
final @NonNull PlotAreaManager plotAreaManager, final @NonNull EventDispatcher eventDispatcher,
|
||||
final @NonNull Player player, final @NonNull PermissionHandler permissionHandler
|
||||
@ -92,7 +92,7 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
||||
* @deprecated Please do not use this method. Instead use {@link BukkitUtil#adapt(Player)}, as it caches player objects.
|
||||
* This method will be made private in a future release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
@Deprecated(forRemoval = true, since = "6.10.9")
|
||||
public BukkitPlayer(
|
||||
final @NonNull PlotAreaManager plotAreaManager, final @NonNull
|
||||
EventDispatcher eventDispatcher, final @NonNull Player player,
|
||||
|
@ -239,9 +239,11 @@ public final class BukkitChunkCoordinator extends ChunkCoordinator {
|
||||
* server's main thread.
|
||||
*/
|
||||
private void processChunk(final @NonNull Chunk chunk) {
|
||||
/* Chunk#isLoaded does not necessarily return true shortly after PaperLib#getChunkAtAsync completes, but the chunk is
|
||||
still loaded.
|
||||
if (!chunk.isLoaded()) {
|
||||
throw new IllegalArgumentException(String.format("Chunk %d;%d is is not loaded", chunk.getX(), chunk.getZ()));
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("Chunk %d;%d is is not loaded", chunk.getX(), chunk.getZ());
|
||||
}*/
|
||||
if (finished) {
|
||||
return;
|
||||
}
|
||||
|
@ -24,7 +24,6 @@ import org.bukkit.Bukkit;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BukkitWorld implements World<org.bukkit.World> {
|
||||
|
||||
|
@ -80,4 +80,3 @@ public class FaweSchematicHandler extends SchematicHandler {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -56,6 +56,7 @@ import com.plotsquared.core.util.TabCompletions;
|
||||
import com.plotsquared.core.util.WorldUtil;
|
||||
import com.plotsquared.core.util.task.RunnableVal3;
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.EditSessionBuilder;
|
||||
import com.sk89q.worldedit.LocalSession;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
@ -228,10 +229,9 @@ public class Area extends SubCommand {
|
||||
try (final ClipboardWriter clipboardWriter = BuiltInClipboardFormat.SPONGE_SCHEMATIC.getWriter(new FileOutputStream(
|
||||
file))) {
|
||||
final BlockArrayClipboard clipboard = new BlockArrayClipboard(selectedRegion);
|
||||
final EditSession editSession = WorldEdit
|
||||
.getInstance()
|
||||
.getEditSessionFactory()
|
||||
.getEditSession(selectedRegion.getWorld(), -1);
|
||||
EditSessionBuilder editSessionBuilder = WorldEdit.getInstance().newEditSessionBuilder();
|
||||
editSessionBuilder.world(selectedRegion.getWorld());
|
||||
final EditSession editSession = editSessionBuilder.build();
|
||||
final ForwardExtentCopy forwardExtentCopy =
|
||||
new ForwardExtentCopy(editSession, selectedRegion, clipboard, selectedRegion.getMinimumPoint());
|
||||
forwardExtentCopy.setCopyingBiomes(true);
|
||||
|
@ -28,7 +28,6 @@ import com.plotsquared.core.generator.HybridUtils;
|
||||
import com.plotsquared.core.player.PlotPlayer;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.plot.expiration.ExpireManager;
|
||||
import com.plotsquared.core.plot.expiration.PlotAnalysis;
|
||||
import com.plotsquared.core.plot.flag.GlobalFlagContainer;
|
||||
import com.plotsquared.core.plot.flag.PlotFlag;
|
||||
@ -42,7 +41,6 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
@ -62,7 +62,7 @@ public class ComponentPreset implements ConfigurationSerializable {
|
||||
public static ComponentPreset deserialize(final @NonNull Map<String, Object> map) {
|
||||
final ClassicPlotManagerComponent classicPlotManagerComponent = ClassicPlotManagerComponent
|
||||
.fromString(map.getOrDefault("component", "").toString()).orElseThrow(() ->
|
||||
new IllegalArgumentException("The preset needs a valid target 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 double cost = Double.parseDouble(map.getOrDefault("cost", "0.0").toString());
|
||||
final String permission = map.getOrDefault("permission", "").toString();
|
||||
|
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* PlotSquared, a land and world management plugin for Minecraft.
|
||||
* Copyright (C) IntellectualSites <https://intellectualsites.com>
|
||||
* Copyright (C) IntellectualSites team and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.plotsquared.core.events;
|
||||
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
/**
|
||||
* @since TODO
|
||||
*/
|
||||
public abstract class EntityEvent {
|
||||
|
||||
private final Entity entity;
|
||||
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* @since 6.11.0
|
||||
*/
|
||||
public EntityEvent(Entity entity) {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the entity involved in the event
|
||||
*
|
||||
* @return Entity
|
||||
* @since 6.11.0
|
||||
*/
|
||||
public Entity getEntity() {
|
||||
return this.entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the event's class name
|
||||
*
|
||||
* @return the event class name
|
||||
* @since 6.11.0
|
||||
*/
|
||||
@NonNull public String getEventName() {
|
||||
if (this.name == null) {
|
||||
this.name = this.getClass().getSimpleName();
|
||||
}
|
||||
return this.name;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* PlotSquared, a land and world management plugin for Minecraft.
|
||||
* Copyright (C) IntellectualSites <https://intellectualsites.com>
|
||||
* Copyright (C) IntellectualSites team and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.plotsquared.core.events;
|
||||
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
|
||||
/**
|
||||
* @since 6.11.0
|
||||
*/
|
||||
public class RemoveRoadEntityEvent extends EntityEvent implements CancellablePlotEvent {
|
||||
|
||||
private Result eventResult;
|
||||
|
||||
/**
|
||||
* RemoveRoadEntityEvent: Called when an entity on road is removed.
|
||||
*
|
||||
* @param entity The entity to remove
|
||||
* @since 6.11.0
|
||||
*/
|
||||
public RemoveRoadEntityEvent(Entity entity) {
|
||||
super(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getEventResult() {
|
||||
return this.eventResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEventResult(Result eventResult) {
|
||||
this.eventResult = eventResult;
|
||||
}
|
||||
|
||||
}
|
@ -144,7 +144,7 @@ public class ClassicPlotManager extends SquarePlotManager {
|
||||
plot.getRegions(),
|
||||
blocks,
|
||||
classicPlotWorld.getMinBuildHeight(),
|
||||
classicPlotWorld.getMaxBuildHeight(),
|
||||
classicPlotWorld.getMaxBuildHeight() - 1,
|
||||
actor,
|
||||
queue
|
||||
);
|
||||
@ -175,7 +175,7 @@ public class ClassicPlotManager extends SquarePlotManager {
|
||||
plot.getRegions(),
|
||||
blocks,
|
||||
classicPlotWorld.PLOT_HEIGHT + 1,
|
||||
classicPlotWorld.getMaxBuildHeight(),
|
||||
classicPlotWorld.getMaxBuildHeight() - 1,
|
||||
actor,
|
||||
queue
|
||||
);
|
||||
@ -281,7 +281,7 @@ public class ClassicPlotManager extends SquarePlotManager {
|
||||
}
|
||||
}
|
||||
|
||||
int maxY = classicPlotWorld.getMaxBuildHeight();
|
||||
int maxY = classicPlotWorld.getMaxBuildHeight() - 1;
|
||||
if (!plot.isMerged(Direction.NORTH)) {
|
||||
int z = bottom.getZ();
|
||||
for (int x = bottom.getX(); x <= top.getX(); x++) {
|
||||
|
@ -2506,7 +2506,7 @@ public class Plot {
|
||||
}
|
||||
}
|
||||
int minHeight = getArea().getMinBuildHeight();
|
||||
int maxHeight = getArea().getMaxBuildHeight();
|
||||
int maxHeight = getArea().getMaxBuildHeight() - 1;
|
||||
Location gtopabs = this.area.getPlotAbs(top).getTopAbs();
|
||||
Location gbotabs = this.area.getPlotAbs(bot).getBottomAbs();
|
||||
visited.addAll(Lists.newArrayList((Iterable<? extends PlotId>) PlotId.PlotRangeIterator.range(bot, top)));
|
||||
|
@ -220,17 +220,6 @@ public final class PlotModificationManager {
|
||||
if (isDelete) {
|
||||
this.removeSign();
|
||||
}
|
||||
PlotUnlinkEvent event = PlotSquared.get().getEventDispatcher()
|
||||
.callUnlink(
|
||||
this.plot.getArea(),
|
||||
this.plot,
|
||||
true,
|
||||
!isDelete,
|
||||
isDelete ? PlotUnlinkEvent.REASON.DELETE : PlotUnlinkEvent.REASON.CLEAR
|
||||
);
|
||||
if (event.getEventResult() != Result.DENY && this.unlinkPlot(event.isCreateRoad(), event.isCreateSign())) {
|
||||
PlotSquared.get().getEventDispatcher().callPostUnlink(plot, event.getReason());
|
||||
}
|
||||
final PlotManager manager = this.plot.getArea().getPlotManager();
|
||||
Runnable run = new Runnable() {
|
||||
@Override
|
||||
@ -281,7 +270,21 @@ public final class PlotModificationManager {
|
||||
manager.clearPlot(current, this, actor, null);
|
||||
}
|
||||
};
|
||||
run.run();
|
||||
PlotUnlinkEvent event = PlotSquared.get().getEventDispatcher()
|
||||
.callUnlink(
|
||||
this.plot.getArea(),
|
||||
this.plot,
|
||||
true,
|
||||
!isDelete,
|
||||
isDelete ? PlotUnlinkEvent.REASON.DELETE : PlotUnlinkEvent.REASON.CLEAR
|
||||
);
|
||||
if (event.getEventResult() != Result.DENY) {
|
||||
if (this.unlinkPlot(event.isCreateRoad(), event.isCreateSign(), run)) {
|
||||
PlotSquared.get().getEventDispatcher().callPostUnlink(plot, event.getReason());
|
||||
}
|
||||
} else {
|
||||
run.run();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -321,7 +324,23 @@ public final class PlotModificationManager {
|
||||
* @return success/!cancelled
|
||||
*/
|
||||
public boolean unlinkPlot(final boolean createRoad, final boolean createSign) {
|
||||
return unlinkPlot(createRoad, createSign, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlink the plot and all connected plots.
|
||||
*
|
||||
* @param createRoad whether to recreate road
|
||||
* @param createSign whether to recreate signs
|
||||
* @param whenDone Task to run when unlink is complete
|
||||
* @return success/!cancelled
|
||||
* @since 6.10.9
|
||||
*/
|
||||
public boolean unlinkPlot(final boolean createRoad, final boolean createSign, final Runnable whenDone) {
|
||||
if (!this.plot.isMerged()) {
|
||||
if (whenDone != null) {
|
||||
whenDone.run();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
final Set<Plot> plots = this.plot.getConnectedPlots();
|
||||
@ -366,14 +385,17 @@ public final class PlotModificationManager {
|
||||
current.getPlotModificationManager().setSign(PlayerManager.resolveName(current.getOwnerAbs()).getComponent(
|
||||
LocaleHolder.console()));
|
||||
}
|
||||
if (whenDone != null) {
|
||||
TaskManager.runTask(whenDone);
|
||||
}
|
||||
}));
|
||||
} else if (whenDone != null) {
|
||||
queue.setCompleteTask(whenDone);
|
||||
}
|
||||
if (createRoad) {
|
||||
manager.finishPlotUnlink(ids, queue);
|
||||
}
|
||||
if (queue != null) {
|
||||
queue.enqueue();
|
||||
}
|
||||
queue.enqueue();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,6 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A world that contains plots
|
||||
|
@ -24,7 +24,6 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A plot flag is any property that can be assigned
|
||||
|
@ -221,7 +221,7 @@ public abstract class QueueCoordinator {
|
||||
* @return success or not
|
||||
* @deprecated Biomes now take XYZ, see {@link #setBiome(int, int, int, BiomeType)}
|
||||
* <br>
|
||||
* Scheduled for removal once we drop the support for versions not supporting 3D biomes.
|
||||
* Scheduled for removal once we drop the support for versions not supporting 3D biomes, 1.18 and earlier.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.0.0")
|
||||
public abstract boolean setBiome(int x, int z, @NonNull BiomeType biome);
|
||||
|
@ -45,6 +45,7 @@ import com.plotsquared.core.events.PlotFlagRemoveEvent;
|
||||
import com.plotsquared.core.events.PlotMergeEvent;
|
||||
import com.plotsquared.core.events.PlotRateEvent;
|
||||
import com.plotsquared.core.events.PlotUnlinkEvent;
|
||||
import com.plotsquared.core.events.RemoveRoadEntityEvent;
|
||||
import com.plotsquared.core.events.TeleportCause;
|
||||
import com.plotsquared.core.events.post.PostPlayerAutoPlotEvent;
|
||||
import com.plotsquared.core.events.post.PostPlotChangeOwnerEvent;
|
||||
@ -71,6 +72,7 @@ import com.plotsquared.core.plot.flag.types.BlockTypeWrapper;
|
||||
import com.plotsquared.core.plot.world.SinglePlotArea;
|
||||
import com.plotsquared.core.util.task.TaskManager;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.entity.Entity;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
@ -296,6 +298,12 @@ public class EventDispatcher {
|
||||
return event;
|
||||
}
|
||||
|
||||
public RemoveRoadEntityEvent callRemoveRoadEntity(Entity entity) {
|
||||
RemoveRoadEntityEvent event = new RemoveRoadEntityEvent(entity);
|
||||
eventBus.post(event);
|
||||
return event;
|
||||
}
|
||||
|
||||
public void doJoinTask(final PlotPlayer<?> player) {
|
||||
if (player == null) {
|
||||
return; //possible future warning message to figure out where we are retrieving null
|
||||
|
@ -19,7 +19,6 @@
|
||||
package com.plotsquared.core.util;
|
||||
|
||||
import com.plotsquared.core.location.Location;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.regions.CuboidRegion;
|
||||
|
@ -491,6 +491,10 @@ public abstract class SchematicHandler {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The legacy web interface is deprecated for removal in favor of Arkitektonika.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.11.0")
|
||||
public List<String> getSaves(UUID uuid) {
|
||||
String rawJSON;
|
||||
try {
|
||||
|
@ -31,7 +31,6 @@ import com.plotsquared.core.plot.Plot;
|
||||
import com.plotsquared.core.plot.PlotArea;
|
||||
import com.plotsquared.core.uuid.UUIDMapping;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -106,7 +106,7 @@ public class WEManager {
|
||||
.getTrusted().contains(uuid))) && !plot.getFlag(NoWorldeditFlag.class)) {
|
||||
for (CuboidRegion region : plot.getRegions()) {
|
||||
BlockVector3 pos1 = region.getMinimumPoint().withY(area.getMinBuildHeight());
|
||||
BlockVector3 pos2 = region.getMaximumPoint().withY(area.getMaxBuildHeight());
|
||||
BlockVector3 pos2 = region.getMaximumPoint().withY(area.getMaxBuildHeight() - 1);
|
||||
CuboidRegion copy = new CuboidRegion(pos1, pos2);
|
||||
regions.add(copy);
|
||||
}
|
||||
|
@ -252,6 +252,10 @@ public abstract class WorldUtil {
|
||||
*/
|
||||
public abstract void refreshChunk(int x, int z, String world);
|
||||
|
||||
/**
|
||||
* The legacy web interface is deprecated for removal in favor of Arkitektonika.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "6.11.0")
|
||||
public void upload(
|
||||
final @NonNull Plot plot,
|
||||
final @Nullable UUID uuid,
|
||||
|
@ -55,4 +55,3 @@ public class AbstractDelegateOutputStream extends OutputStream {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,6 @@ package com.plotsquared.core.util.query;
|
||||
import com.plotsquared.core.plot.Plot;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
|
||||
class OwnersIncludeFilter implements PlotFilter {
|
||||
|
@ -83,4 +83,3 @@ public interface PlotSquaredTask extends Runnable {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -276,4 +276,3 @@ public class AbstractDBTest implements AbstractDB {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.svg" width="250">
|
||||
</p>
|
||||
|
||||
|
||||
---
|
||||
|
||||
PlotSquared is a land and world management plugin for Minecraft.
|
||||
|
@ -18,7 +18,17 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.plotsquared"
|
||||
version = "6.10.9-SNAPSHOT"
|
||||
version = "6.11.0"
|
||||
|
||||
if (!File("$rootDir/.git").exists()) {
|
||||
logger.lifecycle("""
|
||||
**************************************************************************************
|
||||
You need to fork and clone this repository! Don't download a .zip file.
|
||||
If you need assistance, consult the GitHub docs: https://docs.github.com/get-started/quickstart/fork-a-repo
|
||||
**************************************************************************************
|
||||
""".trimIndent()
|
||||
).also { kotlin.system.exitProcess(1) }
|
||||
}
|
||||
|
||||
subprojects {
|
||||
group = rootProject.group
|
||||
@ -64,7 +74,7 @@ subprojects {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.22"))
|
||||
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.23"))
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@ -90,6 +100,9 @@ subprojects {
|
||||
java {
|
||||
licenseHeaderFile(rootProject.file("HEADER.txt"))
|
||||
target("**/*.java")
|
||||
endWithNewline()
|
||||
trimTrailingWhitespace()
|
||||
removeUnusedImports()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ http4j = "1.3"
|
||||
# Gradle plugins
|
||||
shadow = "7.1.2"
|
||||
grgit = "4.1.1"
|
||||
spotless = "6.13.0"
|
||||
spotless = "6.14.1"
|
||||
nexus = "1.1.0"
|
||||
|
||||
[libraries]
|
||||
|
Reference in New Issue
Block a user