diff --git a/.idea/libraries/PlaceholderAPI_2_10_21.xml b/.idea/libraries/PlaceholderAPI_2_10_8.xml similarity index 68% rename from .idea/libraries/PlaceholderAPI_2_10_21.xml rename to .idea/libraries/PlaceholderAPI_2_10_8.xml index db11d32..7d8b81d 100644 --- a/.idea/libraries/PlaceholderAPI_2_10_21.xml +++ b/.idea/libraries/PlaceholderAPI_2_10_8.xml @@ -1,7 +1,7 @@ - + - + diff --git a/Command Panels.iml b/Command Panels.iml index dc985bf..4baa056 100644 --- a/Command Panels.iml +++ b/Command Panels.iml @@ -9,10 +9,10 @@ - + \ No newline at end of file diff --git a/resource/plugin.yml b/resource/plugin.yml index 786a02b..ac13cb3 100644 --- a/resource/plugin.yml +++ b/resource/plugin.yml @@ -1,4 +1,4 @@ -version: 3.7.2 +version: 3.7.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 f2de378..c43ede0 100644 --- a/src/me/rockyhawk/commandPanels/commandpanels.java +++ b/src/me/rockyhawk/commandPanels/commandpanels.java @@ -398,7 +398,8 @@ public class commandpanels extends JavaPlugin { try { setpapi = setCpPlaceholders(p,setpapi); if (this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) { - setpapi = PlaceholderAPI.setPlaceholders(p, setpapi); + OfflinePlayer offp = getServer().getOfflinePlayer(p.getUniqueId()); + setpapi = PlaceholderAPI.setPlaceholders(offp, setpapi); } setpapi = translateHexColorCodes(ChatColor.translateAlternateColorCodes('&', setpapi)); return setpapi; @@ -412,7 +413,8 @@ public class commandpanels extends JavaPlugin { try { setpapi = setCpPlaceholders(p,setpapi); if (this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) { - setpapi = PlaceholderAPI.setPlaceholders(p, setpapi); + OfflinePlayer offp = getServer().getOfflinePlayer(p.getUniqueId()); + setpapi = PlaceholderAPI.setPlaceholders(offp, setpapi); } return setpapi; }catch(NullPointerException e){ @@ -434,7 +436,8 @@ public class commandpanels extends JavaPlugin { public List papi(Player p, List setpapi, boolean placeholders) { try { if (this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI") && placeholders) { - setpapi = PlaceholderAPI.setPlaceholders(p, setpapi); + OfflinePlayer offp = getServer().getOfflinePlayer(p.getUniqueId()); + setpapi = PlaceholderAPI.setPlaceholders(offp, setpapi); } }catch(Exception ignore){ //this will be ignored as it is probably a null @@ -456,7 +459,8 @@ public class commandpanels extends JavaPlugin { public List papiNoColour(Player p, List setpapi) { try { if (this.getServer().getPluginManager().isPluginEnabled("PlaceholderAPI")) { - setpapi = PlaceholderAPI.setPlaceholders(p, setpapi); + OfflinePlayer offp = getServer().getOfflinePlayer(p.getUniqueId()); + setpapi = PlaceholderAPI.setPlaceholders(offp, setpapi); } }catch(Exception ignore){ //this will be ignored as it is probably a null @@ -1817,9 +1821,7 @@ public class commandpanels extends JavaPlugin { outputValue = cf.getBoolean("panels." + panelName + ".item." + slot + ".hasperm" + count + ".output"); } if (p.hasPermission(Objects.requireNonNull(cf.getString("panels." + panelName + ".item." + slot + ".hasperm" + count + ".perm"))) == outputValue) { - if (cf.contains("panels." + panelName + ".item." + slot + ".hasperm" + count + ".commands")) { - return ".hasperm" + count; - } + return ".hasperm" + count; } } } @@ -1831,9 +1833,7 @@ public class commandpanels extends JavaPlugin { outputValue = cf.getBoolean("panels." + panelName + ".item." + slot + ".hasperm" + ".output"); } if (p.hasPermission(Objects.requireNonNull(cf.getString("panels." + panelName + ".item." + slot + ".hasperm.perm"))) == outputValue) { - if (cf.contains("panels." + panelName + ".item." + slot + ".hasperm.commands")) { - return ".hasperm"; - } + return ".hasperm"; } } return "";