From 291c290f158daddcbe8828eb3e0694ed731abfad Mon Sep 17 00:00:00 2001 From: Sauilitired Date: Sun, 2 Nov 2014 20:03:43 +0100 Subject: [PATCH] Titles are now optional xD Fixes #27 --- .../src/main/java/com/intellectualcrafters/plot/PlotMain.java | 3 ++- .../com/intellectualcrafters/plot/listeners/PlotListener.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java index d9b3a50eb..533bf7f7b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java @@ -1288,7 +1288,8 @@ public class PlotMain extends JavaPlugin { "invincible", "instabreak", "drop-protection", - "forcefield" + "forcefield", + "titles" ); List intervalFlags = Arrays.asList( "feed", diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotListener.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotListener.java index 59b9a3de4..69ccf568b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotListener.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlotListener.java @@ -176,7 +176,7 @@ public class PlotListener { if(plot.settings.getFlag("weather") != null) { player.setPlayerWeather(getWeatherType(plot.settings.getFlag("weather").getValue())); } - if (Settings.TITLES && C.TITLE_ENTERED_PLOT.s().length() > 2) { + if (booleanFlag(plot, "titles") && Settings.TITLES && C.TITLE_ENTERED_PLOT.s().length() > 2) { String sTitleMain = C.TITLE_ENTERED_PLOT.s().replaceFirst("%s", plot.getDisplayName()); String sTitleSub = C.TITLE_ENTERED_PLOT_SUB.s().replaceFirst("%s", getName(plot.owner)); ChatColor sTitleMainColor = ChatColor.valueOf(C.TITLE_ENTERED_PLOT_COLOR.s());