mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-04 14:44:43 +02:00
Compare commits
14 Commits
javadoc-cl
...
publish-te
Author | SHA1 | Date | |
---|---|---|---|
0edf11975e | |||
9295bbfdae | |||
00722bc463 | |||
6a34a1996f | |||
1d201b04ba | |||
e887a59158 | |||
d1b8f652a7 | |||
4aa7bc51bc | |||
0f0030916f | |||
bbf1e4fe61 | |||
febac6fa40 | |||
99ee8a780d | |||
577a0d8ed9 | |||
02ae14894a |
23
.github/workflows/build-pr.yml
vendored
Normal file
23
.github/workflows/build-pr.yml
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Build PR
|
||||||
|
|
||||||
|
on: [ pull_request ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_pr:
|
||||||
|
if: github.repository_owner == 'IntellectualSites'
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Validate Gradle Wrapper
|
||||||
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: temurin
|
||||||
|
java-version: 17
|
||||||
|
- name: Clean Build
|
||||||
|
run: ./gradlew clean build
|
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -1,15 +1,18 @@
|
|||||||
name: build
|
name: build
|
||||||
|
|
||||||
on: [ pull_request, push ]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v6
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
|
if: github.repository_owner == 'IntellectualSites'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-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@v1
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v3
|
||||||
|
2
.github/workflows/codeql.yml
vendored
2
.github/workflows/codeql.yml
vendored
@ -1,8 +1,6 @@
|
|||||||
name: "CodeQL"
|
name: "CodeQL"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [ v6 ]
|
|
||||||
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 ]
|
||||||
|
@ -98,6 +98,7 @@ tasks.named<ShadowJar>("shadowJar") {
|
|||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType<Javadoc> {
|
withType<Javadoc> {
|
||||||
|
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
|
||||||
val opt = options as StandardJavadocDocletOptions
|
val opt = options as StandardJavadocDocletOptions
|
||||||
opt.links("https://jd.papermc.io/paper/1.18/")
|
opt.links("https://jd.papermc.io/paper/1.18/")
|
||||||
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
|
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
|
||||||
@ -105,6 +106,11 @@ tasks {
|
|||||||
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
|
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
|
||||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||||
opt.links("https://checkerframework.org/api/")
|
opt.links("https://checkerframework.org/api/")
|
||||||
|
opt.isLinkSource = true
|
||||||
|
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
||||||
|
opt.isUse = true
|
||||||
opt.encoding("UTF-8")
|
opt.encoding("UTF-8")
|
||||||
|
opt.keyWords()
|
||||||
|
opt.addStringOption("-since", isRelease)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ import com.plotsquared.bukkit.listener.ChunkListener;
|
|||||||
import com.plotsquared.bukkit.listener.EntityEventListener;
|
import com.plotsquared.bukkit.listener.EntityEventListener;
|
||||||
import com.plotsquared.bukkit.listener.EntitySpawnListener;
|
import com.plotsquared.bukkit.listener.EntitySpawnListener;
|
||||||
import com.plotsquared.bukkit.listener.PaperListener;
|
import com.plotsquared.bukkit.listener.PaperListener;
|
||||||
import com.plotsquared.bukkit.listener.PaperListener113;
|
|
||||||
import com.plotsquared.bukkit.listener.PlayerEventListener;
|
import com.plotsquared.bukkit.listener.PlayerEventListener;
|
||||||
import com.plotsquared.bukkit.listener.ProjectileEventListener;
|
import com.plotsquared.bukkit.listener.ProjectileEventListener;
|
||||||
import com.plotsquared.bukkit.listener.ServerListener;
|
import com.plotsquared.bukkit.listener.ServerListener;
|
||||||
@ -356,11 +355,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
getServer().getPluginManager().registerEvents(injector().getInstance(ServerListener.class), this);
|
getServer().getPluginManager().registerEvents(injector().getInstance(ServerListener.class), this);
|
||||||
getServer().getPluginManager().registerEvents(injector().getInstance(EntitySpawnListener.class), this);
|
getServer().getPluginManager().registerEvents(injector().getInstance(EntitySpawnListener.class), this);
|
||||||
if (PaperLib.isPaper() && Settings.Paper_Components.PAPER_LISTENERS) {
|
if (PaperLib.isPaper() && Settings.Paper_Components.PAPER_LISTENERS) {
|
||||||
if (serverVersion()[1] == 13) {
|
|
||||||
getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener113.class), this);
|
|
||||||
} else {
|
|
||||||
getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener.class), this);
|
getServer().getPluginManager().registerEvents(injector().getInstance(PaperListener.class), this);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
getServer().getPluginManager().registerEvents(injector().getInstance(SpigotListener.class), this);
|
getServer().getPluginManager().registerEvents(injector().getInstance(SpigotListener.class), this);
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,9 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||||||
*
|
*
|
||||||
* @deprecated Deprecated and scheduled for removal without replacement
|
* @deprecated Deprecated and scheduled for removal without replacement
|
||||||
* in favor of the build in setup wizard.
|
* in favor of the build in setup wizard.
|
||||||
|
* However, this class will be kept around for a while, given it's not a maintenance burden.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.0.0")
|
@Deprecated
|
||||||
@Singleton
|
@Singleton
|
||||||
public class MultiverseWorldManager extends BukkitWorldManager {
|
public class MultiverseWorldManager extends BukkitWorldManager {
|
||||||
|
|
||||||
|
@ -67,14 +67,15 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
|||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Please do not use this method. Instead use
|
|
||||||
* BukkitUtil.getPlayer(Player), as it caches player objects.</p>
|
|
||||||
*
|
|
||||||
* @param plotAreaManager PlotAreaManager instance
|
* @param plotAreaManager PlotAreaManager instance
|
||||||
* @param eventDispatcher EventDispatcher instance
|
* @param eventDispatcher EventDispatcher instance
|
||||||
* @param player Bukkit player instance
|
* @param player Bukkit player instance
|
||||||
* @param permissionHandler PermissionHandler instance
|
* @param permissionHandler PermissionHandler instance
|
||||||
|
*
|
||||||
|
* @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")
|
||||||
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
|
||||||
@ -82,6 +83,16 @@ public class BukkitPlayer extends PlotPlayer<Player> {
|
|||||||
this(plotAreaManager, eventDispatcher, player, false, permissionHandler);
|
this(plotAreaManager, eventDispatcher, player, false, permissionHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param plotAreaManager PlotAreaManager instance
|
||||||
|
* @param eventDispatcher EventDispatcher instance
|
||||||
|
* @param player Bukkit player instance
|
||||||
|
* @param permissionHandler PermissionHandler instance
|
||||||
|
*
|
||||||
|
* @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")
|
||||||
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,
|
||||||
|
@ -54,6 +54,7 @@ public class BukkitPlayerManager extends PlayerManager<BukkitPlayer, Player> {
|
|||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public BukkitPlayer getPlayer(final @NonNull Player object) {
|
public BukkitPlayer getPlayer(final @NonNull Player object) {
|
||||||
if (object.getUniqueId().version() == 2) { // not a real player
|
if (object.getUniqueId().version() == 2) { // not a real player
|
||||||
return new BukkitPlayer(this.plotAreaManager, this.eventDispatcher, object, false, this.permissionHandler);
|
return new BukkitPlayer(this.plotAreaManager, this.eventDispatcher, object, false, this.permissionHandler);
|
||||||
@ -65,6 +66,7 @@ public class BukkitPlayerManager extends PlayerManager<BukkitPlayer, Player> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public @NonNull BukkitPlayer createPlayer(final @NonNull UUID uuid) {
|
public @NonNull BukkitPlayer createPlayer(final @NonNull UUID uuid) {
|
||||||
final Player player = Bukkit.getPlayer(uuid);
|
final Player player = Bukkit.getPlayer(uuid);
|
||||||
if (player == null || !player.isOnline()) {
|
if (player == null || !player.isOnline()) {
|
||||||
|
@ -65,12 +65,18 @@ tasks.processResources {
|
|||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
withType<Javadoc> {
|
withType<Javadoc> {
|
||||||
|
val isRelease = if (rootProject.version.toString().endsWith("-SNAPSHOT")) "TODO" else rootProject.version.toString()
|
||||||
val opt = options as StandardJavadocDocletOptions
|
val opt = options as StandardJavadocDocletOptions
|
||||||
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString())
|
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString())
|
||||||
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
|
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
|
||||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||||
opt.links("https://checkerframework.org/api/")
|
opt.links("https://checkerframework.org/api/")
|
||||||
opt.links("https://javadoc.io/doc/com.intellectualsites.informative-annotations/informative-annotations/latest/")
|
opt.links("https://javadoc.io/doc/com.intellectualsites.informative-annotations/informative-annotations/latest/")
|
||||||
|
opt.isLinkSource = true
|
||||||
|
opt.bottom(File("$rootDir/javadocfooter.html").readText())
|
||||||
|
opt.isUse = true
|
||||||
opt.encoding("UTF-8")
|
opt.encoding("UTF-8")
|
||||||
|
opt.keyWords()
|
||||||
|
opt.addStringOption("-since", isRelease)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ public class PlayerAutoPlotEvent extends PlotEvent implements CancellablePlotEve
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated for removal. Use {@link PlayerAutoPlotEvent#setSizeX(int)} )}
|
* @deprecated for removal. Use {@link PlayerAutoPlotEvent#setSizeX(int)}
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.1.0")
|
@Deprecated(forRemoval = true, since = "6.1.0")
|
||||||
public void setSize_x(int sizeX) {
|
public void setSize_x(int sizeX) {
|
||||||
@ -130,7 +130,7 @@ public class PlayerAutoPlotEvent extends PlotEvent implements CancellablePlotEve
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated for removal. Use {@link PlayerAutoPlotEvent#setSizeZ(int)} )}
|
* @deprecated for removal. Use {@link PlayerAutoPlotEvent#setSizeZ(int)}
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.1.0")
|
@Deprecated(forRemoval = true, since = "6.1.0")
|
||||||
public void setSize_z(int sizeZ) {
|
public void setSize_z(int sizeZ) {
|
||||||
|
@ -122,9 +122,6 @@ public class Plot {
|
|||||||
private static final MiniMessage MINI_MESSAGE = MiniMessage.builder().build();
|
private static final MiniMessage MINI_MESSAGE = MiniMessage.builder().build();
|
||||||
private static final Cleaner CLEANER = Cleaner.create();
|
private static final Cleaner CLEANER = Cleaner.create();
|
||||||
|
|
||||||
static Set<Plot> connected_cache;
|
|
||||||
static Set<CuboidRegion> regions_cache;
|
|
||||||
|
|
||||||
static {
|
static {
|
||||||
FLAG_DECIMAL_FORMAT.setMaximumFractionDigits(340);
|
FLAG_DECIMAL_FORMAT.setMaximumFractionDigits(340);
|
||||||
}
|
}
|
||||||
@ -207,6 +204,8 @@ public class Plot {
|
|||||||
*/
|
*/
|
||||||
private Plot origin;
|
private Plot origin;
|
||||||
|
|
||||||
|
private Set<Plot> connectedCache;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for a new plot.
|
* Constructor for a new plot.
|
||||||
* (Only changes after plot.create() will be properly set in the database)
|
* (Only changes after plot.create() will be properly set in the database)
|
||||||
@ -576,7 +575,14 @@ public class Plot {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final Set<Plot> connected = getConnectedPlots();
|
final Set<Plot> connected = getConnectedPlots();
|
||||||
return connected.stream().anyMatch(current -> uuid.equals(current.getOwner()));
|
for (Plot current : connected) {
|
||||||
|
// can skip ServerPlotFlag check in getOwner()
|
||||||
|
// as flags are synchronized between plots
|
||||||
|
if (uuid.equals(current.getOwnerAbs())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1294,6 +1300,7 @@ public class Plot {
|
|||||||
DBFunc.delete(current);
|
DBFunc.delete(current);
|
||||||
current.setOwnerAbs(null);
|
current.setOwnerAbs(null);
|
||||||
current.settings = null;
|
current.settings = null;
|
||||||
|
current.clearCache();
|
||||||
for (final PlotPlayer<?> pp : players) {
|
for (final PlotPlayer<?> pp : players) {
|
||||||
this.plotListener.plotEntry(pp, current);
|
this.plotListener.plotEntry(pp, current);
|
||||||
}
|
}
|
||||||
@ -1864,6 +1871,7 @@ public class Plot {
|
|||||||
this.area.removePlot(this.id);
|
this.area.removePlot(this.id);
|
||||||
this.id = plot.getId();
|
this.id = plot.getId();
|
||||||
this.area.addPlotAbs(this);
|
this.area.addPlotAbs(this);
|
||||||
|
clearCache();
|
||||||
DBFunc.movePlot(this, plot);
|
DBFunc.movePlot(this, plot);
|
||||||
TaskManager.runTaskLater(whenDone, TaskTime.ticks(1L));
|
TaskManager.runTaskLater(whenDone, TaskTime.ticks(1L));
|
||||||
return true;
|
return true;
|
||||||
@ -2128,17 +2136,16 @@ public class Plot {
|
|||||||
this.origin.origin = base;
|
this.origin.origin = base;
|
||||||
other.origin = base;
|
other.origin = base;
|
||||||
this.origin = base;
|
this.origin = base;
|
||||||
connected_cache = null;
|
this.connectedCache = null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.origin != null) {
|
if (this.origin != null) {
|
||||||
this.origin.origin = null;
|
this.origin.origin = null;
|
||||||
this.origin = null;
|
this.origin = null;
|
||||||
}
|
}
|
||||||
connected_cache = null;
|
this.connectedCache = null;
|
||||||
}
|
}
|
||||||
DBFunc.setMerged(this, this.getSettings().getMerged());
|
DBFunc.setMerged(this, this.getSettings().getMerged());
|
||||||
regions_cache = null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2173,8 +2180,7 @@ public class Plot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearCache() {
|
public void clearCache() {
|
||||||
connected_cache = null;
|
this.connectedCache = null;
|
||||||
regions_cache = null;
|
|
||||||
if (this.origin != null) {
|
if (this.origin != null) {
|
||||||
this.origin.origin = null;
|
this.origin.origin = null;
|
||||||
this.origin = null;
|
this.origin = null;
|
||||||
@ -2301,10 +2307,9 @@ public class Plot {
|
|||||||
if (!this.isMerged()) {
|
if (!this.isMerged()) {
|
||||||
return Collections.singleton(this);
|
return Collections.singleton(this);
|
||||||
}
|
}
|
||||||
if (connected_cache != null && connected_cache.contains(this)) {
|
if (this.connectedCache != null && this.connectedCache.contains(this)) {
|
||||||
return connected_cache;
|
return this.connectedCache;
|
||||||
}
|
}
|
||||||
regions_cache = null;
|
|
||||||
|
|
||||||
HashSet<Plot> tmpSet = new HashSet<>();
|
HashSet<Plot> tmpSet = new HashSet<>();
|
||||||
tmpSet.add(this);
|
tmpSet.add(this);
|
||||||
@ -2409,7 +2414,7 @@ public class Plot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
connected_cache = tmpSet;
|
this.connectedCache = tmpSet;
|
||||||
return tmpSet;
|
return tmpSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2421,19 +2426,15 @@ public class Plot {
|
|||||||
* @return all regions within the plot
|
* @return all regions within the plot
|
||||||
*/
|
*/
|
||||||
public @NonNull Set<CuboidRegion> getRegions() {
|
public @NonNull Set<CuboidRegion> getRegions() {
|
||||||
if (regions_cache != null && connected_cache != null && connected_cache.contains(this)) {
|
|
||||||
return regions_cache;
|
|
||||||
}
|
|
||||||
if (!this.isMerged()) {
|
if (!this.isMerged()) {
|
||||||
Location pos1 = this.getBottomAbs().withY(getArea().getMinBuildHeight());
|
Location pos1 = this.getBottomAbs().withY(getArea().getMinBuildHeight());
|
||||||
Location pos2 = this.getTopAbs().withY(getArea().getMaxBuildHeight());
|
Location pos2 = this.getTopAbs().withY(getArea().getMaxBuildHeight());
|
||||||
connected_cache = Sets.newHashSet(this);
|
this.connectedCache = Sets.newHashSet(this);
|
||||||
CuboidRegion rg = new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3());
|
CuboidRegion rg = new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3());
|
||||||
regions_cache = Collections.singleton(rg);
|
return Collections.singleton(rg);
|
||||||
return regions_cache;
|
|
||||||
}
|
}
|
||||||
Set<Plot> plots = this.getConnectedPlots();
|
Set<Plot> plots = this.getConnectedPlots();
|
||||||
Set<CuboidRegion> regions = regions_cache = new HashSet<>();
|
Set<CuboidRegion> regions = new HashSet<>();
|
||||||
Set<PlotId> visited = new HashSet<>();
|
Set<PlotId> visited = new HashSet<>();
|
||||||
for (Plot current : plots) {
|
for (Plot current : plots) {
|
||||||
if (visited.contains(current.getId())) {
|
if (visited.contains(current.getId())) {
|
||||||
|
@ -263,6 +263,7 @@ public final class PlotModificationManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Plot current = queue.poll();
|
Plot current = queue.poll();
|
||||||
|
current.clearCache();
|
||||||
if (plot.getArea().getTerrain() != PlotAreaTerrainType.NONE) {
|
if (plot.getArea().getTerrain() != PlotAreaTerrainType.NONE) {
|
||||||
try {
|
try {
|
||||||
PlotSquared.platform().regionManager().regenerateRegion(
|
PlotSquared.platform().regionManager().regenerateRegion(
|
||||||
@ -327,6 +328,7 @@ public final class PlotModificationManager {
|
|||||||
ArrayList<PlotId> ids = new ArrayList<>(plots.size());
|
ArrayList<PlotId> ids = new ArrayList<>(plots.size());
|
||||||
for (Plot current : plots) {
|
for (Plot current : plots) {
|
||||||
current.setHome(null);
|
current.setHome(null);
|
||||||
|
current.clearCache();
|
||||||
ids.add(current.getId());
|
ids.add(current.getId());
|
||||||
}
|
}
|
||||||
this.plot.clearRatings();
|
this.plot.clearRatings();
|
||||||
@ -478,8 +480,7 @@ public final class PlotModificationManager {
|
|||||||
this.plot.updateWorldBorder();
|
this.plot.updateWorldBorder();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Plot.connected_cache = null;
|
this.plot.clearCache();
|
||||||
Plot.regions_cache = null;
|
|
||||||
this.plot.getTrusted().clear();
|
this.plot.getTrusted().clear();
|
||||||
this.plot.getMembers().clear();
|
this.plot.getMembers().clear();
|
||||||
this.plot.getDenied().clear();
|
this.plot.getDenied().clear();
|
||||||
@ -630,6 +631,7 @@ public final class PlotModificationManager {
|
|||||||
if (queue.size() > 0) {
|
if (queue.size() > 0) {
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
}
|
}
|
||||||
|
visited.forEach(Plot::clearCache);
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,9 +23,9 @@ import com.plotsquared.core.plot.PlotArea;
|
|||||||
import com.plotsquared.core.plot.world.PlotAreaManager;
|
import com.plotsquared.core.plot.world.PlotAreaManager;
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashSet;
|
import java.util.List;
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
class GlobalPlotProvider implements PlotProvider {
|
class GlobalPlotProvider implements PlotProvider {
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ class GlobalPlotProvider implements PlotProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<Plot> getPlots() {
|
public Collection<Plot> getPlots() {
|
||||||
final Set<Plot> plots = new HashSet<>();
|
final List<Plot> plots = new ArrayList<>();
|
||||||
for (final PlotArea plotArea : this.plotAreaManager.getAllPlotAreas()) {
|
for (final PlotArea plotArea : this.plotAreaManager.getAllPlotAreas()) {
|
||||||
plots.addAll(plotArea.getPlots());
|
plots.addAll(plotArea.getPlots());
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.plotsquared"
|
group = "com.plotsquared"
|
||||||
version = "6.10.7-SNASPHOT"
|
version = "6.10.9-SNAPSHOT"
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
group = rootProject.group
|
group = rootProject.group
|
||||||
@ -64,12 +64,12 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.21"))
|
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.22"))
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Tests
|
// Tests
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.9.1")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.withId("java") {
|
plugins.withId("java") {
|
||||||
|
4
javadocfooter.html
Normal file
4
javadocfooter.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Javadocs generated for
|
||||||
|
<a rel="noopener nofollow noreferrer" href="https://github.com/IntellectualSites/PlotSquared/" target="_blank"> PlotSquared</a> |
|
||||||
|
<a rel="noopener nofollow noreferrer" href="https://intellectualsites.github.io/plotsquared-documentation/"> Documentation </a> |
|
||||||
|
Visit us on our <a rel="noopener nofollow noreferrer" href="https://discord.gg/intellectualsites"> Discord server</a> :)
|
Reference in New Issue
Block a user