mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-06-10 20:34:00 +00:00
Fix deny-exit flag
This commit is contained in:
parent
c98f2b4261
commit
eb1c3263ec
1 changed files with 4 additions and 1 deletions
|
@ -179,7 +179,7 @@ public class PlotListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean plotExit(final PlotPlayer player, Plot plot) {
|
public static boolean plotExit(final PlotPlayer player, Plot plot) {
|
||||||
player.deleteMeta("lastplot");
|
Object previous = player.deleteMeta("lastplot");
|
||||||
EventUtil.manager.callLeave(player, plot);
|
EventUtil.manager.callLeave(player, plot);
|
||||||
if (plot.hasOwner()) {
|
if (plot.hasOwner()) {
|
||||||
PlotArea pw = plot.getArea();
|
PlotArea pw = plot.getArea();
|
||||||
|
@ -187,6 +187,9 @@ public class PlotListener {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (Flags.DENY_EXIT.isTrue(plot)) {
|
if (Flags.DENY_EXIT.isTrue(plot)) {
|
||||||
|
if (previous != null) {
|
||||||
|
player.setMeta("lastplot", previous);
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (plot.getFlag(Flags.GAMEMODE).isPresent() || plot.getFlag(Flags.GUEST_GAMEMODE).isPresent()) {
|
if (plot.getFlag(Flags.GAMEMODE).isPresent() || plot.getFlag(Flags.GUEST_GAMEMODE).isPresent()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue