Fix a few remaining merge issues (+1 squashed commits)

Squashed commits:

[8c6b55dd4] Fix a few remaining merge issues
This commit is contained in:
dordsor21
2020-07-24 17:52:05 +01:00
parent 3180d2ddf2
commit 221d299052
12 changed files with 504 additions and 641 deletions

View File

@ -2351,7 +2351,7 @@ public class Plot {
*
* @return The plot alias
*/
@NotNull public String getAlias() {
@Nonnull public String getAlias() {
if (this.settings == null) {
return "";
}

View File

@ -104,6 +104,9 @@ public class EventDispatcher {
eventBus.unregister(listener);
}
}
public void callGenericEvent(@Nonnull final Object event) {
eventBus.post(event);
}
public void callEvent(@Nonnull final PlotEvent event) {
eventBus.post(event);

View File

@ -34,6 +34,7 @@ import com.plotsquared.core.plot.flag.GlobalFlagContainer;
import com.plotsquared.core.plot.flag.PlotFlag;
import com.plotsquared.core.util.EventDispatcher;
import com.plotsquared.core.util.MainUtil;
import com.plotsquared.core.util.PlayerManager;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.jetbrains.annotations.NotNull;
@ -70,7 +71,7 @@ public final class PlaceholderRegistry {
this.registerPlaceholder(new PlotFlagPlaceholder(flag, true));
this.registerPlaceholder(new PlotFlagPlaceholder(flag, false));
});
this.createPlaceholder("currentplot_world", player -> player.getLocation().getWorld());
this.createPlaceholder("currentplot_world", player -> player.getLocation().getWorldName());
this.createPlaceholder("has_plot", player -> player.getPlotCount() > 0 ? "true" : "false");
this.createPlaceholder("allowed_plot_count", player -> Integer.toString(player.getAllowedPlots()));
this.createPlaceholder("plot_count", player -> Integer.toString(player.getPlotCount()));
@ -82,7 +83,7 @@ public final class PlaceholderRegistry {
}
try {
return MainUtil.getName(plotOwner, false);
return PlayerManager.getName(plotOwner, false);
} catch (final Exception ignored) {}
return "unknown";