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