mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Merge branch 'v6' into v7
This commit is contained in:
@ -166,6 +166,7 @@ public class Deny extends SubCommand {
|
||||
}
|
||||
|
||||
private void handleKick(PlotPlayer<?> player, Plot plot) {
|
||||
plot = plot.getBasePlot(false);
|
||||
if (player == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user