diff --git a/resource/plugin.yml b/resource/plugin.yml index f726479..2c77670 100644 --- a/resource/plugin.yml +++ b/resource/plugin.yml @@ -1,4 +1,4 @@ -version: 3.8.2 +version: 3.8.3 main: me.rockyhawk.commandPanels.commandpanels name: CommandPanels author: RockyHawk diff --git a/src/me/rockyhawk/commandPanels/commandpanels.java b/src/me/rockyhawk/commandPanels/commandpanels.java index 6a19556..2ae6c44 100644 --- a/src/me/rockyhawk/commandPanels/commandpanels.java +++ b/src/me/rockyhawk/commandPanels/commandpanels.java @@ -437,14 +437,16 @@ public class commandpanels extends JavaPlugin { //papi except if it is a String List public List papi(Player p, List setpapi, boolean placeholders) { try { - if (this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI") && placeholders) { + if(placeholders) { int tempInt = 0; - for(String temp : setpapi){ - setpapi.set(tempInt,setCpPlaceholders(p,temp)); + for (String temp : setpapi) { + setpapi.set(tempInt, setCpPlaceholders(p, temp)); tempInt += 1; } - OfflinePlayer offp = getServer().getOfflinePlayer(p.getUniqueId()); - setpapi = PlaceholderAPI.setPlaceholders(offp, setpapi); + if (this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) { + OfflinePlayer offp = getServer().getOfflinePlayer(p.getUniqueId()); + setpapi = PlaceholderAPI.setPlaceholders(offp, setpapi); + } } }catch(Exception ignore){ //this will be ignored as it is probably a null @@ -465,6 +467,11 @@ public class commandpanels extends JavaPlugin { //papi except if it is a String List public List papiNoColour(Player p, List setpapi) { try { + int tempInt = 0; + for (String temp : setpapi) { + setpapi.set(tempInt, setCpPlaceholders(p, temp)); + tempInt += 1; + } if (this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) { OfflinePlayer offp = getServer().getOfflinePlayer(p.getUniqueId()); setpapi = PlaceholderAPI.setPlaceholders(offp, setpapi);