forked from Upstream/CommandPanels
v3.15.1.1
This commit is contained in:
parent
e71f2bf52d
commit
b26164ee26
@ -1,4 +1,4 @@
|
|||||||
version: 3.15.1.0
|
version: 3.15.1.1
|
||||||
main: me.rockyhawk.commandpanels.CommandPanels
|
main: me.rockyhawk.commandpanels.CommandPanels
|
||||||
name: CommandPanels
|
name: CommandPanels
|
||||||
author: RockyHawk
|
author: RockyHawk
|
||||||
|
@ -133,13 +133,7 @@ public class CommandTags {
|
|||||||
|
|
||||||
//placeholder is now placeholder= [place]. Not placeholder= panel [place] which is why this is here
|
//placeholder is now placeholder= [place]. Not placeholder= panel [place] which is why this is here
|
||||||
String cmd;
|
String cmd;
|
||||||
if(command.split("\\s").length == 3){
|
cmd = commandRAW.replace("placeholder= ","");
|
||||||
cmd = commandRAW.replace("placeholder= " + panelName,"").trim();
|
|
||||||
plugin.getServer().getConsoleSender().sendMessage(plugin.tag + ChatColor.RED + "placeholder= <panel> <placeholder> will be deprecated");
|
|
||||||
plugin.getServer().getConsoleSender().sendMessage(plugin.tag + ChatColor.RED + "use " + ChatColor.WHITE + "placeholder= " + cmd + ChatColor.RED + " instead of " + ChatColor.GRAY + commandRAW + ChatColor.RED + "!");
|
|
||||||
}else{
|
|
||||||
cmd = commandRAW.replace("placeholder= ","");
|
|
||||||
}
|
|
||||||
|
|
||||||
Character[] cm = ArrayUtils.toObject(cmd.toCharArray());
|
Character[] cm = ArrayUtils.toObject(cmd.toCharArray());
|
||||||
for(int i = 0; i < cm.length; i++){
|
for(int i = 0; i < cm.length; i++){
|
||||||
|
@ -6,7 +6,6 @@ import org.bukkit.ChatColor;
|
|||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
|
|
||||||
@ -34,7 +33,6 @@ public class CpIngameEditCommand implements CommandExecutor {
|
|||||||
sender.sendMessage(plugin.papi( plugin.tag + ChatColor.RED + "Please execute command as a Player!"));
|
sender.sendMessage(plugin.papi( plugin.tag + ChatColor.RED + "Please execute command as a Player!"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
ConfigurationSection cf = null; //this is the file to use for any panel.* requests
|
|
||||||
Player p = (Player)sender;
|
Player p = (Player)sender;
|
||||||
//below is going to go through the files and find the right one
|
//below is going to go through the files and find the right one
|
||||||
if (args.length == 1) { //check to make sure the person hasn't just left it empty
|
if (args.length == 1) { //check to make sure the person hasn't just left it empty
|
||||||
|
@ -41,6 +41,7 @@ public class EditorUserInput implements Listener {
|
|||||||
for (Panel panel : plugin.panelList) { //will loop through all the files in folder
|
for (Panel panel : plugin.panelList) { //will loop through all the files in folder
|
||||||
if (panel.getName().equals(panelName)) {
|
if (panel.getName().equals(panelName)) {
|
||||||
cf = panel.getConfig();
|
cf = panel.getConfig();
|
||||||
|
cfile = YamlConfiguration.loadConfiguration(panel.getFile());
|
||||||
panelFile = panel.getFile();
|
panelFile = panel.getFile();
|
||||||
panelTitle = plugin.papi(cf.getString("title"));
|
panelTitle = plugin.papi(cf.getString("title"));
|
||||||
break;
|
break;
|
||||||
|
@ -41,15 +41,6 @@ public class OpenGUI {
|
|||||||
}else{
|
}else{
|
||||||
i = Bukkit.createInventory(null, InventoryType.valueOf(pconfig.getString("rows")), title);
|
i = Bukkit.createInventory(null, InventoryType.valueOf(pconfig.getString("rows")), title);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Inventory i;
|
|
||||||
if (onOpen != 3) {
|
|
||||||
//use the regular inventory
|
|
||||||
i = Bukkit.createInventory(null, Integer.parseInt(Objects.requireNonNull(pconfig.getString("rows"))) * 9, plugin.papi(p, Objects.requireNonNull(pconfig.getString("title"))));
|
|
||||||
} else {
|
|
||||||
//this means it is the Editor window
|
|
||||||
i = Bukkit.createInventory(null, Integer.parseInt(Objects.requireNonNull(pconfig.getString("rows"))) * 9, "Editing Panel: " + panels);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
Set<String> itemList = pconfig.getConfigurationSection("item").getKeys(false);
|
Set<String> itemList = pconfig.getConfigurationSection("item").getKeys(false);
|
||||||
for (String item : itemList) {
|
for (String item : itemList) {
|
||||||
|
Loading…
Reference in New Issue
Block a user