Add SQLITE & Bugfix
Add: SQLITE as storage medium Change: The MYSQL connection has been slightly optimized Fix: The command 'gui-item slot <number>' dat not set the item to the right place?
This commit is contained in:
@@ -186,7 +186,7 @@ public class Commands {
|
||||
send.player(player, SelectMessages.ItemSlot_wrongValue);
|
||||
return;
|
||||
}
|
||||
ItemStack itm1 = player.getInventory().getItem(setSlot - 1);
|
||||
ItemStack itm1 = player.getInventory().getItem(setSlot + 1);
|
||||
if (itm1 != null) {
|
||||
if (itm1.getType() == Material.valueOf(SelectConfig.UseItem_Material) || itm1.getType() == ItemVersion.getHead()) {
|
||||
if (itm1.getItemMeta().getDisplayName().equals(SelectConfig.UseItem_Name)) {
|
||||
@@ -212,6 +212,7 @@ public class Commands {
|
||||
}
|
||||
}
|
||||
Select_Database.setSlot(player, setSlot);
|
||||
Events.useItemSlotHashMap.replace(player,setSlot);
|
||||
if (Events.useItemHashMap.get(player)) {
|
||||
Give_UseItem.onGive(player);
|
||||
}
|
||||
@@ -224,7 +225,7 @@ public class Commands {
|
||||
Gui gui = Main.guiHashMap.get(SelectConfig.DefaultGUI);
|
||||
if (gui.GUI_Enable || player.hasPermission("commandgui.bypass")) {
|
||||
if (!gui.Command_Permission_Enable || player.hasPermission("commandgui.command") || player.hasPermission("commandgui.bypass")) {
|
||||
OpenGUI.openGUI(player, SelectConfig.DefaultGUI);
|
||||
OpenGUI.openGUI(player, SelectConfig.DefaultGUI, true);
|
||||
} else player.sendMessage(SelectMessages.NoPermissionForCommand.replace("[cmd]", "/commandgui")
|
||||
.replace("[perm]", "commandgui.command"));
|
||||
} else player.sendMessage(SelectMessages.GUIIsDisabled.replace("[gui]", gui.GUI_Name));
|
||||
@@ -236,7 +237,7 @@ public class Commands {
|
||||
Gui gui = Main.guiHashMap.get(arg);
|
||||
if (gui.GUI_Enable || player.hasPermission("commandgui.bypass")) {
|
||||
if (!gui.Command_Permission_Enable || player.hasPermission("commandgui.command." + gui.Command_Command) || player.hasPermission("commandgui.bypass")) {
|
||||
OpenGUI.openGUI(player, arg);
|
||||
OpenGUI.openGUI(player, arg, true);
|
||||
} else player.sendMessage(SelectMessages.NoPermissionForCommand.replace("[cmd]", "/commandgui " + gui.Command_Command)
|
||||
.replace("[perm]", "commandgui.command." + arg.toLowerCase()));
|
||||
} else player.sendMessage(SelectMessages.GUIIsDisabled.replace("[gui]", gui.Command_Command));
|
||||
|
@@ -26,7 +26,7 @@ public class RegisterCommand extends Command {
|
||||
Gui gui = Main.guiHashMap.get(alias);
|
||||
if (gui.GUI_Enable || player.hasPermission("commandgui.bypass")) {
|
||||
if (!gui.Command_Permission_Enable || player.hasPermission("commandgui.command." + alias) || player.hasPermission("commandgui.bypass")) {
|
||||
OpenGUI.openGUI(player, alias);
|
||||
OpenGUI.openGUI(player, alias, true);
|
||||
} else player.sendMessage(SelectMessages.NoPermissionForCommand.replace("[cmd]", "/commandgui " + alias)
|
||||
.replace("[perm]", "commandgui.command." + alias));
|
||||
} else player.sendMessage(SelectMessages.GUIIsDisabled.replace("[gui]", gui.GUI_Name));
|
||||
|
Reference in New Issue
Block a user