8 Commits

Author SHA1 Message Date
8fd5ac7c80 Update pom.xml 2021-12-31 04:28:30 +01:00
0aefd0eb64 Merge pull request '2.5.16' (#1) from 2.5.16_DEV into main
Reviewed-on: JaTiTV/CommandGUI#1
2021-12-31 04:24:41 +01:00
7b0d8952ec add ISSUE_TEMPLATE 2021-12-31 04:19:00 +01:00
5d8188b684 Added more subcommands for '/cgui admin info' 2021-12-31 04:17:11 +01:00
b5553c770d 2.5.16_Snapshot_1 2021-12-29 06:57:11 +01:00
f734748df8 Message added to the '/gui-item' command if this function is disabled 2021-12-29 06:55:36 +01:00
a80d0d3e43 Remove Debugmessages 2021-12-29 06:54:30 +01:00
6c53d936a0 clean code 2021-12-29 06:47:33 +01:00
8 changed files with 91 additions and 8 deletions

View File

@@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels:
- "bug report"
---
**Description of issue:**
---
**Plugin Version (using`/cgui admin info`):**
**Server Type (Spigot/Paperspigot/etc):**
**Server Version (using `/ver`):**
**Relevant plugins (Delete if this isn't needed):**
---
**ERROR (DELETE IF YOU HAVE NO ERROR):**
```
######################
## REPLACE WITH ERROR ##
######################
```
**CONFIG SECTION (DELETE IF NOT RELEVANT):**
```
#######################################
## REPLACE WITH RELEVANT CONFIG SECTION ##
#######################################
```

View File

@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea/improvement
title: ''
labels:
- " feature request"
---
**Description of feature request:**
---
**Plugin Version (using`/cgui admin info`):**
**Server Type (Spigot/Paperspigot/etc):**
**Server Version (using `/ver`):**
**Relevant plugins (Delete if this isn't needed):**

View File

@@ -0,0 +1,22 @@
---
name: Question
about: Ask a question or get advice
title: ''
labels: question
assignees: ''
---
**Share your question here:**
---
**Plugin Version (using`/cgui admin info`):**
**Server Type (Spigot/Paperspigot/etc):**
**Server Version (using `/ver`):**
**Relevant plugins (Delete if this isn't needed):**
---

View File

@@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId>
<version>2.5.15</version>
<version>2.5.16</version>
<packaging>jar</packaging>
<name>CommandGUI</name>

View File

@@ -60,9 +60,7 @@ public class ItemChange {
}
}
if (!SelectConfig.UseItem_AllowToggle || Select_Database.selectItemStatus(player)) {
send.debugmsg(Main.plugin, "1");
if (SelectConfig.UseItem_InventorySlotEnforce || player.getInventory().getItem(slot - 1) == null) {
send.debugmsg(Main.plugin, "2");
Give_UseItem.onGive(player);
if (SelectConfig.Cursor_ToGUIItem_OnLogin) {
if (SelectConfig.Cursor_ToGUIItem_OnlyOnFirstLogin) {

View File

@@ -38,7 +38,6 @@ public class Obj_Select {
GUI_FillItem_Item = yamlConfiguration_gui.getString("GUI.FillItem.GlassPaneCollor");
} else GUI_FillItem_Item = yamlConfiguration_gui.getString("GUI.FillItem.Item");
Boolean Command_Alias_Enable = yamlConfiguration_gui.getBoolean("Command.Alias");
Boolean Command_Permission = yamlConfiguration_gui.getBoolean("Command.Permission.Required");
@@ -46,7 +45,7 @@ public class Obj_Select {
for (String key : yamlConfiguration_gui.getConfigurationSection("Slots").getKeys(false)) {
Slot slot = new Slot(yamlConfiguration_gui.getInt("Slots." + key + ".Slot") - 1,
yamlConfiguration_gui.getBoolean("Slots." + key + ".Enable"),
// yamlConfiguration_gui.getBoolean("Slots." + key + ".Item.Removable"),
// yamlConfiguration_gui.getBoolean("Slots." + key + ".Item.Removable"),
yamlConfiguration_gui.getBoolean("Slots." + key + ".Item.Empty"),
yamlConfiguration_gui.getInt("Slots." + key + ".Item.Amount"),
yamlConfiguration_gui.getBoolean("Slots." + key + ".Item.PlayerHead.Enable"),
@@ -77,7 +76,7 @@ public class Obj_Select {
yamlConfiguration_gui.getString("Slots." + key + ".SetConfig.File.Path"),
yamlConfiguration_gui.getString("Slots." + key + ".SetConfig.Option.Path"),
yamlConfiguration_gui.getString("Slots." + key + ".SetConfig.Option.Premat"),
// yamlConfiguration_gui.getBoolean("Slots." + key + ".SetConfig.Value.ChatInput"),
// yamlConfiguration_gui.getBoolean("Slots." + key + ".SetConfig.Value.ChatInput"),
yamlConfiguration_gui.getString("Slots." + key + ".SetConfig.Value.LeftClick.String"),
yamlConfiguration_gui.getBoolean("Slots." + key + ".SetConfig.Value.LeftClick.Boolean"),

View File

@@ -39,6 +39,10 @@ public class CmdExecuter_GUI implements CommandExecutor, TabCompleter {
switch (args[1].toLowerCase()) {
case "info":
case "plugin":
case "pl":
case "version":
case "ver":
if (sender.hasPermission("commandgui.command.info")) {
Commands.info(sender);
} else sender.sendMessage(SelectMessages.NoPermissionForCommand

View File

@@ -23,7 +23,9 @@ public class CmdExecuter_GUIItem implements CommandExecutor, TabCompleter {
Player player = (Player) sender;
if (sender.hasPermission("commandgui.useitem.toggle")) {
if (args.length == 0) {
Help.sendGUIItemHelp(sender, prefix);
if (SelectConfig.UseItem_AllowToggle) {
Help.sendGUIItemHelp(sender, prefix);
} else send.sender(sender, "§4UseItem toggle is disabled!");// todo
} else {
if (args.length == 1 || args.length == 2) {
if (sender instanceof Player) {
@@ -50,7 +52,7 @@ public class CmdExecuter_GUIItem implements CommandExecutor, TabCompleter {
Help.sendHelp(player, prefix);
}
}
} else send.sender(sender, "§4UseItem toggle is disabled!");// todo
} else sender.sendMessage(SelectMessages.OnlyForPlayer);
}
}