mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Merge branch 'v6' into chore/v6/v7-removal-deprecations
This commit is contained in:
commit
f15a652add
@ -2,7 +2,6 @@ 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
|
||||||
@ -12,7 +11,7 @@ jobs:
|
|||||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
DISCORD_USERNAME: PlotSquared Release
|
DISCORD_USERNAME: PlotSquared Release
|
||||||
DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
|
DISCORD_AVATAR: https://raw.githubusercontent.com/IntellectualSites/Assets/main/plugins/PlotSquared/PlotSquared.png
|
||||||
uses: Ilshidur/action-discord@0.3.2
|
uses: Ilshidur/action-discord@0c4b27844ba47cb1c7bee539c8eead5284ce9fa9 # ratchet:Ilshidur/action-discord@0.3.2
|
||||||
with:
|
with:
|
||||||
args: |
|
args: |
|
||||||
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
|
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
|
||||||
|
4
.github/workflows/build-pr.yml
vendored
4
.github/workflows/build-pr.yml
vendored
@ -1,7 +1,5 @@
|
|||||||
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'
|
||||||
@ -13,7 +11,7 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Validate Gradle Wrapper
|
- name: Validate Gradle Wrapper
|
||||||
uses: gradle/wrapper-validation-action@v1
|
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
|
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -1,10 +1,8 @@
|
|||||||
name: build
|
name: build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v6
|
- v6
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository_owner == 'IntellectualSites'
|
if: github.repository_owner == 'IntellectualSites'
|
||||||
@ -13,7 +11,7 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Validate Gradle Wrapper
|
- name: Validate Gradle Wrapper
|
||||||
uses: gradle/wrapper-validation-action@v1
|
uses: gradle/wrapper-validation-action@55e685c48d84285a5b0418cd094606e199cca3b6 # v1
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
@ -45,7 +43,7 @@ jobs:
|
|||||||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
|
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
|
||||||
- name: Publish core javadoc
|
- name: Publish core javadoc
|
||||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
|
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
|
||||||
uses: cpina/github-action-push-to-another-repository@main
|
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
|
||||||
env:
|
env:
|
||||||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
||||||
with:
|
with:
|
||||||
@ -57,7 +55,7 @@ jobs:
|
|||||||
target-directory: core
|
target-directory: core
|
||||||
- name: Publish bukkit javadoc
|
- name: Publish bukkit javadoc
|
||||||
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
|
if: ${{ runner.os == 'Linux' && env.STATUS == 'release' && github.event_name == 'push' && github.ref == 'refs/heads/v6'}}
|
||||||
uses: cpina/github-action-push-to-another-repository@main
|
uses: cpina/github-action-push-to-another-repository@0a14457bb28b04dfa1652e0ffdfda866d2845c73 # main
|
||||||
env:
|
env:
|
||||||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
||||||
with:
|
with:
|
||||||
|
13
.github/workflows/codeql.yml
vendored
13
.github/workflows/codeql.yml
vendored
@ -1,10 +1,8 @@
|
|||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [v6]
|
branches: [v6]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
@ -13,23 +11,18 @@ jobs:
|
|||||||
actions: read
|
actions: read
|
||||||
contents: read
|
contents: read
|
||||||
security-events: write
|
security-events: write
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v2
|
uses: github/codeql-action/init@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
|
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v2
|
uses: github/codeql-action/autobuild@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@32dc499307d133bb5085bae78498c0ac2cf762d5 # v2
|
||||||
|
2
.github/workflows/release-drafter.yml
vendored
2
.github/workflows/release-drafter.yml
vendored
@ -1,5 +1,4 @@
|
|||||||
name: draft release
|
name: draft release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@ -8,7 +7,6 @@ on:
|
|||||||
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 }}
|
||||||
|
@ -71,6 +71,8 @@ import com.plotsquared.core.configuration.Storage;
|
|||||||
import com.plotsquared.core.configuration.caption.ChatFormatter;
|
import com.plotsquared.core.configuration.caption.ChatFormatter;
|
||||||
import com.plotsquared.core.configuration.file.YamlConfiguration;
|
import com.plotsquared.core.configuration.file.YamlConfiguration;
|
||||||
import com.plotsquared.core.database.DBFunc;
|
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.GeneratorWrapper;
|
||||||
import com.plotsquared.core.generator.IndependentPlotGenerator;
|
import com.plotsquared.core.generator.IndependentPlotGenerator;
|
||||||
import com.plotsquared.core.generator.SingleWorldGenerator;
|
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.UUIDPipeline;
|
||||||
import com.plotsquared.core.uuid.offline.OfflineModeUUIDService;
|
import com.plotsquared.core.uuid.offline.OfflineModeUUIDService;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
import io.papermc.lib.PaperLib;
|
import io.papermc.lib.PaperLib;
|
||||||
import net.kyori.adventure.audience.Audience;
|
import net.kyori.adventure.audience.Audience;
|
||||||
import net.kyori.adventure.text.Component;
|
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")) {
|
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
iterator.remove();
|
this.removeRoadEntity(entity, iterator);
|
||||||
entity.remove();
|
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -824,8 +826,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
iterator.remove();
|
this.removeRoadEntity(entity, iterator);
|
||||||
entity.remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@ -835,7 +836,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
case "DROPPED_ITEM":
|
case "DROPPED_ITEM":
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS
|
if (Settings.Enabled_Components.KILL_ROAD_ITEMS
|
||||||
&& plotArea.getOwnedPlotAbs(BukkitUtil.adapt(entity.getLocation())) == null) {
|
&& plotArea.getOwnedPlotAbs(BukkitUtil.adapt(entity.getLocation())) == null) {
|
||||||
entity.remove();
|
this.removeRoadEntity(entity, iterator);
|
||||||
}
|
}
|
||||||
// dropped item
|
// dropped item
|
||||||
continue;
|
continue;
|
||||||
@ -866,8 +867,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
iterator.remove();
|
this.removeRoadEntity(entity, iterator);
|
||||||
entity.remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -972,8 +972,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
iterator.remove();
|
this.removeRoadEntity(entity, iterator);
|
||||||
entity.remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -984,8 +983,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
if (entity.hasMetadata("ps-tmp-teleport")) {
|
if (entity.hasMetadata("ps-tmp-teleport")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
iterator.remove();
|
this.removeRoadEntity(entity, iterator);
|
||||||
entity.remove();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -999,6 +997,17 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
}), TaskTime.seconds(1L));
|
}), 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
|
@Override
|
||||||
public @Nullable
|
public @Nullable
|
||||||
final ChunkGenerator getDefaultWorldGenerator(
|
final ChunkGenerator getDefaultWorldGenerator(
|
||||||
|
@ -161,6 +161,12 @@ public class BukkitPlotGenerator extends ChunkGenerator implements GeneratorWrap
|
|||||||
world.setWaterAnimalSpawnLimit(limit);
|
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
|
@Override
|
||||||
public @NonNull ChunkData generateChunkData(
|
public @NonNull ChunkData generateChunkData(
|
||||||
@NonNull World world, @NonNull Random random, int x, int z,
|
@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.CauldronLevelChangeEvent;
|
||||||
import org.bukkit.event.block.EntityBlockFormEvent;
|
import org.bukkit.event.block.EntityBlockFormEvent;
|
||||||
import org.bukkit.event.block.LeavesDecayEvent;
|
import org.bukkit.event.block.LeavesDecayEvent;
|
||||||
|
import org.bukkit.event.block.MoistureChangeEvent;
|
||||||
import org.bukkit.event.block.SpongeAbsorbEvent;
|
import org.bukkit.event.block.SpongeAbsorbEvent;
|
||||||
import org.bukkit.event.world.StructureGrowEvent;
|
import org.bukkit.event.world.StructureGrowEvent;
|
||||||
import org.bukkit.projectiles.BlockProjectileSource;
|
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)
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||||
public void onChange(BlockFromToEvent event) {
|
public void onChange(BlockFromToEvent event) {
|
||||||
Block fromBlock = event.getBlock();
|
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.
|
* @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.
|
* This method will be made private in a future release.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "TODO")
|
@Deprecated(forRemoval = true, since = "6.10.9")
|
||||||
public BukkitPlayer(
|
public BukkitPlayer(
|
||||||
final @NonNull PlotAreaManager plotAreaManager, final @NonNull EventDispatcher eventDispatcher,
|
final @NonNull PlotAreaManager plotAreaManager, final @NonNull EventDispatcher eventDispatcher,
|
||||||
final @NonNull Player player, final @NonNull PermissionHandler permissionHandler
|
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.
|
* @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.
|
* This method will be made private in a future release.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "TODO")
|
@Deprecated(forRemoval = true, since = "6.10.9")
|
||||||
public BukkitPlayer(
|
public BukkitPlayer(
|
||||||
final @NonNull PlotAreaManager plotAreaManager, final @NonNull
|
final @NonNull PlotAreaManager plotAreaManager, final @NonNull
|
||||||
EventDispatcher eventDispatcher, final @NonNull Player player,
|
EventDispatcher eventDispatcher, final @NonNull Player player,
|
||||||
|
@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|||||||
## Enforcement
|
## Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
reported by contacting the project team at contact@intellectualsites.com. All
|
reported by contacting the project team at contact<at>intellectualsites.com. All
|
||||||
complaints will be reviewed and investigated and will result in a response that
|
complaints will be reviewed and investigated and will result in a response that
|
||||||
is deemed necessary and appropriate to the circumstances. The project team is
|
is deemed necessary and appropriate to the circumstances. The project team is
|
||||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||||
|
@ -56,6 +56,7 @@ import com.plotsquared.core.util.TabCompletions;
|
|||||||
import com.plotsquared.core.util.WorldUtil;
|
import com.plotsquared.core.util.WorldUtil;
|
||||||
import com.plotsquared.core.util.task.RunnableVal3;
|
import com.plotsquared.core.util.task.RunnableVal3;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
|
import com.sk89q.worldedit.EditSessionBuilder;
|
||||||
import com.sk89q.worldedit.LocalSession;
|
import com.sk89q.worldedit.LocalSession;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
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(
|
try (final ClipboardWriter clipboardWriter = BuiltInClipboardFormat.SPONGE_SCHEMATIC.getWriter(new FileOutputStream(
|
||||||
file))) {
|
file))) {
|
||||||
final BlockArrayClipboard clipboard = new BlockArrayClipboard(selectedRegion);
|
final BlockArrayClipboard clipboard = new BlockArrayClipboard(selectedRegion);
|
||||||
final EditSession editSession = WorldEdit
|
EditSessionBuilder editSessionBuilder = WorldEdit.getInstance().newEditSessionBuilder();
|
||||||
.getInstance()
|
editSessionBuilder.world(selectedRegion.getWorld());
|
||||||
.getEditSessionFactory()
|
final EditSession editSession = editSessionBuilder.build();
|
||||||
.getEditSession(selectedRegion.getWorld(), -1);
|
|
||||||
final ForwardExtentCopy forwardExtentCopy =
|
final ForwardExtentCopy forwardExtentCopy =
|
||||||
new ForwardExtentCopy(editSession, selectedRegion, clipboard, selectedRegion.getMinimumPoint());
|
new ForwardExtentCopy(editSession, selectedRegion, clipboard, selectedRegion.getMinimumPoint());
|
||||||
forwardExtentCopy.setCopyingBiomes(true);
|
forwardExtentCopy.setCopyingBiomes(true);
|
||||||
|
@ -106,7 +106,6 @@ public class Clear extends Command {
|
|||||||
BackupManager.backup(player, plot, () -> {
|
BackupManager.backup(player, plot, () -> {
|
||||||
final long start = System.currentTimeMillis();
|
final long start = System.currentTimeMillis();
|
||||||
boolean result = plot.getPlotModificationManager().clear(true, false, player, () -> {
|
boolean result = plot.getPlotModificationManager().clear(true, false, player, () -> {
|
||||||
plot.getPlotModificationManager().unlink();
|
|
||||||
TaskManager.runTask(() -> {
|
TaskManager.runTask(() -> {
|
||||||
plot.removeRunning();
|
plot.removeRunning();
|
||||||
// If the state changes, then mark it as no longer done
|
// If the state changes, then mark it as no longer done
|
||||||
|
@ -62,7 +62,7 @@ public class ComponentPreset implements ConfigurationSerializable {
|
|||||||
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 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 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();
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -334,7 +334,7 @@ public final class PlotModificationManager {
|
|||||||
* @param createSign whether to recreate signs
|
* @param createSign whether to recreate signs
|
||||||
* @param whenDone Task to run when unlink is complete
|
* @param whenDone Task to run when unlink is complete
|
||||||
* @return success/!cancelled
|
* @return success/!cancelled
|
||||||
* @since TODO
|
* @since 6.10.9
|
||||||
*/
|
*/
|
||||||
public boolean unlinkPlot(final boolean createRoad, final boolean createSign, final Runnable whenDone) {
|
public boolean unlinkPlot(final boolean createRoad, final boolean createSign, final Runnable whenDone) {
|
||||||
if (!this.plot.isMerged()) {
|
if (!this.plot.isMerged()) {
|
||||||
|
@ -221,7 +221,7 @@ public abstract class QueueCoordinator {
|
|||||||
* @return success or not
|
* @return success or not
|
||||||
* @deprecated Biomes now take XYZ, see {@link #setBiome(int, int, int, BiomeType)}
|
* @deprecated Biomes now take XYZ, see {@link #setBiome(int, int, int, BiomeType)}
|
||||||
* <br>
|
* <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")
|
@Deprecated(forRemoval = true, since = "6.0.0")
|
||||||
public abstract boolean setBiome(int x, int z, @NonNull BiomeType biome);
|
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.PlotMergeEvent;
|
||||||
import com.plotsquared.core.events.PlotRateEvent;
|
import com.plotsquared.core.events.PlotRateEvent;
|
||||||
import com.plotsquared.core.events.PlotUnlinkEvent;
|
import com.plotsquared.core.events.PlotUnlinkEvent;
|
||||||
|
import com.plotsquared.core.events.RemoveRoadEntityEvent;
|
||||||
import com.plotsquared.core.events.TeleportCause;
|
import com.plotsquared.core.events.TeleportCause;
|
||||||
import com.plotsquared.core.events.post.PostPlayerAutoPlotEvent;
|
import com.plotsquared.core.events.post.PostPlayerAutoPlotEvent;
|
||||||
import com.plotsquared.core.events.post.PostPlotChangeOwnerEvent;
|
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.plot.world.SinglePlotArea;
|
||||||
import com.plotsquared.core.util.task.TaskManager;
|
import com.plotsquared.core.util.task.TaskManager;
|
||||||
import com.sk89q.worldedit.WorldEdit;
|
import com.sk89q.worldedit.WorldEdit;
|
||||||
|
import com.sk89q.worldedit.entity.Entity;
|
||||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||||
import com.sk89q.worldedit.world.block.BlockType;
|
import com.sk89q.worldedit.world.block.BlockType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
@ -296,6 +298,12 @@ public class EventDispatcher {
|
|||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RemoveRoadEntityEvent callRemoveRoadEntity(Entity entity) {
|
||||||
|
RemoveRoadEntityEvent event = new RemoveRoadEntityEvent(entity);
|
||||||
|
eventBus.post(event);
|
||||||
|
return event;
|
||||||
|
}
|
||||||
|
|
||||||
public void doJoinTask(final PlotPlayer<?> player) {
|
public void doJoinTask(final PlotPlayer<?> player) {
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
return; //possible future warning message to figure out where we are retrieving null
|
return; //possible future warning message to figure out where we are retrieving null
|
||||||
|
@ -491,6 +491,10 @@ public abstract class SchematicHandler {
|
|||||||
return null;
|
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) {
|
public List<String> getSaves(UUID uuid) {
|
||||||
String rawJSON;
|
String rawJSON;
|
||||||
try {
|
try {
|
||||||
|
@ -252,6 +252,10 @@ public abstract class WorldUtil {
|
|||||||
*/
|
*/
|
||||||
public abstract void refreshChunk(int x, int z, String world);
|
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(
|
public void upload(
|
||||||
final @NonNull Plot plot,
|
final @NonNull Plot plot,
|
||||||
final @Nullable UUID uuid,
|
final @Nullable UUID uuid,
|
||||||
|
@ -18,7 +18,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.plotsquared"
|
group = "com.plotsquared"
|
||||||
version = "6.10.9-SNAPSHOT"
|
version = "6.11.1-SNAPSHOT"
|
||||||
|
|
||||||
if (!File("$rootDir/.git").exists()) {
|
if (!File("$rootDir/.git").exists()) {
|
||||||
logger.lifecycle("""
|
logger.lifecycle("""
|
||||||
@ -74,7 +74,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.22"))
|
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.24"))
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -155,7 +155,7 @@ subprojects {
|
|||||||
id.set("NotMyFault")
|
id.set("NotMyFault")
|
||||||
name.set("Alexander Brandes")
|
name.set("Alexander Brandes")
|
||||||
organization.set("IntellectualSites")
|
organization.set("IntellectualSites")
|
||||||
email.set("contact@notmyfault.dev")
|
email.set("contact(at)notmyfault.dev")
|
||||||
}
|
}
|
||||||
developer {
|
developer {
|
||||||
id.set("SirYwell")
|
id.set("SirYwell")
|
||||||
|
@ -11,9 +11,9 @@ essentialsx = "2.19.7"
|
|||||||
mvdwapi = "3.1.1"
|
mvdwapi = "3.1.1"
|
||||||
|
|
||||||
# Third party
|
# Third party
|
||||||
prtree = "2.0.0"
|
prtree = "2.0.1"
|
||||||
aopalliance = "1.0"
|
aopalliance = "1.0"
|
||||||
cloud-services = "1.8.0"
|
cloud-services = "1.8.2"
|
||||||
arkitektonika = "2.1.1"
|
arkitektonika = "2.1.1"
|
||||||
squirrelid = "0.3.1"
|
squirrelid = "0.3.1"
|
||||||
http4j = "1.3"
|
http4j = "1.3"
|
||||||
@ -21,8 +21,8 @@ http4j = "1.3"
|
|||||||
# Gradle plugins
|
# Gradle plugins
|
||||||
shadow = "7.1.2"
|
shadow = "7.1.2"
|
||||||
grgit = "4.1.1"
|
grgit = "4.1.1"
|
||||||
spotless = "6.13.0"
|
spotless = "6.16.0"
|
||||||
nexus = "1.1.0"
|
nexus = "1.2.0"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
# Platform expectations
|
# Platform expectations
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
Loading…
Reference in New Issue
Block a user