mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-04-23 19:56:24 +02:00
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
52823f5024 | ||
![]() |
1326c257a0 | ||
![]() |
fc3137cd96 | ||
![]() |
c46cc73f52 | ||
![]() |
f11acacedd | ||
![]() |
d1bac90745 | ||
![]() |
e98f628d34 | ||
![]() |
b2ab61559c | ||
![]() |
dd6eb8e74f | ||
![]() |
97cdd03ea4 | ||
![]() |
f5118e6802 | ||
![]() |
94ca5cf679 | ||
![]() |
5a55a1f602 | ||
![]() |
ed33635a15 | ||
![]() |
888682e5d0 | ||
![]() |
72bb5f00b0 | ||
![]() |
773fd6f59f | ||
![]() |
5cce86d924 | ||
![]() |
84567bcb00 | ||
![]() |
d7c2ab1d16 | ||
![]() |
0d359ade0c | ||
![]() |
ffbec24290 | ||
![]() |
ab357deb48 | ||
![]() |
6130c3dfa5 | ||
![]() |
5787588500 | ||
![]() |
b40383b5a4 |
@ -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@08d9328877d6954120eef2b07abbc79249bb6210 # ratchet:Ilshidur/action-discord@0.3.2
|
||||||
with:
|
with:
|
||||||
args: |
|
args: |
|
||||||
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
|
"<@&525015541815967744> <@&679322738552471574> <@&699293353862496266>"
|
||||||
|
8
.github/workflows/build-pr.yml
vendored
8
.github/workflows/build-pr.yml
vendored
@ -1,19 +1,17 @@
|
|||||||
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
|
||||||
- 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:
|
||||||
|
17
.github/workflows/codeql.yml
vendored
17
.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
|
||||||
|
6
.github/workflows/release-drafter.yml
vendored
6
.github/workflows/release-drafter.yml
vendored
@ -1,14 +1,12 @@
|
|||||||
name: draft release
|
name: draft release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
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 }}
|
||||||
|
@ -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,
|
||||||
|
@ -71,6 +71,7 @@ import org.bukkit.block.BlockFace;
|
|||||||
import org.bukkit.block.BlockState;
|
import org.bukkit.block.BlockState;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.block.data.type.Dispenser;
|
import org.bukkit.block.data.type.Dispenser;
|
||||||
|
import org.bukkit.block.data.type.Farmland;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Fireball;
|
import org.bukkit.entity.Fireball;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -98,6 +99,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 +705,41 @@ 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (block.getBlockData() instanceof Farmland farmland && event.getNewState().getBlockData() instanceof Farmland newFarmland) {
|
||||||
|
int currentMoisture = farmland.getMoisture();
|
||||||
|
int newMoisture = newFarmland.getMoisture();
|
||||||
|
|
||||||
|
// farmland gets moisturizes
|
||||||
|
if (newMoisture > currentMoisture) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (plot.getFlag(SoilDryFlag.class)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
@ -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.
|
||||||
|
@ -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
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -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"
|
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,18 +11,18 @@ 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.2"
|
||||||
squirrelid = "0.3.1"
|
squirrelid = "0.3.1"
|
||||||
http4j = "1.3"
|
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
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"config:base",
|
"config:base",
|
||||||
":semanticCommitsDisabled"
|
":semanticCommitsDisabled"
|
||||||
],
|
],
|
||||||
"labels": ["Renovate"],
|
"labels": ["dependencies"],
|
||||||
"rebaseWhen": "conflicted"
|
"rebaseWhen": "conflicted",
|
||||||
|
"schedule": ["on the first day of the week"]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user