mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Fix title global flag
This commit is contained in:
parent
35ebc8c830
commit
47db330764
@ -35,9 +35,15 @@ public class PlotListener {
|
|||||||
EventUtil.manager.callEntry(player, plot);
|
EventUtil.manager.callEntry(player, plot);
|
||||||
if (plot.hasOwner()) {
|
if (plot.hasOwner()) {
|
||||||
Map<Flag<?>, Object> flags = FlagManager.getPlotFlags(plot);
|
Map<Flag<?>, Object> flags = FlagManager.getPlotFlags(plot);
|
||||||
boolean titles = Settings.TITLES;
|
|
||||||
final String greeting;
|
|
||||||
|
|
||||||
|
boolean titles;
|
||||||
|
if (!plot.getArea().DEFAULT_FLAGS.isEmpty()) {
|
||||||
|
Boolean value = (Boolean) plot.getArea().DEFAULT_FLAGS.get(Flags.TITLES);
|
||||||
|
titles = value != null ? value : Settings.TITLES;
|
||||||
|
} else {
|
||||||
|
titles = Settings.TITLES;
|
||||||
|
}
|
||||||
|
final String greeting;
|
||||||
if (flags.isEmpty()) {
|
if (flags.isEmpty()) {
|
||||||
if (titles) {
|
if (titles) {
|
||||||
greeting = "";
|
greeting = "";
|
||||||
@ -45,9 +51,7 @@ public class PlotListener {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (Settings.TITLES) {
|
titles = plot.getFlag(Flags.TITLES, titles);
|
||||||
titles = plot.getFlag(Flags.TITLES, true);
|
|
||||||
}
|
|
||||||
Optional<String> greetingFlag = plot.getFlag(Flags.GREETING);
|
Optional<String> greetingFlag = plot.getFlag(Flags.GREETING);
|
||||||
if (greetingFlag.isPresent()) {
|
if (greetingFlag.isPresent()) {
|
||||||
greeting = greetingFlag.get();
|
greeting = greetingFlag.get();
|
||||||
|
Loading…
Reference in New Issue
Block a user