Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
7808a3bf6e | |||
f1e1c0de57 | |||
c4525a0055 |
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>net.t2code</groupId>
|
||||
<artifactId>CommandGUI_V2</artifactId>
|
||||
<version>2.5.20</version>
|
||||
<version>2.5.21</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>CommandGUI</name>
|
||||
@@ -81,7 +81,12 @@
|
||||
<dependency>
|
||||
<groupId>net.t2code</groupId>
|
||||
<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>
|
||||
<groupId>net.t2code.minecraft.1_18.r1</groupId>
|
||||
|
@@ -33,11 +33,15 @@ public class Events implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onJoin(PlayerJoinEvent e) {
|
||||
if (CGuiAPI.JoinDisable) return;
|
||||
if (CGuiAPI.JoinDisable) {
|
||||
send.debug(Main.plugin,"JoinDisable");
|
||||
return;
|
||||
}
|
||||
if (e.getPlayer().hasPermission("commandgui.get.guiitem.at.login")) {
|
||||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
send.debug(Main.plugin,"itemChange: " + e.getPlayer().getName());
|
||||
ItemChange.itemChange(e.getPlayer(), true);
|
||||
}
|
||||
}.runTaskLater(Main.plugin, 20L * 1);
|
||||
|
@@ -38,6 +38,7 @@ public final class Main extends JavaPlugin {
|
||||
public static String update_version = null;
|
||||
public static Boolean PaPi = false;
|
||||
public static Boolean PlotSquaredGUI = false;
|
||||
public static Boolean LuckyBox = false;
|
||||
public static Boolean PlugManGUI = false;
|
||||
|
||||
public static HashMap<String, Object> guiHashMap = new HashMap<>();
|
||||
@@ -63,11 +64,14 @@ public final class Main extends JavaPlugin {
|
||||
}
|
||||
|
||||
public static void addonLoad() {
|
||||
if (Bukkit.getPluginManager().getPlugin("PlotSquaredGUI") != null) {
|
||||
if (PluginCheck.plotSquaredGUI()) {
|
||||
PlotSquaredGUI = true;
|
||||
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;
|
||||
addonEnable(Bukkit.getPluginManager().getPlugin("PlugManGUI"));
|
||||
}
|
||||
|
@@ -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.minecraftVersion.MCVersion;
|
||||
import net.t2code.lib.Spigot.Lib.replace.Replace;
|
||||
import net.t2code.luckybox.api.LuckyBoxAPI;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -54,6 +55,16 @@ public class OpenGUI {
|
||||
}
|
||||
}
|
||||
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) {
|
||||
|
@@ -35,7 +35,10 @@ public class Give_UseItem {
|
||||
}
|
||||
if (SelectConfig.UseItem_InventorySlot_FreeSlot) {
|
||||
player.getInventory().addItem(itemStack(player));
|
||||
} else player.getInventory().setItem(slot - 1, itemStack(player));
|
||||
} else {
|
||||
send.debug(Main.plugin,"setUseItem: " + player.getName() + " Slot: "+ Integer.parseInt(String.valueOf(slot-1)));
|
||||
player.getInventory().setItem(slot - 1, itemStack(player));
|
||||
}
|
||||
}
|
||||
|
||||
public static void onGiveADD(Player player) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package de.jatitv.commandguiv2;
|
||||
|
||||
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 Integer SpigotID = 90671;
|
||||
private static Integer BstatsID = 10840;
|
||||
|
@@ -7,6 +7,7 @@ import de.jatitv.commandguiv2.Spigot.cmdManagement.Help;
|
||||
import de.jatitv.commandguiv2.Spigot.config.DefaultGUICreate;
|
||||
import de.jatitv.commandguiv2.Spigot.config.languages.SelectMessages;
|
||||
import de.jatitv.commandguiv2.Spigot.system.database.Select_Database;
|
||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -21,6 +22,7 @@ public class CGuiAPI {
|
||||
}
|
||||
|
||||
public static void disableItemGiveOnJoin(Boolean disableItemGiveOnJoin) {
|
||||
send.debug(Main.plugin,"CGuiAPI: " +disableItemGiveOnJoin);
|
||||
JoinDisable = disableItemGiveOnJoin;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user