forked from Upstream/CommandPanels
3.7.3 Fixes
This commit is contained in:
parent
183761812a
commit
cba5975f76
@ -1,7 +1,7 @@
|
||||
<component name="libraryTable">
|
||||
<library name="PlaceholderAPI-2.10.21">
|
||||
<library name="PlaceholderAPI-2.10.8">
|
||||
<CLASSES>
|
||||
<root url="jar://$PROJECT_DIR$/../../Tools/Build Tools/Jar Libraries/PlaceholderAPI-2.10.2.jar!/" />
|
||||
<root url="jar://$PROJECT_DIR$/../../Tools/Build Tools/Jar Libraries/PlaceholderAPI-2.10.8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
@ -9,10 +9,10 @@
|
||||
<orderEntry type="jdk" jdkName="adopt-openjdk-1.8" jdkType="JavaSDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="HeadDatabaseAPI" level="project" />
|
||||
<orderEntry type="library" name="PlaceholderAPI-2.10.21" level="project" />
|
||||
<orderEntry type="library" name="TokenManager-3.2.4" level="project" />
|
||||
<orderEntry type="library" name="Vault" level="project" />
|
||||
<orderEntry type="library" name="VotingPlugin" level="project" />
|
||||
<orderEntry type="library" name="spigot-1.16.1" level="project" />
|
||||
<orderEntry type="library" name="PlaceholderAPI-2.10.8" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -1,4 +1,4 @@
|
||||
version: 3.7.2
|
||||
version: 3.7.3
|
||||
main: me.rockyhawk.commandPanels.commandpanels
|
||||
name: CommandPanels
|
||||
author: RockyHawk
|
||||
|
@ -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<String> papi(Player p, List<String> 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<String> papiNoColour(Player p, List<String> 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 "";
|
||||
|
Loading…
Reference in New Issue
Block a user