forked from Upstream/CommandPanels
3.9.1 Fixes
This commit is contained in:
parent
16603f56ca
commit
f6f3ff0313
@ -6,7 +6,7 @@
|
|||||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/resource" type="java-resource" />
|
<sourceFolder url="file://$MODULE_DIR$/resource" type="java-resource" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="adopt-openjdk-1.8" jdkType="JavaSDK" />
|
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="HeadDatabaseAPI" level="project" />
|
<orderEntry type="library" name="HeadDatabaseAPI" level="project" />
|
||||||
<orderEntry type="library" name="TokenManager-3.2.4" level="project" />
|
<orderEntry type="library" name="TokenManager-3.2.4" level="project" />
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: 3.9.0
|
version: 3.9.1
|
||||||
main: me.rockyhawk.commandPanels.commandpanels
|
main: me.rockyhawk.commandPanels.commandpanels
|
||||||
name: CommandPanels
|
name: CommandPanels
|
||||||
author: RockyHawk
|
author: RockyHawk
|
||||||
|
@ -354,7 +354,8 @@ public class commandpanels extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getItem(String b64stringtexture) {
|
public ItemStack getItem(String b64stringtexture) {
|
||||||
GameProfile profile = new GameProfile(UUID.randomUUID(), (String) null);
|
//get head from base64
|
||||||
|
GameProfile profile = new GameProfile(UUID.randomUUID(), null);
|
||||||
PropertyMap propertyMap = profile.getProperties();
|
PropertyMap propertyMap = profile.getProperties();
|
||||||
if (propertyMap == null) {
|
if (propertyMap == null) {
|
||||||
throw new IllegalStateException("Profile doesn't contain a property map");
|
throw new IllegalStateException("Profile doesn't contain a property map");
|
||||||
@ -378,7 +379,6 @@ public class commandpanels extends JavaPlugin {
|
|||||||
|
|
||||||
private <T> Field getField(Class<?> target, String name, Class<T> fieldType, int index) {
|
private <T> Field getField(Class<?> target, String name, Class<T> fieldType, int index) {
|
||||||
Field[] var4 = target.getDeclaredFields();
|
Field[] var4 = target.getDeclaredFields();
|
||||||
int var5 = var4.length;
|
|
||||||
|
|
||||||
for (Field field : var4) {
|
for (Field field : var4) {
|
||||||
if ((name == null || field.getName().equals(name)) && fieldType.isAssignableFrom(field.getType()) && index-- <= 0) {
|
if ((name == null || field.getName().equals(name)) && fieldType.isAssignableFrom(field.getType()) && index-- <= 0) {
|
||||||
@ -1005,6 +1005,11 @@ public class commandpanels extends JavaPlugin {
|
|||||||
if(!fileName.substring(ind).equalsIgnoreCase(".yml") && !fileName.substring(ind).equalsIgnoreCase(".yaml")){
|
if(!fileName.substring(ind).equalsIgnoreCase(".yml") && !fileName.substring(ind).equalsIgnoreCase(".yaml")){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
//check before adding the file to commandpanels
|
||||||
|
if(!checkPanels(YamlConfiguration.loadConfiguration(new File(directory + File.separator + fileName)))){
|
||||||
|
this.getServer().getConsoleSender().sendMessage("[CommandPanels]" + ChatColor.RED + " Error in: " + fileName);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
panelFiles.add((directory + File.separator + fileName).replace(panelsf.toString() + File.separator,""));
|
panelFiles.add((directory + File.separator + fileName).replace(panelsf.toString() + File.separator,""));
|
||||||
for (String tempName : Objects.requireNonNull(YamlConfiguration.loadConfiguration(new File(directory + File.separator + fileName)).getConfigurationSection("panels")).getKeys(false)) {
|
for (String tempName : Objects.requireNonNull(YamlConfiguration.loadConfiguration(new File(directory + File.separator + fileName)).getConfigurationSection("panels")).getKeys(false)) {
|
||||||
panelNames.add(new String[]{tempName, Integer.toString(count)});
|
panelNames.add(new String[]{tempName, Integer.toString(count)});
|
||||||
@ -1014,7 +1019,6 @@ public class commandpanels extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void reloadPanelFiles() {
|
public void reloadPanelFiles() {
|
||||||
try {
|
|
||||||
panelFiles.clear();
|
panelFiles.clear();
|
||||||
panelNames.clear();
|
panelNames.clear();
|
||||||
//load panel files
|
//load panel files
|
||||||
@ -1025,14 +1029,16 @@ public class commandpanels extends JavaPlugin {
|
|||||||
openWithItem = false;
|
openWithItem = false;
|
||||||
for(String[] panelName : panelNames){
|
for(String[] panelName : panelNames){
|
||||||
tempFile = YamlConfiguration.loadConfiguration(new File(panelsf + File.separator + panelFiles.get(Integer.parseInt(panelName[1]))));
|
tempFile = YamlConfiguration.loadConfiguration(new File(panelsf + File.separator + panelFiles.get(Integer.parseInt(panelName[1]))));
|
||||||
|
if(!checkPanels(tempFile)){
|
||||||
|
this.getServer().getConsoleSender().sendMessage("[CommandPanels] Error in: " + panelFiles.get(Integer.parseInt(panelName[1])));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
tempName = panelName[0];
|
tempName = panelName[0];
|
||||||
if(tempFile.contains("panels." + tempName + ".open-with-item")) {
|
if(tempFile.contains("panels." + tempName + ".open-with-item")) {
|
||||||
openWithItem = true;
|
openWithItem = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (NullPointerException noPanels) {
|
|
||||||
this.getServer().getConsoleSender().sendMessage("[CommandPanels] No panels found to load!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void debug(Exception e) {
|
public void debug(Exception e) {
|
||||||
@ -1096,7 +1102,6 @@ public class commandpanels extends JavaPlugin {
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
public void openEditorGui(Player p, int pageChange) {
|
public void openEditorGui(Player p, int pageChange) {
|
||||||
reloadPanelFiles();
|
|
||||||
Inventory i = Bukkit.createInventory(null, 54, "Command Panels Editor");
|
Inventory i = Bukkit.createInventory(null, 54, "Command Panels Editor");
|
||||||
ArrayList<String> panelNames = new ArrayList<String>(); //all panels from ALL files (panel names)
|
ArrayList<String> panelNames = new ArrayList<String>(); //all panels from ALL files (panel names)
|
||||||
ArrayList<String> panelTitles = new ArrayList<String>(); //all panels from ALL files (panel titles)
|
ArrayList<String> panelTitles = new ArrayList<String>(); //all panels from ALL files (panel titles)
|
||||||
@ -1106,7 +1111,7 @@ public class commandpanels extends JavaPlugin {
|
|||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(panelsf + File.separator + fileName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(panelsf + File.separator + fileName));
|
||||||
String key;
|
String key;
|
||||||
if (!checkPanels(temp)) {
|
if (!checkPanels(temp)) {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
||||||
key = s;
|
key = s;
|
||||||
@ -1185,7 +1190,6 @@ public class commandpanels extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void openPanelSettings(Player p, String panelName, YamlConfiguration cf) {
|
public void openPanelSettings(Player p, String panelName, YamlConfiguration cf) {
|
||||||
reloadPanelFiles();
|
|
||||||
Inventory i = Bukkit.createInventory(null, 45, "Panel Settings: " + panelName);
|
Inventory i = Bukkit.createInventory(null, 45, "Panel Settings: " + panelName);
|
||||||
List<String> lore = new ArrayList();
|
List<String> lore = new ArrayList();
|
||||||
ItemStack temp;
|
ItemStack temp;
|
||||||
@ -1370,7 +1374,6 @@ public class commandpanels extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void openItemSettings(Player p, String panelName, YamlConfiguration cf, int itemNumber) {
|
public void openItemSettings(Player p, String panelName, YamlConfiguration cf, int itemNumber) {
|
||||||
reloadPanelFiles();
|
|
||||||
Inventory i = Bukkit.createInventory(null, 36, "Item Settings: " + panelName);
|
Inventory i = Bukkit.createInventory(null, 36, "Item Settings: " + panelName);
|
||||||
List<String> lore = new ArrayList();
|
List<String> lore = new ArrayList();
|
||||||
ItemStack temp;
|
ItemStack temp;
|
||||||
|
@ -33,8 +33,7 @@ public class commandpanel implements CommandExecutor {
|
|||||||
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
sender.sendMessage(plugin.papi(tag + plugin.config.getString("config.format.error") + ": Panel with syntax error found!"));
|
continue;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
for (String key : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
for (String key : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
||||||
apanels.add(temp.getString("panels." + key + ".title"));
|
apanels.add(temp.getString("panels." + key + ".title"));
|
||||||
|
@ -40,8 +40,7 @@ public class commandpanelcustom implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
p.sendMessage(plugin.papi(tag + plugin.config.getString("config.format.error") + ": File with no Panels found!"));
|
continue;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
|
@ -42,8 +42,8 @@ public class commandpanelslist implements CommandExecutor {
|
|||||||
temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + plugin.panelFiles.get(f)));
|
temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + plugin.panelFiles.get(f)));
|
||||||
apanels.add("%file%" + plugin.panelFiles.get(f));
|
apanels.add("%file%" + plugin.panelFiles.get(f));
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
sender.sendMessage(plugin.papi(tag + plugin.config.getString("config.format.error") + ": File with no Panels found!"));
|
apanels.add("Error Reading File!");
|
||||||
return true;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = temp.getConfigurationSection("panels").getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = temp.getConfigurationSection("panels").getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
@ -74,7 +74,7 @@ public class commandpanelslist implements CommandExecutor {
|
|||||||
sender.sendMessage(ChatColor.AQUA + "Type /cpl " + (page+1) + " to read next page");
|
sender.sendMessage(ChatColor.AQUA + "Type /cpl " + (page+1) + " to read next page");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
sender.sendMessage(ChatColor.DARK_GREEN + apanels.get(f).replaceAll("%file%","").replaceAll(".yml",""));
|
sender.sendMessage(ChatColor.DARK_GREEN + apanels.get(f).replaceAll("%file%",""));
|
||||||
}else{
|
}else{
|
||||||
sender.sendMessage(ChatColor.GREEN + "- " + apanels.get(f));
|
sender.sendMessage(ChatColor.GREEN + "- " + apanels.get(f));
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.command.CommandSender;
|
|||||||
import org.bukkit.command.TabCompleter;
|
import org.bukkit.command.TabCompleter;
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
import org.yaml.snakeyaml.scanner.ScannerException;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -23,13 +24,13 @@ public class cpTabComplete implements TabCompleter {
|
|||||||
if(label.equalsIgnoreCase("cp") || label.equalsIgnoreCase("cpanel") || label.equalsIgnoreCase("commandpanel")){
|
if(label.equalsIgnoreCase("cp") || label.equalsIgnoreCase("cpanel") || label.equalsIgnoreCase("commandpanel")){
|
||||||
ArrayList<String> apanels = new ArrayList<String>(); //all panels
|
ArrayList<String> apanels = new ArrayList<String>(); //all panels
|
||||||
String tpanels; //tpanels is the temp to check through the files
|
String tpanels; //tpanels is the temp to check through the files
|
||||||
try {
|
|
||||||
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
||||||
|
try {
|
||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if (!plugin.checkPanels(temp)) {
|
if (!plugin.checkPanels(temp)) {
|
||||||
return null;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = temp.getConfigurationSection("panels").getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = temp.getConfigurationSection("panels").getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
@ -48,10 +49,10 @@ public class cpTabComplete implements TabCompleter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if file contains opened panel then start
|
}catch(Exception skip){
|
||||||
|
//ignore panel
|
||||||
}
|
}
|
||||||
}catch(Exception fail){
|
//if file contains opened panel then start
|
||||||
//could not fetch all panel names (probably no panels exist)
|
|
||||||
}
|
}
|
||||||
return apanels;
|
return apanels;
|
||||||
}
|
}
|
||||||
|
@ -49,8 +49,7 @@ public class cpIngameEditCommand implements CommandExecutor {
|
|||||||
tpanels = "";
|
tpanels = "";
|
||||||
temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + filename));
|
temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + filename));
|
||||||
if (!plugin.checkPanels(temp)) {
|
if (!plugin.checkPanels(temp)) {
|
||||||
sender.sendMessage(plugin.papi( tag + plugin.config.getString("config.format.error") + ": File with no Panels found!"));
|
continue;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
for (Iterator var10 = temp.getConfigurationSection("panels").getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = temp.getConfigurationSection("panels").getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
|
@ -30,7 +30,7 @@ public class cpTabCompleteIngame implements TabCompleter {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return null;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
|
@ -49,7 +49,7 @@ public class editorUtils implements Listener {
|
|||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
||||||
String key;
|
String key;
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
||||||
key = s;
|
key = s;
|
||||||
@ -146,7 +146,7 @@ public class editorUtils implements Listener {
|
|||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
||||||
String key;
|
String key;
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
||||||
key = s;
|
key = s;
|
||||||
@ -213,7 +213,7 @@ public class editorUtils implements Listener {
|
|||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + tempName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + tempName));
|
||||||
String key;
|
String key;
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
||||||
key = s;
|
key = s;
|
||||||
@ -332,7 +332,7 @@ public class editorUtils implements Listener {
|
|||||||
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (String key : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)){
|
for (String key : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)){
|
||||||
if(e.getView().getTitle().equals("Panel Settings: " + key)){
|
if(e.getView().getTitle().equals("Panel Settings: " + key)){
|
||||||
@ -459,7 +459,7 @@ public class editorUtils implements Listener {
|
|||||||
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (String key : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)){
|
for (String key : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)){
|
||||||
if(e.getView().getTitle().equals("Item Settings: " + key)){
|
if(e.getView().getTitle().equals("Item Settings: " + key)){
|
||||||
@ -594,7 +594,7 @@ public class editorUtils implements Listener {
|
|||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + tempFile));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + tempFile));
|
||||||
String key;
|
String key;
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
||||||
key = s;
|
key = s;
|
||||||
|
@ -141,7 +141,7 @@ public class utilsOpenWithItem implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
@ -184,7 +184,7 @@ public class utilsOpenWithItem implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = temp.getConfigurationSection("panels").getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = temp.getConfigurationSection("panels").getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
@ -225,7 +225,7 @@ public class utilsOpenWithItem implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
@ -259,8 +259,7 @@ public class utilsOpenWithItem implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
p.sendMessage(plugin.papi(tag + plugin.config.getString("config.format.error") + ": Missing required component in panel!"));
|
continue;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
@ -312,7 +311,6 @@ public class utilsOpenWithItem implements Listener {
|
|||||||
}catch(Exception b){
|
}catch(Exception b){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
YamlConfiguration cf; //this is the file to use for any panel.* requests
|
|
||||||
String tpanels; //tpanels is the temp to check through the files
|
String tpanels; //tpanels is the temp to check through the files
|
||||||
ItemStack clicked = e.getItemDrop().getItemStack();
|
ItemStack clicked = e.getItemDrop().getItemStack();
|
||||||
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
for(String fileName : plugin.panelFiles) { //will loop through all the files in folder
|
||||||
@ -320,7 +318,7 @@ public class utilsOpenWithItem implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
@ -371,7 +369,7 @@ public class utilsOpenWithItem implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
@ -423,7 +421,7 @@ public class utilsOpenWithItem implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if(!plugin.checkPanels(temp)){
|
if(!plugin.checkPanels(temp)){
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
|
@ -32,7 +32,7 @@ public class blocksTabComplete implements TabCompleter {
|
|||||||
String key;
|
String key;
|
||||||
tpanels = "";
|
tpanels = "";
|
||||||
if (!plugin.checkPanels(temp)) {
|
if (!plugin.checkPanels(temp)) {
|
||||||
return null;
|
continue;
|
||||||
}
|
}
|
||||||
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
for (Iterator var10 = Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false).iterator(); var10.hasNext(); tpanels = tpanels + key + " ") {
|
||||||
key = (String) var10.next();
|
key = (String) var10.next();
|
||||||
|
@ -48,9 +48,7 @@ public class commandpanelrefresher implements Listener {
|
|||||||
String key;
|
String key;
|
||||||
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
YamlConfiguration temp = YamlConfiguration.loadConfiguration(new File(plugin.panelsf + File.separator + fileName));
|
||||||
if (!plugin.checkPanels(temp)) {
|
if (!plugin.checkPanels(temp)) {
|
||||||
assert p != null;
|
continue;
|
||||||
p.sendMessage(plugin.papi(tag + plugin.config.getString("config.format.error") + ": File with no Panels found or Panel with syntax error Found!"));
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
for (String s : Objects.requireNonNull(temp.getConfigurationSection("panels")).getKeys(false)) {
|
||||||
key = s;
|
key = s;
|
||||||
|
Loading…
Reference in New Issue
Block a user