2.5.16 #1
37
.gitea/ISSUE_TEMPLATE/bug_report.md
Normal file
37
.gitea/ISSUE_TEMPLATE/bug_report.md
Normal 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 ##
|
||||||
|
#######################################
|
||||||
|
```
|
21
.gitea/ISSUE_TEMPLATE/feature_request.md
Normal file
21
.gitea/ISSUE_TEMPLATE/feature_request.md
Normal 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):**
|
22
.gitea/ISSUE_TEMPLATE/question.md
Normal file
22
.gitea/ISSUE_TEMPLATE/question.md
Normal 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):**
|
||||||
|
|
||||||
|
---
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>net.t2code</groupId>
|
<groupId>net.t2code</groupId>
|
||||||
<artifactId>CommandGUI_V2</artifactId>
|
<artifactId>CommandGUI_V2</artifactId>
|
||||||
<version>2.5.15</version>
|
<version>2.5.16_Snapshot_1</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>CommandGUI</name>
|
<name>CommandGUI</name>
|
||||||
|
@ -14,11 +14,16 @@ import org.bukkit.scheduler.BukkitRunnable;
|
|||||||
public class ItemChange {
|
public class ItemChange {
|
||||||
public static void itemChange(Player player) {
|
public static void itemChange(Player player) {
|
||||||
Integer slot;
|
Integer slot;
|
||||||
|
if (SelectConfig.UseItem_InventorySlotEnforce){
|
||||||
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
|
} else {
|
||||||
if (Select_Database.selectSlot(player) == null) {
|
if (Select_Database.selectSlot(player) == null) {
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
} else {
|
} else {
|
||||||
slot = Select_Database.selectSlot(player);
|
slot = Select_Database.selectSlot(player);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!SelectConfig.UseItem_Enable) {
|
if (!SelectConfig.UseItem_Enable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package de.jatitv.commandguiv2.Spigot.Objekte;
|
|||||||
|
|
||||||
import de.jatitv.commandguiv2.Spigot.Main;
|
import de.jatitv.commandguiv2.Spigot.Main;
|
||||||
import de.jatitv.commandguiv2.Spigot.cmdManagement.CmdExecuter_GUI;
|
import de.jatitv.commandguiv2.Spigot.cmdManagement.CmdExecuter_GUI;
|
||||||
|
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 org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
@ -17,10 +18,9 @@ public class Obj_Select {
|
|||||||
File[] fileArray = f.listFiles();
|
File[] fileArray = f.listFiles();
|
||||||
|
|
||||||
for (File config_gui : fileArray) {
|
for (File config_gui : fileArray) {
|
||||||
|
|
||||||
Main.allAliases.add(config_gui.getName().replace(".yml", ""));
|
|
||||||
String sub = config_gui.getName().substring(config_gui.getName().length() - 4);
|
String sub = config_gui.getName().substring(config_gui.getName().length() - 4);
|
||||||
if (sub.equals(".yml")) {
|
if (sub.equals(".yml")) {
|
||||||
|
Main.allAliases.add(config_gui.getName().replace(".yml", ""));
|
||||||
YamlConfiguration yamlConfiguration_gui = YamlConfiguration.loadConfiguration(config_gui);
|
YamlConfiguration yamlConfiguration_gui = YamlConfiguration.loadConfiguration(config_gui);
|
||||||
|
|
||||||
Boolean GUI_Enable = yamlConfiguration_gui.getBoolean("GUI.Enable");
|
Boolean GUI_Enable = yamlConfiguration_gui.getBoolean("GUI.Enable");
|
||||||
@ -38,7 +38,6 @@ public class Obj_Select {
|
|||||||
GUI_FillItem_Item = yamlConfiguration_gui.getString("GUI.FillItem.GlassPaneCollor");
|
GUI_FillItem_Item = yamlConfiguration_gui.getString("GUI.FillItem.GlassPaneCollor");
|
||||||
} else GUI_FillItem_Item = yamlConfiguration_gui.getString("GUI.FillItem.Item");
|
} else GUI_FillItem_Item = yamlConfiguration_gui.getString("GUI.FillItem.Item");
|
||||||
|
|
||||||
|
|
||||||
Boolean Command_Alias_Enable = yamlConfiguration_gui.getBoolean("Command.Alias");
|
Boolean Command_Alias_Enable = yamlConfiguration_gui.getBoolean("Command.Alias");
|
||||||
Boolean Command_Permission = yamlConfiguration_gui.getBoolean("Command.Permission.Required");
|
Boolean Command_Permission = yamlConfiguration_gui.getBoolean("Command.Permission.Required");
|
||||||
|
|
||||||
|
@ -39,6 +39,10 @@ public class CmdExecuter_GUI implements CommandExecutor, TabCompleter {
|
|||||||
|
|
||||||
switch (args[1].toLowerCase()) {
|
switch (args[1].toLowerCase()) {
|
||||||
case "info":
|
case "info":
|
||||||
|
case "plugin":
|
||||||
|
case "pl":
|
||||||
|
case "version":
|
||||||
|
case "ver":
|
||||||
if (sender.hasPermission("commandgui.command.info")) {
|
if (sender.hasPermission("commandgui.command.info")) {
|
||||||
Commands.info(sender);
|
Commands.info(sender);
|
||||||
} else sender.sendMessage(SelectMessages.NoPermissionForCommand
|
} else sender.sendMessage(SelectMessages.NoPermissionForCommand
|
||||||
|
@ -23,7 +23,9 @@ public class CmdExecuter_GUIItem implements CommandExecutor, TabCompleter {
|
|||||||
Player player = (Player) sender;
|
Player player = (Player) sender;
|
||||||
if (sender.hasPermission("commandgui.useitem.toggle")) {
|
if (sender.hasPermission("commandgui.useitem.toggle")) {
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
|
if (SelectConfig.UseItem_AllowToggle) {
|
||||||
Help.sendGUIItemHelp(sender, prefix);
|
Help.sendGUIItemHelp(sender, prefix);
|
||||||
|
} else send.sender(sender, "§4UseItem toggle is disabled!");// todo
|
||||||
} else {
|
} else {
|
||||||
if (args.length == 1 || args.length == 2) {
|
if (args.length == 1 || args.length == 2) {
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
@ -50,7 +52,7 @@ public class CmdExecuter_GUIItem implements CommandExecutor, TabCompleter {
|
|||||||
Help.sendHelp(player, prefix);
|
Help.sendHelp(player, prefix);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
} else send.sender(sender, "§4UseItem toggle is disabled!");// todo
|
||||||
} else sender.sendMessage(SelectMessages.OnlyForPlayer);
|
} else sender.sendMessage(SelectMessages.OnlyForPlayer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,11 +128,15 @@ public class Commands {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Integer slot = null;
|
Integer slot = null;
|
||||||
|
if (SelectConfig.UseItem_InventorySlotEnforce){
|
||||||
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
|
} else {
|
||||||
if (Select_Database.selectSlot(player) == null) {
|
if (Select_Database.selectSlot(player) == null) {
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
} else {
|
} else {
|
||||||
slot = Select_Database.selectSlot(player);
|
slot = Select_Database.selectSlot(player);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
send.debug(plugin,String.valueOf(slot));
|
send.debug(plugin,String.valueOf(slot));
|
||||||
if (player.getInventory().getItem(slot - 1) == null) {
|
if (player.getInventory().getItem(slot - 1) == null) {
|
||||||
Select_Database.setItemStatusTrue(player);
|
Select_Database.setItemStatusTrue(player);
|
||||||
|
@ -26,11 +26,15 @@ public class Give_UseItem {
|
|||||||
|
|
||||||
public static void onGive(Player player) {
|
public static void onGive(Player player) {
|
||||||
Integer slot;
|
Integer slot;
|
||||||
|
if (SelectConfig.UseItem_InventorySlotEnforce){
|
||||||
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
|
} else {
|
||||||
if (Select_Database.selectSlot(player) == null) {
|
if (Select_Database.selectSlot(player) == null) {
|
||||||
slot = SelectConfig.UseItem_InventorySlot;
|
slot = SelectConfig.UseItem_InventorySlot;
|
||||||
} else {
|
} else {
|
||||||
slot = Select_Database.selectSlot(player);
|
slot = Select_Database.selectSlot(player);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (SelectConfig.UseItem_InventorySlot_FreeSlot) {
|
if (SelectConfig.UseItem_InventorySlot_FreeSlot) {
|
||||||
player.getInventory().addItem(itemStack(player));
|
player.getInventory().addItem(itemStack(player));
|
||||||
} else player.getInventory().setItem(slot - 1, itemStack(player));
|
} else player.getInventory().setItem(slot - 1, itemStack(player));
|
||||||
|
Loading…
Reference in New Issue
Block a user