mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 12:25:46 +01:00
feat: Don't display the default plot title if on a server-plot, unless configured otherwise. (#3305)
- If plot-title flag is set, title will still be displayed.
This commit is contained in:
parent
804228fa6c
commit
6f3eabba0e
@ -708,6 +708,9 @@ public class Settings extends Config {
|
|||||||
"If you would like to still show the owner of the plot, append the contents of \"titles.title_entered_plot_sub\" onto the " +
|
"If you would like to still show the owner of the plot, append the contents of \"titles.title_entered_plot_sub\" onto the " +
|
||||||
"former lang key."})
|
"former lang key."})
|
||||||
public static boolean TITLES_AS_ACTIONBAR = false;
|
public static boolean TITLES_AS_ACTIONBAR = false;
|
||||||
|
@Comment({"If the default title should be displayed on plots with server-plot flag set.",
|
||||||
|
"Titles will still be sent if the plot-title flag is set."})
|
||||||
|
public static boolean DISPLAY_DEFAULT_ON_SERVER_PLOT = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,6 +58,7 @@ 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.PlotTitleFlag;
|
import com.plotsquared.core.plot.flag.implementations.PlotTitleFlag;
|
||||||
|
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;
|
||||||
@ -317,7 +318,7 @@ public class PlotListener {
|
|||||||
subtitle = "";
|
subtitle = "";
|
||||||
fromFlag = false;
|
fromFlag = false;
|
||||||
}
|
}
|
||||||
// It's not actually possible for these to be null, but IntelliJ is dumb
|
if (fromFlag || !plot.getFlag(ServerPlotFlag.class) || Settings.Titles.DISPLAY_DEFAULT_ON_SERVER_PLOT) {
|
||||||
TaskManager.runTaskLaterAsync(() -> {
|
TaskManager.runTaskLaterAsync(() -> {
|
||||||
Plot lastPlot;
|
Plot lastPlot;
|
||||||
try (final MetaDataAccess<Plot> lastPlotAccess =
|
try (final MetaDataAccess<Plot> lastPlotAccess =
|
||||||
@ -363,6 +364,7 @@ public class PlotListener {
|
|||||||
}
|
}
|
||||||
}, TaskTime.seconds(1L));
|
}, TaskTime.seconds(1L));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TimedFlag.Timed<Integer> feed = plot.getFlag(FeedFlag.class);
|
TimedFlag.Timed<Integer> feed = plot.getFlag(FeedFlag.class);
|
||||||
if (feed.getInterval() != 0 && feed.getValue() != 0) {
|
if (feed.getInterval() != 0 && feed.getValue() != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user