mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-12-01 07:38:46 +01:00
Compare commits
6 Commits
renovate/w
...
fix/v7/unn
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
510150a5aa | ||
|
|
beed564fd7 | ||
|
|
5946444889 | ||
|
|
0c6f55c328 | ||
|
|
c7fe3f79e4 | ||
|
|
b455b94bcf |
@@ -600,7 +600,7 @@ public class PlayerEventListener implements Listener {
|
||||
PlotArea area = location.getPlotArea();
|
||||
if (area == null) {
|
||||
if (lastPlot != null) {
|
||||
plotListener.plotExit(pp, lastPlot);
|
||||
plotListener.plotExit(pp, lastPlot, null, null);
|
||||
lastPlotAccess.remove();
|
||||
}
|
||||
try (final MetaDataAccess<Location> lastLocationAccess =
|
||||
@@ -753,7 +753,7 @@ public class PlayerEventListener implements Listener {
|
||||
if (now == null) {
|
||||
try (final MetaDataAccess<Boolean> kickAccess =
|
||||
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(
|
||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot, now, area) && this.tmpTeleport && !kickAccess.get().orElse(
|
||||
false)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
@@ -847,7 +847,7 @@ public class PlayerEventListener implements Listener {
|
||||
if (plot == null) {
|
||||
try (final MetaDataAccess<Boolean> kickAccess =
|
||||
pp.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot) && this.tmpTeleport && !kickAccess.get().orElse(
|
||||
if (lastPlot != null && !plotListener.plotExit(pp, lastPlot, null, area) && this.tmpTeleport && !kickAccess.get().orElse(
|
||||
false)) {
|
||||
pp.sendMessage(
|
||||
TranslatableCaption.of("permission.no_permission_event"),
|
||||
|
||||
@@ -164,7 +164,7 @@ public class PlotListener {
|
||||
try (final MetaDataAccess<Plot> lastPlot = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LAST_PLOT)) {
|
||||
Plot last = lastPlot.get().orElse(null);
|
||||
if ((last != null) && !last.getId().equals(plot.getId())) {
|
||||
plotExit(player, last);
|
||||
plotExit(player, last, plot, plot.getArea());
|
||||
}
|
||||
if (PlotSquared.platform().expireManager() != null) {
|
||||
PlotSquared.platform().expireManager().handleEntry(player, plot);
|
||||
@@ -365,7 +365,12 @@ public class PlotListener {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean plotExit(final PlotPlayer<?> player, Plot plot) {
|
||||
public boolean plotExit(
|
||||
final PlotPlayer<?> player,
|
||||
@NonNull Plot plot,
|
||||
@Nullable Plot nextPlot,
|
||||
@Nullable PlotArea nextArea
|
||||
) {
|
||||
try (final MetaDataAccess<Plot> lastPlot = player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_LAST_PLOT)) {
|
||||
final Plot previous = lastPlot.remove();
|
||||
|
||||
@@ -382,7 +387,9 @@ public class PlotListener {
|
||||
if (plot.hasOwner()) {
|
||||
PlotArea pw = plot.getArea();
|
||||
if (pw == null) {
|
||||
return true;
|
||||
if (nextPlot == null || nextPlot.getArea() == null) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
try (final MetaDataAccess<Boolean> kickAccess =
|
||||
player.accessTemporaryMetaData(PlayerMetaDataKeys.TEMPORARY_KICK)) {
|
||||
@@ -440,11 +447,23 @@ public class PlotListener {
|
||||
player.setFlight(value.get());
|
||||
metaDataAccess.remove();
|
||||
} else {
|
||||
GameMode gameMode = player.getGameMode();
|
||||
if (gameMode == GameModes.SURVIVAL || gameMode == GameModes.ADVENTURE) {
|
||||
player.setFlight(false);
|
||||
} else if (!player.getFlight()) {
|
||||
player.setFlight(true);
|
||||
FlyFlag.FlyStatus flight = FlyFlag.FlyStatus.DEFAULT;
|
||||
if (nextPlot != null) {
|
||||
flight = nextPlot.getFlag(FlyFlag.class);
|
||||
} else if (nextArea != null) {
|
||||
if (nextArea.isRoadFlags()) {
|
||||
flight = nextArea.getRoadFlag(FlyFlag.class);
|
||||
} else {
|
||||
flight = nextArea.getFlag(FlyFlag.class);
|
||||
}
|
||||
}
|
||||
if (flight != FlyFlag.FlyStatus.ENABLED) {
|
||||
GameMode gameMode = player.getGameMode();
|
||||
if (gameMode == GameModes.SURVIVAL || gameMode == GameModes.ADVENTURE) {
|
||||
player.setFlight(false);
|
||||
} else if (!player.getFlight()) {
|
||||
player.setFlight(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1340,7 +1340,7 @@ public class Plot {
|
||||
for (Plot current : getConnectedPlots()) {
|
||||
List<PlotPlayer<?>> players = current.getPlayersInPlot();
|
||||
for (PlotPlayer<?> pp : players) {
|
||||
this.plotListener.plotExit(pp, current);
|
||||
this.plotListener.plotExit(pp, current, null, area);
|
||||
}
|
||||
|
||||
if (Settings.Backup.DELETE_ON_UNCLAIM) {
|
||||
@@ -2594,7 +2594,7 @@ public class Plot {
|
||||
public void reEnter() {
|
||||
TaskManager.runTaskLater(() -> {
|
||||
for (PlotPlayer<?> pp : Plot.this.getPlayersInPlot()) {
|
||||
this.plotListener.plotExit(pp, Plot.this);
|
||||
this.plotListener.plotExit(pp, Plot.this, Plot.this, area);
|
||||
this.plotListener.plotEntry(pp, Plot.this);
|
||||
}
|
||||
}, TaskTime.ticks(1L));
|
||||
|
||||
@@ -20,7 +20,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.intellectualsites.plotsquared"
|
||||
version = "7.5.10-SNAPSHOT"
|
||||
version = "7.5.11-SNAPSHOT"
|
||||
|
||||
if (!File("$rootDir/.git").exists()) {
|
||||
logger.lifecycle("""
|
||||
|
||||
@@ -12,7 +12,7 @@ adventure-bukkit = "4.4.1"
|
||||
log4j = "2.19.0"
|
||||
|
||||
# Plugins
|
||||
worldedit = "7.3.17"
|
||||
worldedit = "7.2.20"
|
||||
fawe = "2.14.0"
|
||||
placeholderapi = "2.11.7"
|
||||
luckperms = "5.5"
|
||||
@@ -35,7 +35,7 @@ serverlib = "2.3.7"
|
||||
# Gradle plugins
|
||||
shadow = "9.2.2"
|
||||
grgit = "4.1.1"
|
||||
spotless = "8.0.0"
|
||||
spotless = "8.1.0"
|
||||
publish = "0.35.0"
|
||||
runPaper = "3.0.2"
|
||||
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
Reference in New Issue
Block a user