mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Greeting flag in title
This commit is contained in:
parent
024aa995f6
commit
74afa033c4
1
.gitignore
vendored
1
.gitignore
vendored
@ -100,3 +100,4 @@ hs_err_pid*
|
|||||||
/target
|
/target
|
||||||
/plotsquared/target
|
/plotsquared/target
|
||||||
*.MF
|
*.MF
|
||||||
|
PlotSquared/schematic.zip
|
@ -8,7 +8,7 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>PlotSquared</artifactId>
|
<artifactId>PlotSquared</artifactId>
|
||||||
<version>2.10.7</version>
|
<version>2.10.8</version>
|
||||||
<name>PlotSquared</name>
|
<name>PlotSquared</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
|
@ -111,8 +111,16 @@ public class PlotListener extends APlotListener {
|
|||||||
player.setPlayerWeather(getWeatherType(weatherFlag.getValueString()));
|
player.setPlayerWeather(getWeatherType(weatherFlag.getValueString()));
|
||||||
}
|
}
|
||||||
if ((FlagManager.isBooleanFlag(plot, "titles", Settings.TITLES)) && (C.TITLE_ENTERED_PLOT.s().length() > 2)) {
|
if ((FlagManager.isBooleanFlag(plot, "titles", Settings.TITLES)) && (C.TITLE_ENTERED_PLOT.s().length() > 2)) {
|
||||||
final String sTitleMain = C.TITLE_ENTERED_PLOT.s().replaceAll("%x%", plot.id.x + "").replaceAll("%z%", plot.id.y + "").replaceAll("%world%", plot.world + "");
|
Flag greetingFlag = FlagManager.getPlotFlag(plot, "greeting");
|
||||||
final String sTitleSub = C.TITLE_ENTERED_PLOT_SUB.s().replaceFirst("%s", getName(plot.owner));
|
String greeting;
|
||||||
|
if (greetingFlag != null) {
|
||||||
|
greeting = greetingFlag.getValue() + "";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
greeting = "";
|
||||||
|
}
|
||||||
|
final String sTitleMain = C.TITLE_ENTERED_PLOT.s().replaceAll("%x%", plot.id.x + "").replaceAll("%z%", plot.id.y + "").replaceAll("%world%", plot.world + "").replaceAll("%greeting%", greeting);
|
||||||
|
final String sTitleSub = C.TITLE_ENTERED_PLOT_SUB.s().replaceFirst("%s", getName(plot.owner)).replaceAll("%greeting%", greeting);
|
||||||
if (AbstractTitle.TITLE_CLASS != null) {
|
if (AbstractTitle.TITLE_CLASS != null) {
|
||||||
AbstractTitle.TITLE_CLASS.sendTitle(player, sTitleMain, sTitleSub, ChatColor.valueOf(C.TITLE_ENTERED_PLOT_COLOR.s()), ChatColor.valueOf(C.TITLE_ENTERED_PLOT_SUB_COLOR.s()));
|
AbstractTitle.TITLE_CLASS.sendTitle(player, sTitleMain, sTitleSub, ChatColor.valueOf(C.TITLE_ENTERED_PLOT_COLOR.s()), ChatColor.valueOf(C.TITLE_ENTERED_PLOT_SUB_COLOR.s()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user