Add "kick" meta check in PlotListener

This commit is contained in:
dordsor21 2019-01-14 17:41:28 +00:00
parent b2d035cf69
commit 44fc8a55ea

View File

@ -157,8 +157,7 @@ public class PlotListener {
if (titles) {
if (!C.TITLE_ENTERED_PLOT.s().isEmpty() || !C.TITLE_ENTERED_PLOT_SUB.s()
.isEmpty()) {
TaskManager.runTaskLaterAsync(new Runnable() {
@Override public void run() {
TaskManager.runTaskLaterAsync(() -> {
Plot lastPlot = player.getMeta(PlotPlayer.META_LAST_PLOT);
if ((lastPlot != null) && plot.getId().equals(lastPlot.getId())) {
Map<String, String> replacements = new HashMap<>();
@ -174,7 +173,6 @@ public class PlotListener {
.replaceFromMap(C.TITLE_ENTERED_PLOT_SUB.s(), replacements);
AbstractTitle.sendTitle(player, main, sub);
}
}
}, 20);
}
}
@ -191,7 +189,7 @@ public class PlotListener {
if (pw == null) {
return true;
}
if (Flags.DENY_EXIT.isTrue(plot)) {
if (Flags.DENY_EXIT.isTrue(plot) && !player.getMeta("kick", false)) {
if (previous != null) {
player.setMeta(PlotPlayer.META_LAST_PLOT, previous);
}