Allow "Server" owner

This commit is contained in:
dordsor21 2020-12-10 17:58:00 +00:00
parent 67683fbddb
commit 9ba91889e0
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B

View File

@ -56,6 +56,7 @@ import com.plotsquared.core.plot.flag.implementations.HealFlag;
import com.plotsquared.core.plot.flag.implementations.MusicFlag; import com.plotsquared.core.plot.flag.implementations.MusicFlag;
import com.plotsquared.core.plot.flag.implementations.NotifyEnterFlag; import com.plotsquared.core.plot.flag.implementations.NotifyEnterFlag;
import com.plotsquared.core.plot.flag.implementations.NotifyLeaveFlag; import com.plotsquared.core.plot.flag.implementations.NotifyLeaveFlag;
import com.plotsquared.core.plot.flag.implementations.ServerPlotFlag;
import com.plotsquared.core.plot.flag.implementations.TimeFlag; import com.plotsquared.core.plot.flag.implementations.TimeFlag;
import com.plotsquared.core.plot.flag.implementations.TitlesFlag; import com.plotsquared.core.plot.flag.implementations.TitlesFlag;
import com.plotsquared.core.plot.flag.implementations.WeatherFlag; import com.plotsquared.core.plot.flag.implementations.WeatherFlag;
@ -292,7 +293,11 @@ public class PlotListener {
Templates.of("owner", user)); Templates.of("owner", user));
UUID uuid = plot.getOwner(); UUID uuid = plot.getOwner();
if (uuid == null) { if (uuid == null) {
if (plot.getFlag(ServerPlotFlag.class)) {
userConsumer.accept("Server");
} else {
userConsumer.accept("Unknown"); userConsumer.accept("Unknown");
}
} else { } else {
PlotSquared.get().getImpromptuUUIDPipeline().getSingle(plot.getOwner(), (user, throwable) -> { PlotSquared.get().getImpromptuUUIDPipeline().getSingle(plot.getOwner(), (user, throwable) -> {
if (throwable == null) { if (throwable == null) {