Merge branch 'v6' into v7

This commit is contained in:
Alexander Brandes
2022-05-29 22:05:17 +02:00
5 changed files with 11 additions and 2 deletions

View File

@ -166,6 +166,7 @@ public class Deny extends SubCommand {
}
private void handleKick(PlotPlayer<?> player, Plot plot) {
plot = plot.getBasePlot(false);
if (player == null) {
return;
}

View File

@ -38,6 +38,7 @@ import com.plotsquared.core.player.PlotPlayer;
import com.plotsquared.core.plot.Plot;
import com.plotsquared.core.plot.flag.GlobalFlagContainer;
import com.plotsquared.core.plot.flag.PlotFlag;
import com.plotsquared.core.plot.flag.implementations.ServerPlotFlag;
import com.plotsquared.core.util.EventDispatcher;
import com.plotsquared.core.util.PlayerManager;
import net.kyori.adventure.text.Component;
@ -109,6 +110,9 @@ public final class PlaceholderRegistry {
return plot.getAlias();
});
this.createPlaceholder("currentplot_owner", (player, plot) -> {
if (plot.getFlag(ServerPlotFlag.class)){
return legacyComponent(TranslatableCaption.of("info.server"), player);
}
final UUID plotOwner = plot.getOwnerAbs();
if (plotOwner == null) {
return legacyComponent(TranslatableCaption.of("generic.generic_unowned"), player);