3.8.3 Fixes

This commit is contained in:
rockyhawk64 2020-08-11 22:47:15 +10:00
parent bcf1734b76
commit 4dfef8cb7b
2 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,4 @@
version: 3.8.2
version: 3.8.3
main: me.rockyhawk.commandPanels.commandpanels
name: CommandPanels
author: RockyHawk

View File

@ -437,15 +437,17 @@ public class commandpanels extends JavaPlugin {
//papi except if it is a String List
public List<String> papi(Player p, List<String> 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;
}
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
return null;
@ -465,6 +467,11 @@ public class commandpanels extends JavaPlugin {
//papi except if it is a String List
public List<String> papiNoColour(Player p, List<String> 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);