Bumped deps, moved IOByte deps to SBD repo, removed ParkPlus support
All checks were successful
Plugins/ThemeParkPlus/pipeline/head This commit looks good
All checks were successful
Plugins/ThemeParkPlus/pipeline/head This commit looks good
This commit is contained in:
parent
4a4c620d53
commit
d71f9a0fca
5 changed files with 12 additions and 48 deletions
23
pom.xml
23
pom.xml
|
@ -6,7 +6,7 @@
|
|||
|
||||
<groupId>nl.SBDeveloper</groupId>
|
||||
<artifactId>ThemeParkPlus</artifactId>
|
||||
<version>3.2</version>
|
||||
<version>3.2.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ThemeParkPlus</name>
|
||||
|
@ -115,28 +115,25 @@
|
|||
<url>https://repo.codemc.org/repository/maven-public/</url>
|
||||
<layout>default</layout>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sbdevelopment-repo-releases</id>
|
||||
<name>SBDevelopment Repository</name>
|
||||
<url>https://repo.sbdevelopment.tech/releases</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.19.2-R0.1-SNAPSHOT</version>
|
||||
<version>1.20.2-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.paradoxpixel</groupId>
|
||||
<groupId>nl.iobyte</groupId>
|
||||
<artifactId>themepark</artifactId>
|
||||
<version>3.1.1</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${pom.basedir}/src/lib/ThemePark_v3.1.1.jar</systemPath>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.paradoxpixel</groupId>
|
||||
<artifactId>parkplusmc</artifactId>
|
||||
<version>1.4</version>
|
||||
<scope>system</scope>
|
||||
<systemPath>${pom.basedir}/src/lib/parkplus-1.4.jar</systemPath>
|
||||
<version>3.1.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -84,14 +84,11 @@ public final class ThemeParkPlus extends JavaPlugin {
|
|||
Bukkit.getPluginManager().registerEvents(new AntiFreerunListener(), this);
|
||||
}
|
||||
|
||||
if (Bukkit.getPluginManager().getPlugin("ThemePark") == null && Bukkit.getPluginManager().getPlugin("ParkPlusMC") == null) {
|
||||
getLogger().severe("ThemePark or ParkPlusMC not found! Some functions will not work without it!");
|
||||
if (Bukkit.getPluginManager().getPlugin("ThemePark") == null) {
|
||||
getLogger().warning("ThemePark not found! Some functions will not work without it!");
|
||||
} else if (Bukkit.getPluginManager().getPlugin("ThemePark") != null) {
|
||||
getLogger().info("Enabling ThemePark hook...");
|
||||
hasParkHook = true;
|
||||
} else if (Bukkit.getPluginManager().getPlugin("ParkPlusMC") != null) {
|
||||
getLogger().info("Enabling ParkPlusMC hook...");
|
||||
hasParkHook = true;
|
||||
}
|
||||
|
||||
if (hasParkHook) {
|
||||
|
|
|
@ -73,34 +73,4 @@ public class StatusChangeListener implements Listener {
|
|||
|
||||
ThemeParkPlus.getWebhookClient().send(message);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onStatusChangePPMC(nl.iobyte.parkplus.generic.event.attraction.AttractionStatusChangeEvent e) {
|
||||
String title = ThemeParkPlus.getSConfig().getFile().getString("DiscordWebhook.Embed.Title");
|
||||
if (title == null) return;
|
||||
|
||||
String rideName = ChatColor.stripColor(ConfigUtil.__(e.getAttraction().getName()));
|
||||
String regionName = ChatColor.stripColor(ConfigUtil.__(e.getAttraction().getRegionID()));
|
||||
String statusAfter = ChatColor.stripColor(ConfigUtil.__(e.getCurrent().getColor() + e.getCurrent().getName()));
|
||||
|
||||
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.getCurrent().name());
|
||||
if (copy == null || copyimg == null) return;
|
||||
|
||||
WebhookEmbed embed = new WebhookEmbedBuilder()
|
||||
.setTitle(new WebhookEmbed.EmbedTitle(title, null))
|
||||
.setFooter(new WebhookEmbed.EmbedFooter(copy, copyimg))
|
||||
.setColor(color)
|
||||
.addField(new WebhookEmbed.EmbedField(false, rideName, statusAfter))
|
||||
.build();
|
||||
|
||||
WebhookMessage message = new WebhookMessageBuilder()
|
||||
.addEmbeds(embed)
|
||||
.build();
|
||||
|
||||
ThemeParkPlus.getWebhookClient().send(message);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue