package cx.sfy.TheBridge.managers; import org.bukkit.ChatColor; import org.bukkit.entity.Player; import cx.sfy.TheBridge.Main; public class TitleManager { Main plugin; private final String preTitle; private final String preSubTitle; private final String startTitle; private final String startSubTitle; private final String restartTitle; private final String restartSubTitle; private final int pfadein; private final int pstayin; private final int pfadeout; private final int sfadein; private final int sstayin; private final int sfadeout; private final int rfadein; private final int rstayin; private final int rfadeout; public TitleManager(Main plugin) { this.plugin = plugin; this.preTitle = plugin.getLang().get("titles.prestart.title"); this.preSubTitle = plugin.getLang().get("titles.prestart.subtitle"); this.pfadein = plugin.getConfig().getInt("title.prestart.fadein"); this.pstayin = plugin.getConfig().getInt("title.prestart.stayin"); this.pfadeout = plugin.getConfig().getInt("title.prestart.fadeout"); this.startTitle = plugin.getLang().get("titles.start.title"); this.startSubTitle = plugin.getLang().get("titles.start.subtitle"); this.sfadein = plugin.getConfig().getInt("title.start.fadein"); this.sstayin = plugin.getConfig().getInt("title.start.stayin"); this.sfadeout = plugin.getConfig().getInt("title.start.fadeout"); this.restartTitle = plugin.getLang().get("titles.restart.title"); this.restartSubTitle = plugin.getLang().get("titles.restart.subtitle"); this.rfadein = plugin.getConfig().getInt("title.restart.fadein"); this.rstayin = plugin.getConfig().getInt("title.restart.stayin"); this.rfadeout = plugin.getConfig().getInt("title.restart.fadeout"); } public void sendPreTitle(Player p, int time, boolean s) { if (s) plugin.getNms().sendTitle(p, pfadein, pstayin, pfadeout, preTitle.replaceAll("", "").replaceAll("