Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
b0286e597f | |||
ddfea4eba6 | |||
|
ed86e7b143 | ||
32c1219bb2 | |||
326dfae0e9 | |||
a05b941aaf | |||
36de2ff0ca | |||
|
777c6876fc | ||
7fda797cae | |||
007d8776b9 | |||
|
dcd524ab3c | ||
|
c3d0990853 | ||
|
04a7d4952e | ||
d96205887c |
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>CommandGUI_V2</artifactId>
|
<artifactId>CommandGUI_V2</artifactId>
|
||||||
<version>2.7.0</version>
|
<version>2.7.3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>CommandGUI</name>
|
<name>CommandGUI</name>
|
||||||
|
@@ -10,6 +10,8 @@ import de.jatitv.commandguiv2.Spigot.objects.guis.Gui;
|
|||||||
import de.jatitv.commandguiv2.Spigot.gui.OpenGUI;
|
import de.jatitv.commandguiv2.Spigot.gui.OpenGUI;
|
||||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||||
import de.jatitv.commandguiv2.Spigot.Main;
|
import de.jatitv.commandguiv2.Spigot.Main;
|
||||||
|
import de.jatitv.commandguiv2.Spigot.system.Papi;
|
||||||
|
import de.jatitv.commandguiv2.Spigot.system.Placeholder;
|
||||||
import de.jatitv.commandguiv2.Util;
|
import de.jatitv.commandguiv2.Util;
|
||||||
import net.t2code.lib.Spigot.Lib.items.ItemVersion;
|
import net.t2code.lib.Spigot.Lib.items.ItemVersion;
|
||||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||||
@@ -149,12 +151,12 @@ public class GUIListener implements Listener {
|
|||||||
for (String msg : slot.message) {
|
for (String msg : slot.message) {
|
||||||
if (Main.PaPi) {
|
if (Main.PaPi) {
|
||||||
if (slot.cost_Enable) {
|
if (slot.cost_Enable) {
|
||||||
player.sendMessage(Replace.replacePrice(prefix, player, msg, slot.price + " " + SelectConfig.Currency));
|
player.sendMessage(Replace.replacePrice(prefix, player, Placeholder.replace(msg, player), slot.price + " " + SelectConfig.Currency));
|
||||||
} else player.sendMessage(Replace.replace(prefix, player, msg.replace("[prefix]", prefix)));
|
} else player.sendMessage(Replace.replace(prefix, player, Placeholder.replace(msg, player)));
|
||||||
} else {
|
} else {
|
||||||
if (slot.cost_Enable) {
|
if (slot.cost_Enable) {
|
||||||
player.sendMessage(Replace.replacePrice(prefix, msg, slot.price + " " + SelectConfig.Currency));
|
player.sendMessage(Replace.replacePrice(prefix, Placeholder.replace(msg, player), slot.price + " " + SelectConfig.Currency));
|
||||||
} else player.sendMessage(Replace.replace(prefix, msg.replace("[prefix]", prefix)));
|
} else player.sendMessage(Replace.replace(prefix, Placeholder.replace(msg, player)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -261,7 +263,7 @@ public class GUIListener implements Listener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void toggleUseItem(Player player, Gui gui) {
|
private static void toggleUseItem(Player player, Gui gui) {
|
||||||
if (Events.useItemHashMap.get(player)) {
|
if (Events.useItemHashMap.get(player.getName())) {
|
||||||
Commands.itemOff(player);
|
Commands.itemOff(player);
|
||||||
} else {
|
} else {
|
||||||
Commands.itemOn(player);
|
Commands.itemOn(player);
|
||||||
|
@@ -4,6 +4,7 @@ import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
|||||||
import de.jatitv.commandguiv2.Spigot.Main;
|
import de.jatitv.commandguiv2.Spigot.Main;
|
||||||
import de.jatitv.commandguiv2.Spigot.system.UseItem;
|
import de.jatitv.commandguiv2.Spigot.system.UseItem;
|
||||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||||
|
import de.jatitv.commandguiv2.Spigot.system.database.SelectDatabase;
|
||||||
import net.t2code.lib.Spigot.Lib.messages.send;
|
import net.t2code.lib.Spigot.Lib.messages.send;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
@@ -14,11 +15,7 @@ public class ItemChange {
|
|||||||
if (SelectConfig.UseItem_InventorySlotEnforce) {
|
if (SelectConfig.UseItem_InventorySlotEnforce) {
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
} else {
|
} else {
|
||||||
if (Events.useItemSlotHashMap.get(player) == null) {
|
slot = Events.useItemSlotHashMap.get(player.getName());
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
|
||||||
} else {
|
|
||||||
slot = Events.useItemSlotHashMap.get(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SelectConfig.UseItem_Enable) {
|
if (!SelectConfig.UseItem_Enable) {
|
||||||
@@ -27,7 +24,7 @@ public class ItemChange {
|
|||||||
UseItem.removeItem(player);
|
UseItem.removeItem(player);
|
||||||
if (UseItem.protection(player, false)) return;
|
if (UseItem.protection(player, false)) return;
|
||||||
if (SelectConfig.UseItem_GiveOnlyOnFirstJoin) {
|
if (SelectConfig.UseItem_GiveOnlyOnFirstJoin) {
|
||||||
if (!SelectConfig.UseItem_AllowToggle || Events.useItemHashMap.get(player)) {
|
if (!SelectConfig.UseItem_AllowToggle || Events.useItemHashMap.get(player.getName())) {
|
||||||
if (!player.hasPlayedBefore()) {
|
if (!player.hasPlayedBefore()) {
|
||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -53,7 +50,7 @@ public class ItemChange {
|
|||||||
new BukkitRunnable() {
|
new BukkitRunnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!SelectConfig.UseItem_AllowToggle || Events.useItemHashMap.get(player)) {
|
if (!SelectConfig.UseItem_AllowToggle || Events.useItemHashMap.get(player.getName())) {
|
||||||
if (SelectConfig.UseItem_InventorySlotEnforce || player.getInventory().getItem(slot - 1) == null) {
|
if (SelectConfig.UseItem_InventorySlotEnforce || player.getInventory().getItem(slot - 1) == null) {
|
||||||
send.debug(Main.plugin, "Give: " + player.getName());
|
send.debug(Main.plugin, "Give: " + player.getName());
|
||||||
UseItem.giveUseItem(player);
|
UseItem.giveUseItem(player);
|
||||||
|
@@ -34,16 +34,16 @@ import java.util.Iterator;
|
|||||||
|
|
||||||
public class Events implements Listener {
|
public class Events implements Listener {
|
||||||
|
|
||||||
public static HashMap<Player, Boolean> useItemHashMap = new HashMap<>();
|
public static HashMap<String, Boolean> useItemHashMap = new HashMap<>();
|
||||||
public static HashMap<Player, Integer> useItemSlotHashMap = new HashMap<>();
|
public static HashMap<String, Integer> useItemSlotHashMap = new HashMap<>();
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onJoin(PlayerJoinEvent e) {
|
public void onJoin(PlayerJoinEvent e) {
|
||||||
if (SelectDatabase.selectItemStatus(e.getPlayer())) {
|
useItemHashMap.put(e.getPlayer().getName(), SelectDatabase.selectItemStatus(e.getPlayer()));
|
||||||
useItemHashMap.put(e.getPlayer(), true);
|
Integer i = SelectDatabase.selectSlot(e.getPlayer());
|
||||||
} else useItemHashMap.put(e.getPlayer(), false);
|
if (i == null) {
|
||||||
|
useItemSlotHashMap.put(e.getPlayer().getName(), SelectConfig.UseItem_InventorySlot);
|
||||||
useItemSlotHashMap.put(e.getPlayer(), SelectDatabase.selectSlot(e.getPlayer()));
|
} else useItemSlotHashMap.put(e.getPlayer().getName(), i);
|
||||||
|
|
||||||
if (CGuiAPI.JoinDisable) {
|
if (CGuiAPI.JoinDisable) {
|
||||||
send.debug(Main.plugin, "JoinDisable");
|
send.debug(Main.plugin, "JoinDisable");
|
||||||
@@ -62,7 +62,7 @@ public class Events implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onJoin(PlayerQuitEvent e) {
|
public void onJoin(PlayerQuitEvent e) {
|
||||||
useItemHashMap.remove(e.getPlayer());
|
useItemHashMap.remove(e.getPlayer().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
@@ -136,10 +136,17 @@ public class Events implements Listener {
|
|||||||
}.runTaskLater(Main.plugin, SelectConfig.UseItemWorldChangeDelayInTicks * 1L);
|
}.runTaskLater(Main.plugin, SelectConfig.UseItemWorldChangeDelayInTicks * 1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGHEST)
|
@EventHandler(priority = EventPriority.HIGHEST)
|
||||||
public void onInteract(PlayerInteractEvent e) {
|
public void onInteract(PlayerInteractEvent e) {
|
||||||
Player p = e.getPlayer();
|
Player p = e.getPlayer();
|
||||||
|
if (!p.isSneaking()) {
|
||||||
|
for (String material : SelectConfig.UseItemItemBlockBlacklist) {
|
||||||
|
if (e.getClickedBlock() != null) {
|
||||||
|
if (e.getClickedBlock().getType() == Material.valueOf(material)) return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (SelectConfig.UseItem_Enable) {
|
if (SelectConfig.UseItem_Enable) {
|
||||||
if (SelectConfig.UseItem_PlayerHead_Enable) {
|
if (SelectConfig.UseItem_PlayerHead_Enable) {
|
||||||
if (e.getItem() != null && p.getItemInHand().getType() == ItemVersion.getHead()) {
|
if (e.getItem() != null && p.getItemInHand().getType() == ItemVersion.getHead()) {
|
||||||
@@ -160,12 +167,12 @@ public class Events implements Listener {
|
|||||||
private static void openGUI(PlayerInteractEvent e, Player player) {
|
private static void openGUI(PlayerInteractEvent e, Player player) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
|
|
||||||
if (SelectConfig.disableInfoBySneak && player.isSneaking()) {
|
if ((!SelectConfig.disableInfoBySneak) && player.isSneaking()) {
|
||||||
Commands.info(player);
|
Commands.info(player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!legacy()) {
|
if (!Main.legacy) {
|
||||||
if (!topInventoryIsEmpty(player)) return;
|
if (!topInventoryIsEmpty(player)) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +218,6 @@ public class Events implements Listener {
|
|||||||
if (e.getItem() != null && e.getItem().hasItemMeta() && e.getItem().getItemMeta().hasDisplayName()
|
if (e.getItem() != null && e.getItem().hasItemMeta() && e.getItem().getItemMeta().hasDisplayName()
|
||||||
&& e.getItem().getItemMeta().getDisplayName().equals(SelectConfig.UseItem_Name)) {
|
&& e.getItem().getItemMeta().getDisplayName().equals(SelectConfig.UseItem_Name)) {
|
||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,12 +295,6 @@ public class Events implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean legacy() {
|
|
||||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12 || MCVersion.minecraft1_13 || MCVersion.minecraft1_14 || MCVersion.minecraft1_15 || NMSVersion.v1_16_R1) {
|
|
||||||
return true;
|
|
||||||
} else return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean topInventoryIsEmpty(Player p) {
|
private static boolean topInventoryIsEmpty(Player p) {
|
||||||
return p.getOpenInventory().getTopInventory().isEmpty();
|
return p.getOpenInventory().getTopInventory().isEmpty();
|
||||||
}
|
}
|
||||||
|
@@ -8,6 +8,8 @@ import de.jatitv.commandguiv2.Spigot.system.database.MySQL;
|
|||||||
import de.jatitv.commandguiv2.Util;
|
import de.jatitv.commandguiv2.Util;
|
||||||
import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
|
import net.t2code.lib.Spigot.Lib.messages.T2CodeTemplate;
|
||||||
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.NMSVersion;
|
||||||
import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
|
import net.t2code.lib.Spigot.Lib.plugins.PluginCheck;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
@@ -27,6 +29,7 @@ public final class Main extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static Boolean enable = false;
|
private static Boolean enable = false;
|
||||||
|
public static Boolean legacy = false;
|
||||||
|
|
||||||
public static String prefix = "§8[§4C§9GUI§8]";
|
public static String prefix = "§8[§4C§9GUI§8]";
|
||||||
|
|
||||||
@@ -57,6 +60,9 @@ public final class Main extends JavaPlugin {
|
|||||||
plugin = this;
|
plugin = this;
|
||||||
autor = plugin.getDescription().getAuthors();
|
autor = plugin.getDescription().getAuthors();
|
||||||
version = plugin.getDescription().getVersion();
|
version = plugin.getDescription().getVersion();
|
||||||
|
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12 || MCVersion.minecraft1_13 || MCVersion.minecraft1_14 || MCVersion.minecraft1_15 || NMSVersion.v1_16_R1) {
|
||||||
|
legacy = true;
|
||||||
|
}
|
||||||
if (pluginNotFound("T2CodeLib", 96388, Util.getRequiredT2CodeLibVersion())) return;
|
if (pluginNotFound("T2CodeLib", 96388, Util.getRequiredT2CodeLibVersion())) return;
|
||||||
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
|
||||||
if (PluginCheck.papi()) {
|
if (PluginCheck.papi()) {
|
||||||
|
@@ -65,14 +65,14 @@ public class Commands {
|
|||||||
|
|
||||||
CmdExecuter_GUITab.arg1.clear();
|
CmdExecuter_GUITab.arg1.clear();
|
||||||
CmdExecuter_GUITab.arg1.put("admin", "commandgui.admin;commandgui.giveitem.other;commandgui.command.info");
|
CmdExecuter_GUITab.arg1.put("admin", "commandgui.admin;commandgui.giveitem.other;commandgui.command.info");
|
||||||
ConfigCreate.configCreate();
|
|
||||||
SelectConfig.onSelect();
|
|
||||||
|
|
||||||
|
SelectConfig.onSelect();
|
||||||
Main.plugin.reloadConfig();
|
Main.plugin.reloadConfig();
|
||||||
if (!Objects.equals(SelectDatabase.getStorage().toString(), SelectConfig.storage)) {
|
if (!Objects.equals(SelectDatabase.getStorage().toString(), SelectConfig.storage)) {
|
||||||
if (sender instanceof Player) send.sender(sender, "You have changed the storage medium! To apply this change, you must restart the server!");
|
if (sender instanceof Player) send.sender(sender, "You have changed the storage medium! To apply this change, you must restart the server!");
|
||||||
send.console("You have changed the storage medium! To apply this change, you must restart the server!");
|
send.console("You have changed the storage medium! To apply this change, you must restart the server!");
|
||||||
}
|
}
|
||||||
|
|
||||||
LanguagesCreate.langCreate();
|
LanguagesCreate.langCreate();
|
||||||
|
|
||||||
Obj_Select.onSelect();
|
Obj_Select.onSelect();
|
||||||
@@ -124,11 +124,7 @@ public class Commands {
|
|||||||
if (SelectConfig.UseItem_InventorySlotEnforce) {
|
if (SelectConfig.UseItem_InventorySlotEnforce) {
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
} else {
|
} else {
|
||||||
if (Events.useItemSlotHashMap.get(player) == null) {
|
slot = Events.useItemSlotHashMap.get(player.getName());
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
|
||||||
} else {
|
|
||||||
slot = Events.useItemSlotHashMap.get(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
send.debug(Main.plugin, String.valueOf(slot));
|
send.debug(Main.plugin, String.valueOf(slot));
|
||||||
if (player.getInventory().getItem(slot - 1) == null) {
|
if (player.getInventory().getItem(slot - 1) == null) {
|
||||||
@@ -161,7 +157,11 @@ public class Commands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void onSetSlot(Player player, Integer setSlot) {
|
public static void onSetSlot(Player player, Integer setSlot) {
|
||||||
if (SelectConfig.UseItem_AllowSetSlot) {
|
if (!SelectConfig.UseItem_AllowSetSlot) {
|
||||||
|
player.sendMessage(Util.getPrefix() + " §4Function disabled");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (setSlot < 1) {
|
if (setSlot < 1) {
|
||||||
send.player(player, SelectMessages.ItemSlot_wrongValue);
|
send.player(player, SelectMessages.ItemSlot_wrongValue);
|
||||||
return;
|
return;
|
||||||
@@ -170,27 +170,28 @@ public class Commands {
|
|||||||
send.player(player, SelectMessages.ItemSlot_wrongValue);
|
send.player(player, SelectMessages.ItemSlot_wrongValue);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack itm1 = player.getInventory().getItem(setSlot + 1);
|
|
||||||
if (itm1 != null) {
|
if (Events.useItemHashMap.get(player.getName())) {
|
||||||
if (itm1.getType() == Material.valueOf(SelectConfig.UseItem_Material) || itm1.getType() == ItemVersion.getHead()) {
|
if (Objects.equals(Events.useItemSlotHashMap.get(player.getName()), setSlot)) {
|
||||||
if (itm1.getItemMeta().getDisplayName().equals(SelectConfig.UseItem_Name)) {
|
|
||||||
player.sendMessage(SelectMessages.ItemSlotAlreadySet.replace("[slot]", setSlot.toString()));
|
player.sendMessage(SelectMessages.ItemSlotAlreadySet.replace("[slot]", setSlot.toString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (SelectConfig.UseItem_InventorySlotEnforce || player.getInventory().getItem(setSlot - 1) != null) {
|
if (SelectConfig.UseItem_InventorySlotEnforce || player.getInventory().getItem(setSlot - 1) != null) {
|
||||||
send.player(player, SelectMessages.ItemSlotNotEmpty.replace("[slot]", setSlot.toString()));
|
send.player(player, SelectMessages.ItemSlotNotEmpty.replace("[slot]", setSlot.toString()));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
UseItem.removeItem(player);
|
UseItem.removeItem(player);
|
||||||
SelectDatabase.setSlot(player, setSlot);
|
SelectDatabase.setSlot(player, setSlot);
|
||||||
Events.useItemSlotHashMap.replace(player, setSlot);
|
Events.useItemSlotHashMap.replace(player.getName(), setSlot);
|
||||||
if (Events.useItemHashMap.get(player)) {
|
|
||||||
|
if (Events.useItemHashMap.get(player.getName())) {
|
||||||
UseItem.giveUseItem(player);
|
UseItem.giveUseItem(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
send.player(player, SelectMessages.ItemSlot.replace("[slot]", setSlot.toString()));
|
send.player(player, SelectMessages.ItemSlot.replace("[slot]", setSlot.toString()));
|
||||||
} else player.sendMessage(Util.getPrefix() + " §4Function disabled");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void gui(Player player) {
|
public static void gui(Player player) {
|
||||||
|
@@ -6,15 +6,19 @@ 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.yamlConfiguration.Config;
|
import net.t2code.lib.Spigot.Lib.yamlConfiguration.Config;
|
||||||
|
import org.bukkit.Material;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
public class ConfigCreate {
|
public class ConfigCreate {
|
||||||
|
|
||||||
|
|
||||||
public static void configCreate() {
|
public static void configCreate() {
|
||||||
long long_ = System.currentTimeMillis();
|
long long_ = System.currentTimeMillis();
|
||||||
if (new File(Main.getPath(), "config.yml").exists()) {
|
if (new File(Main.getPath(), "config.yml").exists()) {
|
||||||
@@ -32,7 +36,9 @@ public class ConfigCreate {
|
|||||||
Config.set("Plugin.Currency", "$", yamlConfiguration);
|
Config.set("Plugin.Currency", "$", yamlConfiguration);
|
||||||
Config.set("Plugin.DefaultGUI", "default", yamlConfiguration);
|
Config.set("Plugin.DefaultGUI", "default", yamlConfiguration);
|
||||||
|
|
||||||
Config.set("Storage.Type", "SQLITE", yamlConfiguration);
|
if (Main.legacy){
|
||||||
|
Config.set("Storage.Type", "YML", yamlConfiguration);
|
||||||
|
} else Config.set("Storage.Type", "SQLITE", yamlConfiguration);
|
||||||
Config.set("Storage.MySQL.IP", "localhost", yamlConfiguration);
|
Config.set("Storage.MySQL.IP", "localhost", yamlConfiguration);
|
||||||
Config.set("Storage.MySQL.Port", 3306, yamlConfiguration);
|
Config.set("Storage.MySQL.Port", 3306, yamlConfiguration);
|
||||||
Config.set("Storage.MySQL.Database", "database", yamlConfiguration);
|
Config.set("Storage.MySQL.Database", "database", yamlConfiguration);
|
||||||
@@ -99,14 +105,45 @@ public class ConfigCreate {
|
|||||||
Config.set("Advanced.UseItem.World.Protection.RemoveItemWhenItIsDisabled", false, yamlConfiguration);
|
Config.set("Advanced.UseItem.World.Protection.RemoveItemWhenItIsDisabled", false, yamlConfiguration);
|
||||||
Config.set("Advanced.UseItem.World.Protection.Mode", "blacklist", yamlConfiguration);
|
Config.set("Advanced.UseItem.World.Protection.Mode", "blacklist", yamlConfiguration);
|
||||||
Config.set("Advanced.UseItem.World.Protection.List", Arrays.asList("World1", "World2"), yamlConfiguration);
|
Config.set("Advanced.UseItem.World.Protection.List", Arrays.asList("World1", "World2"), yamlConfiguration);
|
||||||
|
/*
|
||||||
|
Config.set("Advanced.UseItem.ItemBlockBlacklist", Arrays.asList("CHEST", "TRAPPED_CHEST", "FURNACE", "NOTE_BLOCK",
|
||||||
|
"CRAFTING_TABLE", "ENDER_CHEST", "ANVIL", "LOOM", "COMPOSTER", "BARREL", "SMOKER",
|
||||||
|
"BLAST_FURNACE", "CARTOGRAPHY_TABLE", "FLETCHING_TABLE", "GRINDSTONE", "SMITHING_TABLE", "STONECUTTER",
|
||||||
|
"HOPPER", "DISPENSER", "DROPPER", "REPEATER", "COMPARATOR", "LEVER", "DAYLIGHT_DETECTOR",
|
||||||
|
"STONE_BUTTON", "OAK_BUTTON", "SPRUCE_BUTTON", "BIRCH_BUTTON", "JUNGLE_BUTTON", "ACACIA_BUTTON", "DARK_OAK_BUTTON", "CRIMSON_BUTTON",
|
||||||
|
"IRON_DOOR", "OAK_DOOR", "SPRUCE_DOOR", "BIRCH_DOOR", "JUNGLE_DOOR", "ACACIA_DOOR", "DARK_OAK_DOOR", "CRIMSON_DOOR", "WARPED_DOOR",
|
||||||
|
"OAK_FENCE", "SPRUCE_FENCE", "BIRCH_FENCE", "JUNGLE_FENCE", "ACACIA_FENCE", "DARK_OAK_FENCE", "CRIMSON_FENCE", "WARPED_FENCE", "NETHER_BRICK_FENCE"), yamlConfiguration);
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
if (!yamlConfiguration.contains("Advanced.UseItem.ItemBlockBlacklist")) {
|
||||||
|
List<String> materialList = Arrays.asList("BUTTON", "DOOR", "FENCE", "CHEST", "FURNACE", "NOTE_BLOCK", "CRAFTING_TABLE", "WORKBENCH",
|
||||||
|
"ANVIL", "LOOM", "COMPOSTER", "BARREL", "SMOKER", "BLAST_FURNACE", "CARTOGRAPHY_TABLE", "FLETCHING_TABLE", "GRINDSTONE",
|
||||||
|
"SMITHING_TABLE", "STONECUTTER", "HOPPER", "DISPENSER", "DROPPER", "REPEATER", "COMPARATOR", "LEVER", "DAYLIGHT_DETECTOR", "BREWING_STAND", "TRAPDOOR", "BEACON"
|
||||||
|
);
|
||||||
|
|
||||||
|
List<String> materialBlacklist = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Material material : Material.values()) {
|
||||||
|
for (String target : materialList) {
|
||||||
|
if (material.toString().contains(target)) materialBlacklist.add(material.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Config.set("Advanced.UseItem.ItemBlockBlacklist", materialBlacklist, yamlConfiguration);
|
||||||
|
}
|
||||||
|
|
||||||
Config.set("Toggle.Items.OnOrYes.Item.Base64.Enable", false, yamlConfiguration);
|
Config.set("Toggle.Items.OnOrYes.Item.Base64.Enable", false, yamlConfiguration);
|
||||||
Config.set("Toggle.Items.OnOrYes.Item.Base64.Base64Value", "", yamlConfiguration);
|
Config.set("Toggle.Items.OnOrYes.Item.Base64.Base64Value", "", yamlConfiguration);
|
||||||
Config.set("Toggle.Items.OnOrYes.Item.Material", ItemVersion.getGreenWool().getType().toString(), yamlConfiguration);
|
if (Main.legacy) {
|
||||||
|
Config.set("Toggle.Items.OnOrYes.Item.Material", "WOOL,5", yamlConfiguration);
|
||||||
|
} else Config.set("Toggle.Items.OnOrYes.Item.Material", ItemVersion.getGreenWool().getType().toString(), yamlConfiguration);
|
||||||
|
|
||||||
Config.set("Toggle.Items.OffOrNo.Item.Base64.Enable", false, yamlConfiguration);
|
Config.set("Toggle.Items.OffOrNo.Item.Base64.Enable", false, yamlConfiguration);
|
||||||
Config.set("Toggle.Items.OffOrNo.Item.Base64.Base64Value", "", yamlConfiguration);
|
Config.set("Toggle.Items.OffOrNo.Item.Base64.Base64Value", "", yamlConfiguration);
|
||||||
Config.set("Toggle.Items.OffOrNo.Item.Material", ItemVersion.getRedWool().getType().toString(), yamlConfiguration);
|
if (Main.legacy) {
|
||||||
|
Config.set("Toggle.Items.OffOrNo.Item.Material", "WOOL,14", yamlConfiguration);
|
||||||
|
} else Config.set("Toggle.Items.OffOrNo.Item.Material", ItemVersion.getRedWool().getType().toString(), yamlConfiguration);
|
||||||
|
|
||||||
Config.set("Toggle.Permission.Commands.True", "luckperms user [player] permission set [perm] true", yamlConfiguration);
|
Config.set("Toggle.Permission.Commands.True", "luckperms user [player] permission set [perm] true", yamlConfiguration);
|
||||||
Config.set("Toggle.Permission.Commands.False", "luckperms user [player] permission set [perm] false", yamlConfiguration);
|
Config.set("Toggle.Permission.Commands.False", "luckperms user [player] permission set [perm] false", yamlConfiguration);
|
||||||
|
@@ -4,8 +4,6 @@ import de.jatitv.commandguiv2.Spigot.Main;
|
|||||||
import de.jatitv.commandguiv2.Spigot.config.configConverter.ConfigConverterUnderV5;
|
import de.jatitv.commandguiv2.Spigot.config.configConverter.ConfigConverterUnderV5;
|
||||||
import de.jatitv.commandguiv2.Spigot.config.languages.SelectMessages;
|
import de.jatitv.commandguiv2.Spigot.config.languages.SelectMessages;
|
||||||
import de.jatitv.commandguiv2.Spigot.system.database.MySQL;
|
import de.jatitv.commandguiv2.Spigot.system.database.MySQL;
|
||||||
import de.jatitv.commandguiv2.Spigot.system.database.SelectDatabase;
|
|
||||||
import de.jatitv.commandguiv2.Spigot.system.database.StorageType;
|
|
||||||
import de.jatitv.commandguiv2.Util;
|
import de.jatitv.commandguiv2.Util;
|
||||||
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;
|
||||||
@@ -19,9 +17,6 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SelectConfig {
|
public class SelectConfig {
|
||||||
|
|
||||||
private static final File config = new File(Main.getPath(), "config.yml");
|
|
||||||
private static final YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
|
||||||
public static Boolean Debug;
|
public static Boolean Debug;
|
||||||
public static Boolean HelpAlias;
|
public static Boolean HelpAlias;
|
||||||
public static String language;
|
public static String language;
|
||||||
@@ -60,8 +55,9 @@ public class SelectConfig {
|
|||||||
public static Boolean UseItemWorldRemoveItemWhenItIsDisabled;
|
public static Boolean UseItemWorldRemoveItemWhenItIsDisabled;
|
||||||
public static String UseItemWorldMode;
|
public static String UseItemWorldMode;
|
||||||
public static List<String> UseItemWorldList;
|
public static List<String> UseItemWorldList;
|
||||||
|
public static List<String> UseItemItemBlockBlacklist;
|
||||||
|
|
||||||
public static Boolean disableInfoBySneak;
|
public static Boolean disableInfoBySneak = false;
|
||||||
|
|
||||||
public static Boolean UseItem_InventorySlot_FreeSlot;
|
public static Boolean UseItem_InventorySlot_FreeSlot;
|
||||||
public static Integer UseItem_InventorySlot;
|
public static Integer UseItem_InventorySlot;
|
||||||
@@ -117,6 +113,9 @@ public class SelectConfig {
|
|||||||
|
|
||||||
|
|
||||||
public static void onSelect() {
|
public static void onSelect() {
|
||||||
|
File config = new File(Main.getPath(), "config.yml");
|
||||||
|
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||||
|
|
||||||
if (yamlConfiguration.getInt("ConfigVersion") < Util.getConfigVersion() && new File(Main.getPath(), "config.yml").exists()) {
|
if (yamlConfiguration.getInt("ConfigVersion") < Util.getConfigVersion() && new File(Main.getPath(), "config.yml").exists()) {
|
||||||
send.console(Util.getPrefix() + " §4----------------------");
|
send.console(Util.getPrefix() + " §4----------------------");
|
||||||
send.console(Util.getPrefix() + " ");
|
send.console(Util.getPrefix() + " ");
|
||||||
@@ -189,10 +188,13 @@ public class SelectConfig {
|
|||||||
UseItemWorldMode = yamlConfiguration.getString("Advanced.UseItem.World.Protection.Mode");
|
UseItemWorldMode = yamlConfiguration.getString("Advanced.UseItem.World.Protection.Mode");
|
||||||
UseItemWorldList = yamlConfiguration.getStringList("Advanced.UseItem.World.Protection.List");
|
UseItemWorldList = yamlConfiguration.getStringList("Advanced.UseItem.World.Protection.List");
|
||||||
|
|
||||||
|
|
||||||
if (yamlConfiguration.get("Advanced.UseItem.DisableInfoBySneak") != null) {
|
if (yamlConfiguration.get("Advanced.UseItem.DisableInfoBySneak") != null) {
|
||||||
disableInfoBySneak = yamlConfiguration.getBoolean("Advanced.UseItem.DisableInfoBySneak");
|
disableInfoBySneak = yamlConfiguration.getBoolean("Advanced.UseItem.DisableInfoBySneak");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UseItemItemBlockBlacklist = yamlConfiguration.getStringList("Advanced.UseItem.ItemBlockBlacklist");
|
||||||
|
|
||||||
toggleItemOnOrYesBase64 = yamlConfiguration.getBoolean("Toggle.Items.OnOrYes.Item.Base64.Enable");
|
toggleItemOnOrYesBase64 = yamlConfiguration.getBoolean("Toggle.Items.OnOrYes.Item.Base64.Enable");
|
||||||
toggleItemOnOrYesBase64Value = yamlConfiguration.getString("Toggle.Items.OnOrYes.Item.Base64.Base64Value");
|
toggleItemOnOrYesBase64Value = yamlConfiguration.getString("Toggle.Items.OnOrYes.Item.Base64.Base64Value");
|
||||||
toggleItemOnOrYesMaterial = yamlConfiguration.getString("Toggle.Items.OnOrYes.Item.Material");
|
toggleItemOnOrYesMaterial = yamlConfiguration.getString("Toggle.Items.OnOrYes.Item.Material");
|
||||||
@@ -221,7 +223,6 @@ public class SelectConfig {
|
|||||||
Sound_Give_input = (yamlConfiguration.getString("Sound.Give.Sound").toUpperCase().replace(".", "_"));
|
Sound_Give_input = (yamlConfiguration.getString("Sound.Give.Sound").toUpperCase().replace(".", "_"));
|
||||||
Sound_PlayerNotFound_Enable = yamlConfiguration.getBoolean("Sound.PlayerNotFound.Enable");
|
Sound_PlayerNotFound_Enable = yamlConfiguration.getBoolean("Sound.PlayerNotFound.Enable");
|
||||||
Sound_PlayerNotFound_input = (yamlConfiguration.getString("Sound.PlayerNotFound.Sound").toUpperCase().replace(".", "_"));
|
Sound_PlayerNotFound_input = (yamlConfiguration.getString("Sound.PlayerNotFound.Sound").toUpperCase().replace(".", "_"));
|
||||||
setConfigVersion();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -345,7 +346,9 @@ public class SelectConfig {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setConfigVersion() {
|
public static void setConfigVersion() {
|
||||||
|
File config = new File(Main.getPath(), "config.yml");
|
||||||
|
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);
|
||||||
yamlConfiguration.set("ConfigVersion", Util.getConfigVersion());
|
yamlConfiguration.set("ConfigVersion", Util.getConfigVersion());
|
||||||
try {
|
try {
|
||||||
yamlConfiguration.save(config);
|
yamlConfiguration.save(config);
|
||||||
|
@@ -21,7 +21,7 @@ public class CreateFunctions {
|
|||||||
0, 0.0, Arrays.asList(), false, "");
|
0, 0.0, Arrays.asList(), false, "");
|
||||||
|
|
||||||
createFunction("SupportDiscord", false, 1, true, true, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg3M2MxMmJmZmI1MjUxYTBiODhkNWFlNzVjNzI0N2NiMzlhNzVmZjFhODFjYmU0YzhhMzliMzExZGRlZGEifX19",
|
createFunction("SupportDiscord", false, 1, true, true, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzg3M2MxMmJmZmI1MjUxYTBiODhkNWFlNzVjNzI0N2NiMzlhNzVmZjFhODFjYmU0YzhhMzliMzExZGRlZGEifX19",
|
||||||
false, "", (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) ? "TNT" : "",
|
false, "", "",
|
||||||
"&3Support Discord", Arrays.asList("&8-----------------", "&bIf you need help setting up the plugin,", "&bfeel free to contact me on the Suport Discord.",
|
"&3Support Discord", Arrays.asList("&8-----------------", "&bIf you need help setting up the plugin,", "&bfeel free to contact me on the Suport Discord.",
|
||||||
"&8-----------------", "&eIf you find any errors or bugs,", "&eplease contact me so I can fix them.", "&8-----------------", "&5Discord: §7http://dc.t2code.net"),
|
"&8-----------------", "&eIf you find any errors or bugs,", "&eplease contact me so I can fix them.", "&8-----------------", "&5Discord: §7http://dc.t2code.net"),
|
||||||
false, false, "", false, 0.0, false, false,
|
false, false, "", false, 0.0, false, false,
|
||||||
|
@@ -6,6 +6,8 @@ import de.jatitv.commandguiv2.Spigot.Main;
|
|||||||
import de.jatitv.commandguiv2.Spigot.objects.guis.Gui;
|
import de.jatitv.commandguiv2.Spigot.objects.guis.Gui;
|
||||||
import de.jatitv.commandguiv2.Spigot.objects.functions.Function;
|
import de.jatitv.commandguiv2.Spigot.objects.functions.Function;
|
||||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||||
|
import de.jatitv.commandguiv2.Spigot.system.Papi;
|
||||||
|
import de.jatitv.commandguiv2.Spigot.system.Placeholder;
|
||||||
import de.jatitv.commandguiv2.Util;
|
import de.jatitv.commandguiv2.Util;
|
||||||
import net.t2code.lib.Spigot.Lib.items.ItemVersion;
|
import net.t2code.lib.Spigot.Lib.items.ItemVersion;
|
||||||
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
import net.t2code.lib.Spigot.Lib.minecraftVersion.MCVersion;
|
||||||
@@ -25,7 +27,11 @@ public class GuiBuilder {
|
|||||||
private static String prefix = Util.getPrefix();
|
private static String prefix = Util.getPrefix();
|
||||||
|
|
||||||
protected static void item(Function function, Integer slot, Player player, Inventory inventory) {
|
protected static void item(Function function, Integer slot, Player player, Inventory inventory) {
|
||||||
ItemStack item = new ItemStack(Material.valueOf(function.item.toUpperCase().replace(".", "_")));
|
ItemStack item;
|
||||||
|
if (Main.legacy && function.item.toUpperCase().contains(",")) {
|
||||||
|
String[] split = function.item.toUpperCase().split(",");
|
||||||
|
item = new ItemStack(Material.valueOf(split[0]), 1, Short.parseShort(split[1]));
|
||||||
|
} else item = new ItemStack(Material.valueOf(function.item.toUpperCase().replace(".", "_")));
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
ItemMeta itemMeta = item.getItemMeta();
|
||||||
setDisplayNameAndLore(itemMeta, player, function);
|
setDisplayNameAndLore(itemMeta, player, function);
|
||||||
item.setItemMeta(itemMeta);
|
item.setItemMeta(itemMeta);
|
||||||
@@ -38,7 +44,11 @@ public class GuiBuilder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static void item(String material, Function function, Integer slot, Player player, Inventory inventory) {
|
protected static void item(String material, Function function, Integer slot, Player player, Inventory inventory) {
|
||||||
ItemStack item = new ItemStack(Material.valueOf(material));
|
ItemStack item;
|
||||||
|
if (Main.legacy && material.contains(",")) {
|
||||||
|
String[] split = material.split(",");
|
||||||
|
item = new ItemStack(Material.valueOf(split[0]), 1, Short.parseShort(split[1]));
|
||||||
|
} else item = new ItemStack(Material.valueOf(material));
|
||||||
ItemMeta itemMeta = item.getItemMeta();
|
ItemMeta itemMeta = item.getItemMeta();
|
||||||
setDisplayNameAndLore(itemMeta, player, function);
|
setDisplayNameAndLore(itemMeta, player, function);
|
||||||
item.setItemMeta(itemMeta);
|
item.setItemMeta(itemMeta);
|
||||||
@@ -53,11 +63,11 @@ public class GuiBuilder {
|
|||||||
|
|
||||||
private static void setDisplayNameAndLore(ItemMeta itemMeta, Player player, Function slot) {
|
private static void setDisplayNameAndLore(ItemMeta itemMeta, Player player, Function slot) {
|
||||||
if (Main.PaPi) {
|
if (Main.PaPi) {
|
||||||
itemMeta.setDisplayName(Replace.replace(prefix, player, slot.name.replace("[player]", player.getName())));
|
itemMeta.setDisplayName(Replace.replace(prefix, player, Placeholder.replace(slot.name, player)));
|
||||||
itemMeta.setLore(Replace.replacePrice(prefix, player, slot.lore, slot.price + " " + SelectConfig.Currency));
|
itemMeta.setLore(Replace.replacePrice(prefix, player, Placeholder.replace(slot.lore, player), slot.price + " " + SelectConfig.Currency));
|
||||||
} else {
|
} else {
|
||||||
itemMeta.setDisplayName(Replace.replace(prefix, slot.name.replace("[player]", player.getName())));
|
itemMeta.setDisplayName(Replace.replace(prefix, Placeholder.replace(slot.name,player)));
|
||||||
itemMeta.setLore(Replace.replacePrice(prefix, slot.lore, slot.price + " " + SelectConfig.Currency));
|
itemMeta.setLore(Replace.replacePrice(prefix, Placeholder.replace(slot.lore,player), slot.price + " " + SelectConfig.Currency));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +119,7 @@ public class GuiBuilder {
|
|||||||
public static void fillItem(Inventory inventory, Gui gui) {
|
public static void fillItem(Inventory inventory, Gui gui) {
|
||||||
ItemStack glass;
|
ItemStack glass;
|
||||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
||||||
glass = new ItemStack(Material.valueOf("STAINED_GLASS_PANE"), 1, Short.valueOf(gui.guiFillItemItem));
|
glass = new ItemStack(Material.valueOf("STAINED_GLASS_PANE"), 1, Short.parseShort(gui.guiFillItemItem));
|
||||||
} else glass = new ItemStack(Material.valueOf(gui.guiFillItemItem.toUpperCase().replace(".", "_")));
|
} else glass = new ItemStack(Material.valueOf(gui.guiFillItemItem.toUpperCase().replace(".", "_")));
|
||||||
ItemMeta itemMetaglass = glass.getItemMeta();
|
ItemMeta itemMetaglass = glass.getItemMeta();
|
||||||
itemMetaglass.setDisplayName(" ");
|
itemMetaglass.setDisplayName(" ");
|
||||||
|
@@ -95,20 +95,13 @@ public class OpenGUI {
|
|||||||
toggleOff(function, slot.slot, player, inventory);
|
toggleOff(function, slot.slot, player, inventory);
|
||||||
}
|
}
|
||||||
} else if (function.toggleUseItem) {
|
} else if (function.toggleUseItem) {
|
||||||
if (Events.useItemHashMap.get(player)) {
|
if (Events.useItemHashMap.get(player.getName())) {
|
||||||
toggleOn(function, slot.slot, player, inventory);
|
toggleOn(function, slot.slot, player, inventory);
|
||||||
} else {
|
} else {
|
||||||
toggleOff(function, slot.slot, player, inventory);
|
toggleOff(function, slot.slot, player, inventory);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (function.playerHead_Enable) {
|
if (function.playerHead_Enable) {
|
||||||
if (MCVersion.minecraft1_8 || MCVersion.minecraft1_9 || MCVersion.minecraft1_10 || MCVersion.minecraft1_11 || MCVersion.minecraft1_12) {
|
|
||||||
send.player(player, prefix + "§c Playerheads are only available from version §61.13§c! §7- §bGUI: §6" +
|
|
||||||
Replace.replace(prefix, gui.guiName).toString() + " §bSlot: §6" + (slot.slot + 1) + " §7- " + Replace.replace(prefix, function.name));
|
|
||||||
send.error(plugin, "Playerheads are only available from version 1.13!");
|
|
||||||
send.console(prefix + " §bGUI: §6" + Replace.replace(prefix, gui.guiName).toString() + " §bSlot: §6" +
|
|
||||||
(slot.slot + 1) + " §7- " + Replace.replace(prefix, function.name));
|
|
||||||
} else {
|
|
||||||
if (function.base64_Enable) {
|
if (function.base64_Enable) {
|
||||||
GuiBuilder.base64(function, slot.slot, player, inventory);
|
GuiBuilder.base64(function, slot.slot, player, inventory);
|
||||||
} else {
|
} else {
|
||||||
@@ -118,7 +111,6 @@ public class OpenGUI {
|
|||||||
GuiBuilder.playerHead(function, slot.slot, player, inventory, function.playerName);
|
GuiBuilder.playerHead(function, slot.slot, player, inventory, function.playerName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
GuiBuilder.item(function, slot.slot, player, inventory);
|
GuiBuilder.item(function, slot.slot, player, inventory);
|
||||||
}
|
}
|
||||||
|
@@ -69,6 +69,8 @@ public class Load {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SelectConfig.setConfigVersion();
|
||||||
|
|
||||||
if (SelectConfig.Bungee) {
|
if (SelectConfig.Bungee) {
|
||||||
if (!Bukkit.getMessenger().isOutgoingChannelRegistered(plugin, "cgui:bungee")) {
|
if (!Bukkit.getMessenger().isOutgoingChannelRegistered(plugin, "cgui:bungee")) {
|
||||||
send.debug(plugin, "registerOutgoingPluginChannel §ecgui:bungee");
|
send.debug(plugin, "registerOutgoingPluginChannel §ecgui:bungee");
|
||||||
@@ -81,7 +83,7 @@ public class Load {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (PluginCheck.papi()) {
|
if (PluginCheck.papi()) {
|
||||||
new Placeholder().register();
|
new Papi().register();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@@ -0,0 +1,56 @@
|
|||||||
|
// This claas was created by JaTiTV
|
||||||
|
|
||||||
|
package de.jatitv.commandguiv2.Spigot.system;
|
||||||
|
|
||||||
|
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||||
|
import de.jatitv.commandguiv2.Spigot.Main;
|
||||||
|
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||||
|
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class Papi extends PlaceholderExpansion {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getIdentifier() {
|
||||||
|
return "commandgui";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getAuthor() {
|
||||||
|
return Main.plugin.getDescription().getAuthors().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getVersion() {
|
||||||
|
return Main.plugin.getDescription().getVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canRegister() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean persist() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String onPlaceholderRequest(Player p, String params) {
|
||||||
|
if (params.contains("useitem_boolean")) {
|
||||||
|
Placeholder.useitem_boolean(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.contains("useitem")) {
|
||||||
|
Placeholder.useitem(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.contains("slot")) {
|
||||||
|
Placeholder.slot(p);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,56 +1,38 @@
|
|||||||
// This claas was created by JaTiTV
|
|
||||||
|
|
||||||
package de.jatitv.commandguiv2.Spigot.system;
|
package de.jatitv.commandguiv2.Spigot.system;
|
||||||
|
|
||||||
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
import de.jatitv.commandguiv2.Spigot.Listener.UseItem_Listener.Events;
|
||||||
import de.jatitv.commandguiv2.Spigot.Main;
|
|
||||||
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
import de.jatitv.commandguiv2.Spigot.config.config.SelectConfig;
|
||||||
import me.clip.placeholderapi.expansion.PlaceholderExpansion;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
public class Placeholder extends PlaceholderExpansion {
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Override
|
public class Placeholder {
|
||||||
public String getIdentifier() {
|
public static String useitem(Player p) {
|
||||||
return "commandgui";
|
if (Events.useItemHashMap.get(p.getName())) {
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getAuthor() {
|
|
||||||
return Main.plugin.getDescription().getAuthors().toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getVersion() {
|
|
||||||
return Main.plugin.getDescription().getVersion();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canRegister() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean persist() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String onPlaceholderRequest(Player p, String params) {
|
|
||||||
if (params.contains("useitem_boolean")) {
|
|
||||||
return Events.useItemHashMap.get(p).toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (params.contains("useitem")) {
|
|
||||||
if (Events.useItemHashMap.get(p)) {
|
|
||||||
return SelectConfig.placeholderTrue;
|
return SelectConfig.placeholderTrue;
|
||||||
} else return SelectConfig.placeholderFalse;
|
} else return SelectConfig.placeholderFalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.contains("slot")){
|
public static String useitem_boolean(Player p) {
|
||||||
return Events.useItemSlotHashMap.get(p).toString();
|
return Events.useItemHashMap.get(p.getName()).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
public static String slot(Player p) {
|
||||||
|
return Events.useItemSlotHashMap.get(p.getName()).toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String replace(String input, Player player) {
|
||||||
|
return input.replace("[player]", player.getName()).replace("%commandgui_useitem%", useitem(player))
|
||||||
|
.replace("%commandgui_useitem_boolean%", useitem_boolean(player)).replace("%commandgui_useitem_slot%", slot(player));
|
||||||
|
}
|
||||||
|
public static List<String> replace(List<String> input, Player player) {
|
||||||
|
ArrayList<String> rp = new ArrayList<String>();
|
||||||
|
|
||||||
|
for (String s : input) {
|
||||||
|
rp.add(s.replace("[player]", player.getName()).replace("%commandgui_useitem%", useitem(player))
|
||||||
|
.replace("%commandgui_useitem_boolean%", useitem_boolean(player)).replace("%commandgui_useitem_slot%", slot(player)));
|
||||||
|
}
|
||||||
|
return rp;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -29,11 +29,7 @@ public class UseItem {
|
|||||||
if (SelectConfig.UseItem_InventorySlotEnforce) {
|
if (SelectConfig.UseItem_InventorySlotEnforce) {
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
} else {
|
} else {
|
||||||
if (Events.useItemSlotHashMap.get(player) == null) {
|
slot = Events.useItemSlotHashMap.get(player.getName());
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
|
||||||
} else {
|
|
||||||
slot = Events.useItemSlotHashMap.get(player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (SelectConfig.UseItem_InventorySlot_FreeSlot) {
|
if (SelectConfig.UseItem_InventorySlot_FreeSlot) {
|
||||||
player.getInventory().addItem(itemStack(player));
|
player.getInventory().addItem(itemStack(player));
|
||||||
|
@@ -49,7 +49,7 @@ public class SelectDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setItemStatusTrue(Player player) {
|
public static void setItemStatusTrue(Player player) {
|
||||||
Events.useItemHashMap.replace(player, true);
|
Events.useItemHashMap.replace(player.getName(), true);
|
||||||
switch (Storage) {
|
switch (Storage) {
|
||||||
case MYSQL:
|
case MYSQL:
|
||||||
MySQL.query("INSERT INTO `gui-item` (`UUID`, `Name`) VALUES ('" + player.getUniqueId() + "', '" + player.getName()
|
MySQL.query("INSERT INTO `gui-item` (`UUID`, `Name`) VALUES ('" + player.getUniqueId() + "', '" + player.getName()
|
||||||
@@ -67,7 +67,7 @@ public class SelectDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void setItemStatusFalse(Player player) {
|
public static void setItemStatusFalse(Player player) {
|
||||||
Events.useItemHashMap.replace(player, false);
|
Events.useItemHashMap.replace(player.getName(), false);
|
||||||
switch (Storage) {
|
switch (Storage) {
|
||||||
case MYSQL:
|
case MYSQL:
|
||||||
MySQL.query("INSERT INTO `gui-item` (`UUID`, `Name`, `Status`) VALUES ('" + player.getUniqueId() + "', '" + player.getName()
|
MySQL.query("INSERT INTO `gui-item` (`UUID`, `Name`, `Status`) VALUES ('" + player.getUniqueId() + "', '" + player.getName()
|
||||||
|
@@ -2,7 +2,7 @@ package de.jatitv.commandguiv2;
|
|||||||
|
|
||||||
public class Util {
|
public class Util {
|
||||||
private static Integer configVersion = 5;
|
private static Integer configVersion = 5;
|
||||||
private static double requiredT2CodeLibVersion = 10.3;
|
private static double requiredT2CodeLibVersion = 11.8;
|
||||||
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;
|
||||||
|
@@ -44,11 +44,11 @@ public class CGuiAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean selectPlayerItemEnable(Player player) {
|
public static Boolean selectPlayerItemEnable(Player player) {
|
||||||
return Events.useItemHashMap.get(player);
|
return Events.useItemHashMap.get(player.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Integer selectPlayerItemSlot(Player player) {
|
public static Integer selectPlayerItemSlot(Player player) {
|
||||||
return Events.useItemSlotHashMap.get(player);
|
return Events.useItemSlotHashMap.get(player.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPlayerItemEnable(Player player, Boolean value) {
|
public static void setPlayerItemEnable(Player player, Boolean value) {
|
||||||
|
@@ -1,19 +1,8 @@
|
|||||||
GUI:
|
|
||||||
Enable: true
|
|
||||||
Lines: 1
|
|
||||||
Name: '&5default &9GUI'
|
|
||||||
FillItem:
|
|
||||||
Enable: true
|
|
||||||
Item: BLACK_STAINED_GLASS_PANE
|
|
||||||
Command:
|
|
||||||
Alias: true
|
|
||||||
Permission:
|
|
||||||
Required: true
|
|
||||||
Slots:
|
Slots:
|
||||||
Example:
|
Function:
|
||||||
Slot: 5
|
|
||||||
Enable: true
|
|
||||||
Item:
|
Item:
|
||||||
|
Empty: false
|
||||||
|
Amount: 1
|
||||||
PlayerHead:
|
PlayerHead:
|
||||||
Enable: true
|
Enable: true
|
||||||
Base64:
|
Base64:
|
||||||
@@ -31,9 +20,10 @@ Slots:
|
|||||||
- '&eIf you find any errors or bugs,'
|
- '&eIf you find any errors or bugs,'
|
||||||
- '&eplease contact me so I can fix them.'
|
- '&eplease contact me so I can fix them.'
|
||||||
- '&8-----------------'
|
- '&8-----------------'
|
||||||
- '&5Discord: §7https://discord.gg/vRyXFFterJ'
|
- '&5Discord: §7http://dc.t2code.net'
|
||||||
CustomSound:
|
CustomSound:
|
||||||
Enable: false
|
Enable: false
|
||||||
|
NoSound: false
|
||||||
Sound: ''
|
Sound: ''
|
||||||
Cost:
|
Cost:
|
||||||
Enable: false
|
Enable: false
|
||||||
@@ -42,17 +32,43 @@ Slots:
|
|||||||
Enable: false
|
Enable: false
|
||||||
BungeeCommand: false
|
BungeeCommand: false
|
||||||
CommandAsConsole: false
|
CommandAsConsole: false
|
||||||
Command:
|
Command: []
|
||||||
- ''
|
|
||||||
ServerChange:
|
ServerChange:
|
||||||
Enable: false
|
Enable: false
|
||||||
Server: ''
|
Server: ''
|
||||||
OpenGUI:
|
OpenGUI:
|
||||||
Enable: false
|
Enable: false
|
||||||
GUI: ''
|
GUI: ''
|
||||||
|
Toggle:
|
||||||
|
Permission:
|
||||||
|
Enable: false
|
||||||
|
Permission: ''
|
||||||
|
UseItem:
|
||||||
|
Enable: false
|
||||||
Message:
|
Message:
|
||||||
Enable: true
|
Enable: true
|
||||||
Message:
|
Message:
|
||||||
- '&6You can find more information on Discord: &ehttps://discord.gg/vRyXFFterJ'
|
- '&6You can find more information on Discord: &ehttp://dc.t2code.net'
|
||||||
Permission:
|
SetConfig:
|
||||||
Required: false
|
Enable: false
|
||||||
|
File:
|
||||||
|
Path: ''
|
||||||
|
Option:
|
||||||
|
Path: ''
|
||||||
|
Premat: String
|
||||||
|
Value:
|
||||||
|
LeftClick:
|
||||||
|
String: ''
|
||||||
|
Boolean: false
|
||||||
|
Integer: 0
|
||||||
|
Double: 0.0
|
||||||
|
List: []
|
||||||
|
RightClick:
|
||||||
|
String: ''
|
||||||
|
Boolean: false
|
||||||
|
Integer: 0
|
||||||
|
Double: 0.0
|
||||||
|
List: []
|
||||||
|
PluginReload:
|
||||||
|
Enable: false
|
||||||
|
Command: ''
|
67
Defaultconfig/Functions/UseItem.yml
Normal file
67
Defaultconfig/Functions/UseItem.yml
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
Slots:
|
||||||
|
Function:
|
||||||
|
Item:
|
||||||
|
Empty: false
|
||||||
|
Amount: 1
|
||||||
|
PlayerHead:
|
||||||
|
Enable: false
|
||||||
|
Base64:
|
||||||
|
Enable: false
|
||||||
|
Base64Value: ''
|
||||||
|
PlayerWhoHasOpenedTheGUI: false
|
||||||
|
PlayerName: ''
|
||||||
|
Material: ''
|
||||||
|
Name: '&6Toggle UseItem'
|
||||||
|
Lore:
|
||||||
|
- '&bYou currently have the UseItem set to: %commandgui_useitem%'
|
||||||
|
CustomSound:
|
||||||
|
Enable: false
|
||||||
|
NoSound: false
|
||||||
|
Sound: ''
|
||||||
|
Cost:
|
||||||
|
Enable: false
|
||||||
|
Price: 0.0
|
||||||
|
Command:
|
||||||
|
Enable: false
|
||||||
|
BungeeCommand: false
|
||||||
|
CommandAsConsole: false
|
||||||
|
Command: []
|
||||||
|
ServerChange:
|
||||||
|
Enable: false
|
||||||
|
Server: ''
|
||||||
|
OpenGUI:
|
||||||
|
Enable: false
|
||||||
|
GUI: ''
|
||||||
|
Toggle:
|
||||||
|
Permission:
|
||||||
|
Enable: false
|
||||||
|
Permission: ''
|
||||||
|
UseItem:
|
||||||
|
Enable: true
|
||||||
|
Message:
|
||||||
|
Enable: true
|
||||||
|
Message:
|
||||||
|
- '&bYour UseItem was set to: %commandgui_useitem%&b.'
|
||||||
|
SetConfig:
|
||||||
|
Enable: false
|
||||||
|
File:
|
||||||
|
Path: ''
|
||||||
|
Option:
|
||||||
|
Path: ''
|
||||||
|
Premat: String
|
||||||
|
Value:
|
||||||
|
LeftClick:
|
||||||
|
String: ''
|
||||||
|
Boolean: false
|
||||||
|
Integer: 0
|
||||||
|
Double: 0.0
|
||||||
|
List: []
|
||||||
|
RightClick:
|
||||||
|
String: ''
|
||||||
|
Boolean: false
|
||||||
|
Integer: 0
|
||||||
|
Double: 0.0
|
||||||
|
List: []
|
||||||
|
PluginReload:
|
||||||
|
Enable: false
|
||||||
|
Command: ''
|
28
Defaultconfig/GUIs/default.yml
Normal file
28
Defaultconfig/GUIs/default.yml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
GUI:
|
||||||
|
Enable: true
|
||||||
|
Lines: 1
|
||||||
|
Name: '&5default &9GUI'
|
||||||
|
FillItem:
|
||||||
|
Enable: true
|
||||||
|
Item: BLACK_STAINED_GLASS_PANE
|
||||||
|
Command:
|
||||||
|
Alias: true
|
||||||
|
Permission:
|
||||||
|
Required: true
|
||||||
|
Slots:
|
||||||
|
SupportDiscord:
|
||||||
|
Slot: 4
|
||||||
|
Enable: true
|
||||||
|
Function: SupportDiscord
|
||||||
|
Permission:
|
||||||
|
Required: false
|
||||||
|
See: commandgui.gui.[guiname].slot.[slot].see
|
||||||
|
Use: commandgui.gui.[guiname].slot.[slot].use
|
||||||
|
UseItem:
|
||||||
|
Slot: 6
|
||||||
|
Enable: true
|
||||||
|
Function: UseItem
|
||||||
|
Permission:
|
||||||
|
Required: false
|
||||||
|
See: commandgui.gui.[guiname].slot.[slot].see
|
||||||
|
Use: commandgui.gui.[guiname].slot.[slot].use
|
@@ -1,3 +1,4 @@
|
|||||||
|
ConfigVersion: 5
|
||||||
Plugin:
|
Plugin:
|
||||||
UpdateCheckOnJoin: true
|
UpdateCheckOnJoin: true
|
||||||
Debug: false
|
Debug: false
|
||||||
@@ -25,6 +26,7 @@ UseItem:
|
|||||||
OpenGUI: default
|
OpenGUI: default
|
||||||
Permission:
|
Permission:
|
||||||
NeededToUse: true
|
NeededToUse: true
|
||||||
|
KeepAtCommandClear: true
|
||||||
InventorySlot:
|
InventorySlot:
|
||||||
Slot: 1
|
Slot: 1
|
||||||
SlotEnforce: false
|
SlotEnforce: false
|
||||||
@@ -46,9 +48,57 @@ UseItem:
|
|||||||
GiveOnlyOnFirstJoin: false
|
GiveOnlyOnFirstJoin: false
|
||||||
Cursor:
|
Cursor:
|
||||||
ToGUIItem:
|
ToGUIItem:
|
||||||
OnEveryLogin: true
|
OnLogin:
|
||||||
|
Enable: true
|
||||||
|
Spigot:
|
||||||
OnOnlyFirstLogin: true
|
OnOnlyFirstLogin: true
|
||||||
EXPERIMENTELL_ServerChhange: false
|
Bungee:
|
||||||
|
OnServerChange: false
|
||||||
|
Advanced:
|
||||||
|
UseItem:
|
||||||
|
GameMode:
|
||||||
|
Change:
|
||||||
|
Enable: true
|
||||||
|
DelayInTicks: 1
|
||||||
|
Protection:
|
||||||
|
Enable: false
|
||||||
|
RemoveItemWhenItIsDisabled: false
|
||||||
|
Mode: blacklist
|
||||||
|
List:
|
||||||
|
- CREATIVE
|
||||||
|
- Spectator
|
||||||
|
World:
|
||||||
|
Change:
|
||||||
|
Enable: true
|
||||||
|
DelayInTicks: 1
|
||||||
|
Protection:
|
||||||
|
Enable: false
|
||||||
|
RemoveItemWhenItIsDisabled: false
|
||||||
|
Mode: blacklist
|
||||||
|
List:
|
||||||
|
- World1
|
||||||
|
- World2
|
||||||
|
Toggle:
|
||||||
|
Items:
|
||||||
|
OnOrYes:
|
||||||
|
Item:
|
||||||
|
Base64:
|
||||||
|
Enable: false
|
||||||
|
Base64Value: ''
|
||||||
|
Material: GREEN_WOOL
|
||||||
|
OffOrNo:
|
||||||
|
Item:
|
||||||
|
Base64:
|
||||||
|
Enable: false
|
||||||
|
Base64Value: ''
|
||||||
|
Material: RED_WOOL
|
||||||
|
Permission:
|
||||||
|
Commands:
|
||||||
|
'True': luckperms user [player] permission set [perm] true
|
||||||
|
'False': luckperms user [player] permission set [perm] false
|
||||||
|
Placeholder:
|
||||||
|
'True': '&2true'
|
||||||
|
'False': '&4false'
|
||||||
Sound:
|
Sound:
|
||||||
Enable: true
|
Enable: true
|
||||||
OpenInventory:
|
OpenInventory:
|
@@ -4,13 +4,11 @@ Plugin:
|
|||||||
settings.'
|
settings.'
|
||||||
OnlyForPlayer: '[prefix] &cThis command is for players only!'
|
OnlyForPlayer: '[prefix] &cThis command is for players only!'
|
||||||
DefaultGUI:
|
DefaultGUI:
|
||||||
create: '[prefix] &2DefaultGUI was created. You can find it in the directory::
|
create: '[prefix] &2DefaultGUI was created. You can find it in the directory:
|
||||||
&e[directory]&2!'
|
&e[directory]&2!'
|
||||||
Reload:
|
Reload:
|
||||||
Start: '[prefix] &6Plugin is reloaded...'
|
Start: '[prefix] &6Plugin is reloaded...'
|
||||||
End: '[prefix] &2Plugin was successfully reloaded.'
|
End: '[prefix] &2Plugin was successfully reloaded.'
|
||||||
Warning: '[prefix] &6To enable / disable alias commands, reload / restart the
|
|
||||||
server!'
|
|
||||||
NoPermission:
|
NoPermission:
|
||||||
ForCommandGUI: '[prefix] &cYou do not have permission for &4Command&9GUI&c!'
|
ForCommandGUI: '[prefix] &cYou do not have permission for &4Command&9GUI&c!'
|
||||||
ForCommand: '[prefix] &cFor &b[cmd] &cyou lack the permission &6[perm]&c!'
|
ForCommand: '[prefix] &cFor &b[cmd] &cyou lack the permission &6[perm]&c!'
|
||||||
@@ -24,6 +22,8 @@ UseItem:
|
|||||||
SlotNotEmpty: '[prefix] &6The slot &e[slot] &6is currently occupied!'
|
SlotNotEmpty: '[prefix] &6The slot &e[slot] &6is currently occupied!'
|
||||||
SlotAlreadySet: '[prefix] &6The slot §e[slot] §6is already set!'
|
SlotAlreadySet: '[prefix] &6The slot §e[slot] §6is already set!'
|
||||||
ItemSlot_wrongValue: '[prefix] &cThe specified slot must be between 1 and 9!'
|
ItemSlot_wrongValue: '[prefix] &cThe specified slot must be between 1 and 9!'
|
||||||
|
DisabledInGameMode: '[prefix] &cThe UseItem is disabled in this GameMode!'
|
||||||
|
DisabledInWorld: '[prefix] &cThe UseItem is disabled in this World!'
|
||||||
Cost:
|
Cost:
|
||||||
Buy_msg: '[prefix] &2You bought [itemname] &2for &6[price]&2.'
|
Buy_msg: '[prefix] &2You bought [itemname] &2for &6[price]&2.'
|
||||||
No_money: '[prefix] &cYou don''t have enough money!'
|
No_money: '[prefix] &cYou don''t have enough money!'
|
||||||
@@ -42,7 +42,8 @@ Player:
|
|||||||
Help:
|
Help:
|
||||||
CGUI: '&8''''&b/commandgui &8| &b/cgui&8'''' &eOpen the default GUI &7(&r[gui]&7)&e.'
|
CGUI: '&8''''&b/commandgui &8| &b/cgui&8'''' &eOpen the default GUI &7(&r[gui]&7)&e.'
|
||||||
Help: '&8''''&b/commandguihelp&8'''' &eOpen this help.'
|
Help: '&8''''&b/commandguihelp&8'''' &eOpen this help.'
|
||||||
Info: '&8''''&b/commandguiadmin info&8'''' &eCall the info from &4Command&9GUI &e.'
|
Info: '&8''''&b/commandgui admin info&8'''' &eCall the info from &4Command&9GUI
|
||||||
|
&e.'
|
||||||
Open: '&8''''&b/commandgui [gui]&8'''' &eOpen the GUI: &6[guiname]&e.'
|
Open: '&8''''&b/commandgui [gui]&8'''' &eOpen the GUI: &6[guiname]&e.'
|
||||||
Give: '&8''''&b/commandgui admin give &7<player>&8'''' &eGive a player the GUI item.'
|
Give: '&8''''&b/commandgui admin give &7<player>&8'''' &eGive a player the GUI item.'
|
||||||
CreateDefaultGUI: '&8''''&b/commandgui admin createdefaultgui&8'''' &eCreate a default
|
CreateDefaultGUI: '&8''''&b/commandgui admin createdefaultgui&8'''' &eCreate a default
|
@@ -8,8 +8,6 @@ Plugin:
|
|||||||
Reload:
|
Reload:
|
||||||
Start: '[prefix] &6Plugin wird neu geladen...'
|
Start: '[prefix] &6Plugin wird neu geladen...'
|
||||||
End: '[prefix] &2Plugin wurde erfolgreich neu geladen.'
|
End: '[prefix] &2Plugin wurde erfolgreich neu geladen.'
|
||||||
Warning: '[prefix] &6Um Alias-Befehle zu aktivieren / deaktivieren, lade / starte
|
|
||||||
den Server neu!!'
|
|
||||||
NoPermission:
|
NoPermission:
|
||||||
ForCommandGUI: '[prefix] &cDu hast keine Permission f[ue]r &4Command&9GUI&c!'
|
ForCommandGUI: '[prefix] &cDu hast keine Permission f[ue]r &4Command&9GUI&c!'
|
||||||
ForCommand: '[prefix] &cF[ue]r &b[cmd] &cfehlt dir die Permission &6[perm]&c!'
|
ForCommand: '[prefix] &cF[ue]r &b[cmd] &cfehlt dir die Permission &6[perm]&c!'
|
||||||
@@ -24,6 +22,8 @@ UseItem:
|
|||||||
SlotAlreadySet: '[prefix] &6Der Slot §e[slot] §6ist bereits eingestellt!'
|
SlotAlreadySet: '[prefix] &6Der Slot §e[slot] §6ist bereits eingestellt!'
|
||||||
ItemSlot_wrongValue: '[prefix] &cDer angegebene Slot muss sich zwischen 1 und 9
|
ItemSlot_wrongValue: '[prefix] &cDer angegebene Slot muss sich zwischen 1 und 9
|
||||||
befinden!'
|
befinden!'
|
||||||
|
DisabledInGameMode: '[prefix] &cDas UseItem ist in diesem GameMode deaktiviert!'
|
||||||
|
DisabledInWorld: '[prefix] &cDas UseItem ist in dieser Welt deaktiviert!'
|
||||||
Cost:
|
Cost:
|
||||||
Buy_msg: '[prefix] &2Du hast dir [itemname] &2f[ue]r &6[price] &2gekauft.'
|
Buy_msg: '[prefix] &2Du hast dir [itemname] &2f[ue]r &6[price] &2gekauft.'
|
||||||
No_money: '[prefix] &cDu hast nicht gen[ue]gend Geld!'
|
No_money: '[prefix] &cDu hast nicht gen[ue]gend Geld!'
|
||||||
@@ -44,9 +44,11 @@ Player:
|
|||||||
Help:
|
Help:
|
||||||
CGUI: '&8''''&b/commandgui &8| &b/cgui&8'''' &e[OE]ffne die default GUI &7(&r[gui]&7)&e.'
|
CGUI: '&8''''&b/commandgui &8| &b/cgui&8'''' &e[OE]ffne die default GUI &7(&r[gui]&7)&e.'
|
||||||
Help: '&8''''&b/commandguihelp&8'''' &e[OE]ffne diese help.'
|
Help: '&8''''&b/commandguihelp&8'''' &e[OE]ffne diese help.'
|
||||||
Info: '&8''''&b/commandguiadmin info&8'''' &eRufe die Infos von &4Command&9GUI &eauf.'
|
Info: '&8''''&b/commandgui admin info&8'''' &eRufe die Infos von &4Command&9GUI
|
||||||
|
&eauf.'
|
||||||
Open: '&8''''&b/commandgui [gui]&8'''' &e[OE]ffne die GUI: &6[guiname]&e.'
|
Open: '&8''''&b/commandgui [gui]&8'''' &e[OE]ffne die GUI: &6[guiname]&e.'
|
||||||
Give: '&8''''&b/commandguiadmin give &7<player>&8'''' &eGebe einem Spieler das GUI-Item.'
|
Give: '&8''''&b/commandgui admin give &7<player>&8'''' &eGebe einem Spieler das
|
||||||
|
GUI-Item.'
|
||||||
CreateDefaultGUI: '&8''''&b/commandgui admin createdefaultgui&8'''' &eLasse eine
|
CreateDefaultGUI: '&8''''&b/commandgui admin createdefaultgui&8'''' &eLasse eine
|
||||||
default GUI erstellen &7([directory])&e.'
|
default GUI erstellen &7([directory])&e.'
|
||||||
Reload: '&8''''&b/commandgui admin reload&8'''' &eLade das Plugin neu.'
|
Reload: '&8''''&b/commandgui admin reload&8'''' &eLade das Plugin neu.'
|
@@ -8,8 +8,6 @@ Plugin:
|
|||||||
Reload:
|
Reload:
|
||||||
Start: '[prefix] &6Pluginet blir relastet...'
|
Start: '[prefix] &6Pluginet blir relastet...'
|
||||||
End: '[prefix] &2Pluginet har blitt lastet inn på nytt.'
|
End: '[prefix] &2Pluginet har blitt lastet inn på nytt.'
|
||||||
Warning: '[prefix] &6For å skru på / skru av alias kommandoer, relast / restart
|
|
||||||
serveren!'
|
|
||||||
NoPermission:
|
NoPermission:
|
||||||
ForCommandGUI: '[prefix] &cDu har ikke tilgang til &4Command&9GUI&c!'
|
ForCommandGUI: '[prefix] &cDu har ikke tilgang til &4Command&9GUI&c!'
|
||||||
ForCommand: '[prefix] &cFor &b[cmd] &cmangler du tillatelsen &6[perm]&c!'
|
ForCommand: '[prefix] &cFor &b[cmd] &cmangler du tillatelsen &6[perm]&c!'
|
||||||
@@ -23,6 +21,8 @@ UseItem:
|
|||||||
SlotNotEmpty: '[prefix] &6Plassen &e[slot] &6er opptatt for øyeblikket!'
|
SlotNotEmpty: '[prefix] &6Plassen &e[slot] &6er opptatt for øyeblikket!'
|
||||||
SlotAlreadySet: '[prefix] &6Plassen §e[slot] §6er allerede satt!'
|
SlotAlreadySet: '[prefix] &6Plassen §e[slot] §6er allerede satt!'
|
||||||
ItemSlot_wrongValue: '[prefix] &cDen spesifiserte plassen må være mellom 1 og 9!'
|
ItemSlot_wrongValue: '[prefix] &cDen spesifiserte plassen må være mellom 1 og 9!'
|
||||||
|
DisabledInGameMode: '[prefix] &cBrukselementet er deaktivert i denne spillmodusen!!'
|
||||||
|
DisabledInWorld: '[prefix] &cUseItem er deaktivert i denne verden!'
|
||||||
Cost:
|
Cost:
|
||||||
Buy_msg: '[prefix] &2Du kjøpte [itemname] &2for &6[price]&2.'
|
Buy_msg: '[prefix] &2Du kjøpte [itemname] &2for &6[price]&2.'
|
||||||
No_money: '[prefix] &cDu har ikke nok penger!'
|
No_money: '[prefix] &cDu har ikke nok penger!'
|
Reference in New Issue
Block a user