LuckyBox was added to OpenGui

This commit is contained in:
JaTiTV 2022-01-13 03:28:06 +01:00
parent c4525a0055
commit f1e1c0de57
4 changed files with 24 additions and 4 deletions

View File

@ -81,7 +81,12 @@
<dependency> <dependency>
<groupId>net.t2code</groupId> <groupId>net.t2code</groupId>
<artifactId>T2CodeLib</artifactId> <artifactId>T2CodeLib</artifactId>
<version>8</version> <version>10.3</version>
</dependency>
<dependency>
<groupId>net.t2code</groupId>
<artifactId>LuckyBox-API</artifactId>
<version>4.2.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.t2code.minecraft.1_18.r1</groupId> <groupId>net.t2code.minecraft.1_18.r1</groupId>

View File

@ -38,6 +38,7 @@ public final class Main extends JavaPlugin {
public static String update_version = null; public static String update_version = null;
public static Boolean PaPi = false; public static Boolean PaPi = false;
public static Boolean PlotSquaredGUI = false; public static Boolean PlotSquaredGUI = false;
public static Boolean LuckyBox = false;
public static Boolean PlugManGUI = false; public static Boolean PlugManGUI = false;
public static HashMap<String, Object> guiHashMap = new HashMap<>(); public static HashMap<String, Object> guiHashMap = new HashMap<>();
@ -63,11 +64,14 @@ public final class Main extends JavaPlugin {
} }
public static void addonLoad() { public static void addonLoad() {
if (Bukkit.getPluginManager().getPlugin("PlotSquaredGUI") != null) { if (PluginCheck.plotSquaredGUI()) {
PlotSquaredGUI = true; PlotSquaredGUI = true;
addonEnable(Bukkit.getPluginManager().getPlugin("PlotSquaredGUI")); addonEnable(Bukkit.getPluginManager().getPlugin("PlotSquaredGUI"));
}if (PluginCheck.luckyBox()) {
LuckyBox = true;
addonEnable(Bukkit.getPluginManager().getPlugin("T2C-LuckyBox"));
} }
if (Bukkit.getPluginManager().getPlugin("PlugManGUI") != null) { if (PluginCheck.plugManGUI()) {
PlugManGUI = true; PlugManGUI = true;
addonEnable(Bukkit.getPluginManager().getPlugin("PlugManGUI")); addonEnable(Bukkit.getPluginManager().getPlugin("PlugManGUI"));
} }

View File

@ -14,6 +14,7 @@ import net.t2code.lib.Spigot.Lib.items.ItemVersion;
import net.t2code.lib.Spigot.Lib.messages.send; import net.t2code.lib.Spigot.Lib.messages.send;
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion; import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
import net.t2code.lib.Spigot.Lib.replace.Replace; import net.t2code.lib.Spigot.Lib.replace.Replace;
import net.t2code.luckybox.api.LuckyBoxAPI;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -54,6 +55,16 @@ public class OpenGUI {
} }
} }
return; return;
case "plugin.T2C-LuckyBox":
if (Main.LuckyBox) {
LuckyBoxAPI.openShop(player);
} else {
if (player.hasPermission("commandgui.admin")) {
send.player(player, prefix + " §4T2C-LuckyBox could not be found! §9Please download it here: " +
"§6https://www.spigotmc.org/resources/luckybox.98154/");
}
}
return;
} }
if (MCVersion.minecraft1_13) { if (MCVersion.minecraft1_13) {

View File

@ -1,7 +1,7 @@
package de.jatitv.commandguiv2; package de.jatitv.commandguiv2;
public class Util { public class Util {
private static double requiredT2CodeLibVersion = 10.1; private static double requiredT2CodeLibVersion = 10.3;
private static String Prefix = "§8[§4C§9GUI§8]"; private static String Prefix = "§8[§4C§9GUI§8]";
private static Integer SpigotID = 90671; private static Integer SpigotID = 90671;
private static Integer BstatsID = 10840; private static Integer BstatsID = 10840;