2.8.7 No Permission Lore, Function load fix

This commit is contained in:
JaTiTV 2022-07-09 17:25:59 +02:00
parent da4bd4975a
commit f947025afa
3 changed files with 4 additions and 4 deletions

View File

@ -6,7 +6,7 @@
<groupId>net.t2code</groupId>
<artifactId>CommandGUI_V2</artifactId>
<version>2.8.6</version>
<version>2.8.7</version>
<packaging>jar</packaging>
<name>CommandGUI</name>

View File

@ -67,12 +67,12 @@ public class GuiBuilder {
Function function = Main.functionHashMap.get(slot.function);
if (Main.PaPi) {
itemMeta.setDisplayName(Replace.replace(prefix, player, Placeholder.replace(function.name, player)));
if (!player.hasPermission(slot.permissionToUse) && function.noPermLoreEnable) {
if (slot.permission && !player.hasPermission(slot.permissionToUse) && function.noPermLoreEnable) {
itemMeta.setLore(Replace.replacePrice(prefix, player, Placeholder.replace(function.noPermLore, player), function.price + " " + SelectConfig.getCurrency()));
} else itemMeta.setLore(Replace.replacePrice(prefix, player, Placeholder.replace(function.lore, player), function.price + " " + SelectConfig.getCurrency()));
} else {
itemMeta.setDisplayName(Replace.replace(prefix, Placeholder.replace(function.name, player)));
if (!player.hasPermission(slot.permissionToUse) && function.noPermLoreEnable) {
if (slot.permission && !player.hasPermission(slot.permissionToUse) && function.noPermLoreEnable) {
itemMeta.setLore(Replace.replacePrice(prefix, Placeholder.replace(function.noPermLore, player), function.price + " " + SelectConfig.getCurrency()));
} else itemMeta.setLore(Replace.replacePrice(prefix, Placeholder.replace(function.lore, player), function.price + " " + SelectConfig.getCurrency()));
}

View File

@ -101,7 +101,7 @@ public class Obj_Select {
File[] fileArray = f.listFiles();
for (File config : fileArray) {
if (config.getName().equals("functionDeclaration.yml")) return;
if (config.getName().equals("functionDeclaration.yml")) continue;
String sub = config.getName().substring(config.getName().length() - 4);
if (sub.equals(".yml")) {
YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(config);