forked from Upstream/CommandPanels
Misc fixes
This commit is contained in:
parent
6bfbe3338a
commit
d842ddff30
@ -197,14 +197,12 @@ public class ItemCreation {
|
||||
}
|
||||
}
|
||||
|
||||
if(addNBT){
|
||||
if (itemSection.contains("nbt")) {
|
||||
for(String key : Objects.requireNonNull(itemSection.getConfigurationSection("nbt")).getKeys(true)){
|
||||
if(itemSection.isConfigurationSection("nbt." + key)){
|
||||
continue;
|
||||
}
|
||||
s = plugin.nbt.setNBT(s,key,plugin.tex.attachPlaceholders(panel, position, p, Objects.requireNonNull(itemSection.getString("nbt." + key)))); //itemSection.getString("nbt." + key));
|
||||
if(addNBT && itemSection.contains("nbt")){
|
||||
for(String key : Objects.requireNonNull(itemSection.getConfigurationSection("nbt")).getKeys(true)){
|
||||
if(itemSection.isConfigurationSection("nbt." + key)){
|
||||
continue;
|
||||
}
|
||||
s = plugin.nbt.setNBT(s,key,plugin.tex.attachPlaceholders(panel, position, p, Objects.requireNonNull(itemSection.getString("nbt." + key)))); //itemSection.getString("nbt." + key));
|
||||
}
|
||||
}
|
||||
if (itemSection.contains("enchanted")) {
|
||||
@ -539,7 +537,6 @@ public class ItemCreation {
|
||||
|
||||
if (!nbtitem1.equals(nbtitem2)) {
|
||||
return false;
|
||||
|
||||
}
|
||||
} catch (Exception ignore) {}
|
||||
}
|
||||
|
@ -148,6 +148,9 @@ public class CommandTags {
|
||||
|
||||
//create new instance of command but with placeholders parsed
|
||||
switch (rawCommand.split("\\s")[0]) {
|
||||
default: {
|
||||
return PaywallOutput.NotApplicable;
|
||||
}
|
||||
case "paywall=": {
|
||||
String command = plugin.tex.placeholders(panel, PanelPosition.Top, p, rawCommand);
|
||||
//if player uses paywall= [price]
|
||||
@ -432,7 +435,6 @@ public class CommandTags {
|
||||
}
|
||||
}
|
||||
}
|
||||
return PaywallOutput.NotApplicable;
|
||||
}
|
||||
|
||||
//Experience math is a bit doggy doo doo so these will help to calculate values
|
||||
|
@ -18,10 +18,6 @@ public class UpdateTabComplete implements TabCompleter {
|
||||
public List<String> onTabComplete(CommandSender sender, Command cmd, String label, String[] args) {
|
||||
if(sender.hasPermission("commandpanel.refresh")) {
|
||||
ArrayList<String> output = new ArrayList<>();
|
||||
if (args.length>=1 && args[0].equalsIgnoreCase("-s")) {
|
||||
|
||||
args = Arrays.copyOfRange(args, 1, args.length);
|
||||
}
|
||||
if(args.length == 1){
|
||||
for(Player player : Bukkit.getOnlinePlayers()){
|
||||
output.add(player.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user