From 30497cd33536edc2e559dccde1202ef85f603800 Mon Sep 17 00:00:00 2001 From: stijnb1234 Date: Mon, 17 Aug 2020 12:59:40 +0200 Subject: [PATCH] Added Region placeholder for Webhook, bumped to v2.1.1 --- pom.xml | 2 +- .../themeparkplus/listeners/StatusChangeListener.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 59f3f37..e7d7b0e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ nl.SBDeveloper ThemeParkPlus - 2.1 + 2.1.1 jar ThemeParkPlus diff --git a/src/main/lombok/nl/sbdeveloper/themeparkplus/listeners/StatusChangeListener.java b/src/main/lombok/nl/sbdeveloper/themeparkplus/listeners/StatusChangeListener.java index ca4bfb4..12963ab 100644 --- a/src/main/lombok/nl/sbdeveloper/themeparkplus/listeners/StatusChangeListener.java +++ b/src/main/lombok/nl/sbdeveloper/themeparkplus/listeners/StatusChangeListener.java @@ -23,9 +23,11 @@ public class StatusChangeListener implements Listener { if (title == null) return; String rideName = ChatColor.stripColor(ConfigUtil.makecolored(e.getAttraction().getName())); + String regionName = ChatColor.stripColor(ConfigUtil.makecolored(e.getAttraction().getRegion().getName())); String statusAfter = ChatColor.stripColor(ConfigUtil.makecolored(StatusManager.getName(e.getAfter()))); title = title.replaceAll("%RideName%", rideName); + title = title.replaceAll("%Region%", regionName); String copy = ThemeParkPlus.getSConfig().getFile().getString("DiscordWebhook.Embed.Copyright"); String copyimg = ThemeParkPlus.getSConfig().getFile().getString("DiscordWebhook.Embed.CopyrightImage"); Integer color = ThemeParkPlus.getSConfig().getFile().getInt("DiscordWebhook.Embed.Colors." + e.getAfter().toString());