mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-21 11:45:19 +01:00
Greeting flag in title
This commit is contained in:
parent
024aa995f6
commit
74afa033c4
3
.gitignore
vendored
3
.gitignore
vendored
@ -99,4 +99,5 @@ local.properties
|
||||
hs_err_pid*
|
||||
/target
|
||||
/plotsquared/target
|
||||
*.MF
|
||||
*.MF
|
||||
PlotSquared/schematic.zip
|
@ -8,7 +8,7 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<artifactId>PlotSquared</artifactId>
|
||||
<version>2.10.7</version>
|
||||
<version>2.10.8</version>
|
||||
<name>PlotSquared</name>
|
||||
<packaging>jar</packaging>
|
||||
<build>
|
||||
|
@ -111,8 +111,16 @@ public class PlotListener extends APlotListener {
|
||||
player.setPlayerWeather(getWeatherType(weatherFlag.getValueString()));
|
||||
}
|
||||
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 + "");
|
||||
final String sTitleSub = C.TITLE_ENTERED_PLOT_SUB.s().replaceFirst("%s", getName(plot.owner));
|
||||
Flag greetingFlag = FlagManager.getPlotFlag(plot, "greeting");
|
||||
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) {
|
||||
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