mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +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) {
|
||||
player.deleteMeta("lastplot");
|
||||
Object previous = player.deleteMeta("lastplot");
|
||||
EventUtil.manager.callLeave(player, plot);
|
||||
if (plot.hasOwner()) {
|
||||
PlotArea pw = plot.getArea();
|
||||
|
@ -187,6 +187,9 @@ public class PlotListener {
|
|||
return true;
|
||||
}
|
||||
if (Flags.DENY_EXIT.isTrue(plot)) {
|
||||
if (previous != null) {
|
||||
player.setMeta("lastplot", previous);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (plot.getFlag(Flags.GAMEMODE).isPresent() || plot.getFlag(Flags.GUEST_GAMEMODE).isPresent()) {
|
||||
|
|
Loading…
Reference in a new issue